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