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