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