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