Fix warnings.
[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         alloca \
9         alloca-opt \
10         assert \
11         byteswap \
12         c-ctype \
13         c-strtod \
14         crypto/md4 \
15         dirname \
16         exit \
17         fpieee \
18         full-read \
19         full-write \
20         fseeko \
21         fwriteerror \
22         gethostname \
23         getline \
24         getlogin_r \
25         getopt \
26         gettext-h \
27         gettimeofday \
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         progname \
43         relocatable-prog \
44         snprintf \
45         stdarg \
46         stdbool \
47         stdint \
48         stpcpy \
49         strcase \
50         strcspn \
51         strerror \
52         strftime \
53         strsep \
54         strtod \
55         strtok_r \
56         strtol \
57         strtoul \
58         sys_stat \
59         tmpfile \
60         unistd \
61         unlocked-io \
62         vsnprintf \
63         xalloc \
64         xalloc-die \
65         xsize \
66         xstrndup \
67         xvasprintf
68
69 all: po/POTFILES.in
70         test -d m4 || mkdir m4
71         echo '*' > m4/.cvsignore
72         touch m4/Makefile.am
73         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
74                 --source-base=gl --lib=libgl --tests-base=tests \
75                 --doc-base=gl/doc --import $(GNULIB_MODULES)
76         echo '*' > gl/.cvsignore
77         echo '*' > gl/m4/.cvsignore
78         libtoolize --force --automake
79         autopoint --force
80         aclocal -I m4 -I gl/m4
81         autoconf
82         autoheader
83         automake --add-missing --copy --no-force
84
85 gettextize:
86         test -d m4 || mkdir m4
87         touch m4/Makefile.am
88         gettextize --force --no-changelog
89
90 po/POTFILES.in:
91         for f in `find src \( -name \*.[qc] -o -name \*.glade \) ! -name .\* -print` ; do \
92                 if test $$f = src/libpspp/version.c; then continue; fi;   \
93                 if test -e `dirname $$f`/`basename $$f .c`.q ; then continue; fi; \
94                 echo $$f ; \
95         done | sort | uniq > $@.tmp
96         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
97         rm -f $@.tmp
98
99 check: all
100         rm -rf _check
101         mkdir _check
102         cd _check && ../configure $(CONFIGUREFLAGS)
103         cd _check && make distcheck
104         rm -rf _check
105
106 _build: all
107         test -d _build || mkdir _build
108         cd _build && ../configure $(CONFIGUREFLAGS)
109
110 _debug: all
111         test -d _debug || mkdir _debug
112         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
113
114 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
115 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
116 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
117 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
118 po/Makevars.template po/pspp.pot
119
120 clean:
121         rm -f config.sub config.guess config.rpath
122         rm -f ABOUT-NLS
123         rm -fr autom4te.cache
124         rm -f aclocal.m4
125         rm -f missing mkinstalldirs
126         rm -f install-sh
127         rm -f configure Makefile 
128         rm -f depcomp
129         rm -rf intl gl
130         rm -f m4/*.m4
131         rm -f $(PO_FILES) po/*.gmo 
132         rm -f mdate-sh texinfo.tex
133         rm -f doc/stamp-vti
134         rm -f config.h.in~
135         rm -f config.h.in
136         find . -name Makefile.in -exec rm -f {} \; 
137         rm -f compile
138         rm -f ltmain.sh
139         rm -f reloc-ldflags install-reloc
140
141 .PHONY: all gettextize potfiles clean