Add stdint to GNULIB_MODULES.
[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         c-ctype \
12         c-strtod \
13         full-read \
14         full-write \
15         gethostname \
16         getline \
17         getlogin_r \
18         getopt \
19         gettext \
20         intprops \
21         memcasecmp \
22         memchr \
23         memcmp \
24         memmem \
25         memmove \
26         memset \
27         progname \
28         readlink \
29         restrict \
30         snprintf \
31         stat-macros \
32         stdbool \
33         stdint \
34         stpcpy \
35         strcase \
36         strcspn \
37         strerror \
38         strftime \
39         strsep \
40         strstr \
41         strtod \
42         strtok_r \
43         strtol \
44         strtoul \
45         unistd \
46         vsnprintf \
47         xalloc \
48         xalloc-die \
49         xreadlink \
50         xvasprintf
51
52 all: po/POTFILES.in
53         test -d m4 || mkdir m4
54         touch m4/Makefile.am
55         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
56                 --source-base=gl --lib=libgl --tests-base=tests \
57                 --import $(GNULIB_MODULES)
58         autoreconf --install
59
60 gettextize:
61         test -d m4 || mkdir m4
62         touch m4/Makefile.am
63         gettextize -f -c --intl --no-changelog
64
65 po/POTFILES.in:
66         for f in `find src -name \*.[qc] ! -name .\* -print \
67                   | sed 's/\.[qc]$$//'`; do \
68                 if test $$f = src/libpspp/version; then continue; fi;     \
69                 if test -e $$f.q; then echo $$f.q; else echo $$f.c; fi    \
70         done | sort | uniq > $@.tmp
71         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
72         rm -f $@.tmp
73
74 check: all
75         rm -rf _check
76         mkdir _check
77         cd _check && ../configure $(CONFIGUREFLAGS)
78         cd _check && make distcheck
79         rm -rf _check
80
81 _build: all
82         test -d _build || mkdir _build
83         cd _build && ../configure $(CONFIGUREFLAGS)
84
85 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
86 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
87 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
88 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
89 po/Makevars.template
90
91 clean:
92         rm -f config.sub config.guess config.rpath
93         rm -f ABOUT-NLS
94         rm -fr autom4te.cache
95         rm -f aclocal.m4
96         rm -f missing mkinstalldirs
97         rm -f install-sh
98         rm -f configure Makefile 
99         rm -f depcomp
100         rm -rf intl gl
101         rm -f m4/*.m4
102         rm -f $(PO_FILES)
103         rm -f mdate-sh texinfo.tex
104         rm -f doc/stamp-vti
105         rm -f config.h.in~
106         find . -name Makefile.in -exec rm -f {} \; 
107         rm -f compile
108
109 .PHONY: all gettextize potfiles clean