Add scratch file handles.
[pspp-builds.git] / Smake
1 # -*- makefile -*-
2
3 GNULIB = ../gnulib
4 GNULIB_TOOL = $(GNULIB)/gnulib-tool
5
6 GNULIB_MODULES = alloca alloca-opt assert full-read full-write          \
7 gethostname getline getlogin_r getopt gettext memchr memcmp memmem      \
8 memmove memset progname readlink restrict snprintf stat-macros stdbool  \
9 stpcpy strcase strcspn strerror strftime strstr strtod strtok_r strtol  \
10 strtoul vsnprintf xalloc xalloc-die xreadlink xvasprintf
11
12 all: po/POTFILES.in
13         test -d m4 || mkdir m4
14         touch m4/Makefile.am
15         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
16                 --source-base=gl --lib=libgl --tests-base=tests \
17                 --import $(GNULIB_MODULES)
18         autoreconf --install
19
20 gettextize:
21         test -d m4 || mkdir m4
22         touch m4/Makefile.am
23         gettextize -f -c --intl --no-changelog
24
25 po/POTFILES.in:
26         for f in `find src -name \*.[qc] ! -name .\* -print \
27                   | sed 's/\.[qc]$$//'`; do \
28                 if test $$f = src/version.c; then break; fi;              \
29                 if test -e $$f.q; then echo $$f.q; else echo $$f.c; fi    \
30         done | sort | uniq > $@.tmp
31         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
32         rm -f $@.tmp
33
34 check: all
35         rm -rf _check
36         mkdir _check
37         cd _check && ../configure $(CONFIGUREFLAGS)
38         cd _check && make distcheck
39         rm -rf _check
40
41 _build: all
42         test -d _build || mkdir _build
43         cd _build && ../configure $(CONFIGUREFLAGS)
44
45 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
46 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
47 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
48 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
49 po/Makevars.template
50
51 clean:
52         rm -f config.sub config.guess config.rpath
53         rm -f ABOUT-NLS
54         rm -fr autom4te.cache
55         rm -f aclocal.m4
56         rm -f missing mkinstalldirs
57         rm -f install-sh
58         rm -f configure Makefile Makefile.in
59         rm -f depcomp
60         rm -fr intl gl
61         rm -f m4/*.m4
62         rm -f $(PO_FILES)
63
64 .PHONY: all gettextize potfiles clean