Reformat GNULIB_MODULES list to make it more maintainable.
[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         stpcpy \
34         strcase \
35         strcspn \
36         strerror \
37         strftime \
38         strstr \
39         strtod \
40         strtok_r \
41         strtol \
42         strtoul \
43         unistd \
44         vsnprintf \
45         xalloc \
46         xalloc-die \
47         xreadlink \
48         xvasprintf
49
50 all: po/POTFILES.in
51         test -d m4 || mkdir m4
52         touch m4/Makefile.am
53         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
54                 --source-base=gl --lib=libgl --tests-base=tests \
55                 --import $(GNULIB_MODULES)
56         autoreconf --install
57
58 gettextize:
59         test -d m4 || mkdir m4
60         touch m4/Makefile.am
61         gettextize -f -c --intl --no-changelog
62
63 po/POTFILES.in:
64         for f in `find src -name \*.[qc] ! -name .\* -print \
65                   | sed 's/\.[qc]$$//'`; do \
66                 if test $$f = src/libpspp/version.c; then break; fi;              \
67                 if test -e $$f.q; then echo $$f.q; else echo $$f.c; fi    \
68         done | sort | uniq > $@.tmp
69         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
70         rm -f $@.tmp
71
72 check: all
73         rm -rf _check
74         mkdir _check
75         cd _check && ../configure $(CONFIGUREFLAGS)
76         cd _check && make distcheck
77         rm -rf _check
78
79 _build: all
80         test -d _build || mkdir _build
81         cd _build && ../configure $(CONFIGUREFLAGS)
82
83 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
84 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
85 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
86 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
87 po/Makevars.template
88
89 clean:
90         rm -f config.sub config.guess config.rpath
91         rm -f ABOUT-NLS
92         rm -fr autom4te.cache
93         rm -f aclocal.m4
94         rm -f missing mkinstalldirs
95         rm -f install-sh
96         rm -f configure Makefile 
97         rm -f depcomp
98         rm -rf intl gl
99         rm -f m4/*.m4
100         rm -f $(PO_FILES)
101         rm -f mdate-sh texinfo.tex
102         rm -f doc/stamp-vti
103         rm -f config.h.in~
104         find . -name Makefile.in -exec rm -f {} \; 
105         rm -f compile
106
107 .PHONY: all gettextize potfiles clean