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