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