Use isfinite, round modules from gnulib.
[pspp-builds.git] / Smake
1 # -*- makefile -*-
2
3 # Adjust these to reflect where you've installed gnulib.
4 GNULIB = ../gnulib
5 GNULIB_TOOL = $(GNULIB)/gnulib-tool
6
7 GNULIB_MODULES = \
8         assert \
9         byteswap \
10         c-ctype \
11         c-strtod \
12         crypto/md4 \
13         dirname \
14         exit \
15         fpieee \
16         fprintf-posix \
17         full-read \
18         full-write \
19         fseeko \
20         fwriteerror \
21         gethostname \
22         getline \
23         getlogin_r \
24         getopt \
25         gettext-h \
26         gettimeofday \
27         isfinite \
28         intprops \
29         inttostr \
30         linebreak \
31         localcharset \
32         mbchar \
33         memcasecmp \
34         memchr \
35         memcmp \
36         memmem \
37         memmove \
38         mempcpy \
39         memset \
40         minmax \
41         mkstemp \
42         printf-posix \
43         printf-safe \
44         progname \
45         relocatable-prog \
46         round \
47         snprintf \
48         snprintf-posix \
49         sprintf-posix \
50         stdarg \
51         stdbool \
52         stdint \
53         stpcpy \
54         strcase \
55         strcspn \
56         strerror \
57         strftime \
58         strsep \
59         strtod \
60         strtok_r \
61         strtol \
62         strtoul \
63         sys_stat \
64         tmpfile \
65         trunc \
66         unistd \
67         unlocked-io \
68         vasprintf-posix \
69         vfprintf-posix \
70         vprintf-posix \
71         vsnprintf \
72         vsnprintf-posix \
73         vsprintf-posix \
74         xalloc \
75         xalloc-die \
76         xmalloca \
77         xsize \
78         xstrndup \
79         xvasprintf
80
81 all: po/POTFILES.in
82         test -d m4 || mkdir m4
83         echo '*' > m4/.cvsignore
84         touch m4/Makefile.am
85         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
86                 --source-base=gl --lib=libgl --tests-base=tests \
87                 --doc-base=gl/doc --import $(GNULIB_MODULES)
88         echo '*' > gl/.cvsignore
89         echo '*' > gl/m4/.cvsignore
90         libtoolize --force --automake
91         autopoint --force
92         aclocal -I m4 -I gl/m4
93         autoconf
94         autoheader
95         automake --add-missing --copy --no-force
96
97 gettextize:
98         test -d m4 || mkdir m4
99         touch m4/Makefile.am
100         gettextize --force --no-changelog
101
102 po/POTFILES.in:
103         for f in `find src \( -name \*.[qc] -o -name \*.glade \) ! -name .\* -print` ; do \
104                 if test $$f = src/libpspp/version.c; then continue; fi;   \
105                 if test -e `dirname $$f`/`basename $$f .c`.q ; then continue; fi; \
106                 echo $$f ; \
107         done | sort | uniq > $@.tmp
108         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
109         rm -f $@.tmp
110
111 check: all
112         rm -rf _check
113         mkdir _check
114         cd _check && ../configure $(CONFIGUREFLAGS)
115         cd _check && make distcheck
116         rm -rf _check
117
118 _build: all
119         test -d _build || mkdir _build
120         cd _build && ../configure $(CONFIGUREFLAGS)
121
122 _debug: all
123         test -d _debug || mkdir _debug
124         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
125
126 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
127 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
128 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
129 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
130 po/Makevars.template po/pspp.pot
131
132 clean:
133         rm -f config.sub config.guess config.rpath
134         rm -f ABOUT-NLS
135         rm -fr autom4te.cache
136         rm -f aclocal.m4
137         rm -f missing mkinstalldirs
138         rm -f install-sh
139         rm -f configure Makefile 
140         rm -f depcomp
141         rm -rf intl gl
142         rm -f m4/*.m4
143         rm -f $(PO_FILES) po/*.gmo 
144         rm -f mdate-sh texinfo.tex
145         rm -f doc/stamp-vti
146         rm -f config.h.in~
147         rm -f config.h.in
148         find . -name Makefile.in -exec rm -f {} \; 
149         rm -f compile
150         rm -f ltmain.sh
151         rm -f reloc-ldflags install-reloc
152
153 .PHONY: all gettextize potfiles clean