lexer: Reimplement for better testability and internationalization.
[pspp] / 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         clean-temp \
13         close \
14         configmake \
15         count-one-bits \
16         crc \
17         crypto/md4 \
18         crypto/md5 \
19         dirname \
20         dtoastr \
21         environ \
22         fatal-signal \
23         fcntl \
24         fpieee \
25         fprintf-posix \
26         full-read \
27         full-write \
28         fseeko \
29         ftello \
30         fwriteerror \
31         getline \
32         gettext-h \
33         gettimeofday \
34         getopt-gnu \
35         gitlog-to-changelog \
36         isfinite \
37         isinf \
38         isnan \
39         intprops \
40         inttostr \
41         localcharset \
42         mbchar \
43         memcasecmp \
44         memchr \
45         mempcpy \
46         minmax \
47         mkdtemp \
48         mkstemp \
49         printf-posix \
50         printf-safe \
51         progname \
52         rawmemchr \
53         read-file \
54         regex \
55         relocatable-prog \
56         rename \
57         round \
58         snprintf \
59         snprintf-posix \
60         sprintf-posix \
61         stdarg \
62         stdbool \
63         stdint \
64         stpcpy \
65         strcase \
66         strerror \
67         strftime \
68         strtod \
69         strtok_r \
70         strtol \
71         strtoul \
72         sys_stat \
73         tempname \
74         trunc \
75         unictype/ctype-print \
76         unictype/property-id-continue \
77         unictype/property-id-start \
78         unigbrk/uc-is-grapheme-break \
79         unistd \
80         unistr/u8-check \
81         unistr/u8-cpy \
82         unistr/u8-mbtouc \
83         unistr/u8-strlen \
84         unistr/u8-strmbtouc \
85         unistr/u8-strncat \
86         uniwidth/u8-strwidth \
87         unitypes \
88         unlocked-io \
89         vasprintf-posix \
90         version-etc \
91         version-etc-fsf \
92         vfprintf-posix \
93         vprintf-posix \
94         vsnprintf \
95         vsnprintf-posix \
96         vsprintf-posix \
97         xalloc \
98         xalloc-die \
99         xmalloca \
100         xmemdup0 \
101         xsize \
102         xstrndup \
103         xvasprintf
104
105 all: 
106         test -e ChangeLog || touch ChangeLog
107         test -d m4 || mkdir m4
108         touch m4/Makefile.am
109         $(MAKE) -f Smake gnulib
110         libtoolize --force --automake
111         aclocal -I m4 -I gl/m4
112         autoconf
113         autoheader
114         automake --add-missing --copy --no-force
115
116 gnulib:
117         $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \
118                 --source-base=gl --lib=libgl --tests-base=tests \
119                 --doc-base=gl/doc --aux-dir=build-aux --import \
120                 --libtool $(GNULIB_MODULES)
121
122
123 gettextize:
124         test -d m4 || mkdir m4
125         touch m4/Makefile.am
126         gettextize --force --no-changelog
127
128 check: all
129         rm -rf _check
130         mkdir _check
131         cd _check && ../configure $(CONFIGUREFLAGS)
132         cd _check && make distcheck
133         rm -rf _check
134
135 _build: all
136         test -d _build || mkdir _build
137         cd _build && ../configure $(CONFIGUREFLAGS)
138
139 _debug: all
140         test -d _debug || mkdir _debug
141         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
142
143 PO_FILES = po/ChangeLog \
144 po/Rules-quot po/boldquot.sed           \
145 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
146 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
147 po/Makevars.template po/pspp.pot
148
149 clean:
150         rm -f config.sub config.guess config.rpath
151         rm -fr autom4te.cache
152         rm -f aclocal.m4
153         rm -f missing mkinstalldirs
154         rm -f install-sh
155         rm -f configure Makefile 
156         rm -f depcomp
157         rm -rf intl gl
158         rm -f m4/*.m4
159         rm -f $(PO_FILES) po/*.gmo 
160         rm -f mdate-sh texinfo.tex
161         rm -f doc/stamp-vti
162         rm -f config.h.in~
163         rm -f config.h.in
164         find . -name Makefile.in -exec rm -f {} \; 
165         rm -f compile
166         rm -f ltmain.sh
167         rm -f reloc-ldflags install-reloc
168
169 .PHONY: all gettextize clean