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