Update version number to 0.10.5pre1, for translations.
[pspp.git] / Smake
blob99cde1e742e14dcecba1caba5df27213088acfac
1 # -*- makefile -*-
3 all: everything
5 # Adjust these to reflect where you've installed gnulib.
6 GNULIB = ../gnulib
7 GNULIB_TOOL = $(GNULIB)/gnulib-tool
9 GNULIB_MODULES = \
10         assert \
11         byteswap \
12         c-snprintf \
13         c-strcase \
14         c-strcasestr \
15         c-ctype \
16         c-strtod \
17         c-xvasprintf \
18         clean-temp \
19         close \
20         configmake \
21         count-one-bits \
22         crc \
23         crypto/md4 \
24         crypto/rijndael \
25         dirname \
26         dtoastr \
27         environ \
28         fatal-signal \
29         fcntl \
30         fpieee \
31         fprintf-posix \
32         full-read \
33         full-write \
34         fseeko \
35         ftello \
36         fwriteerror \
37         getline \
38         getpass \
39         gettext \
40         gettimeofday \
41         getopt-gnu \
42         gitlog-to-changelog \
43         include_next \
44         isfinite \
45         isinf \
46         isnan \
47         intprops \
48         inttostr \
49         localcharset \
50         mbchar \
51         mbiter \
52         memcasecmp \
53         memchr \
54         memchr2 \
55         mempcpy \
56         memrchr \
57         minmax \
58         mkdtemp \
59         mkstemp \
60         pipe2 \
61         printf-posix \
62         printf-safe \
63         progname \
64         rawmemchr \
65         read-file \
66         regex \
67         relocatable-prog \
68         rename \
69         round \
70         select \
71         snprintf \
72         snprintf-posix \
73         sprintf-posix \
74         stdarg \
75         stdbool \
76         stdint \
77         strcasestr \
78         stpcpy \
79         strerror \
80         strftime \
81         strsep \
82         strtod \
83         strtok_r \
84         sys_stat \
85         tempname \
86         termios \
87         trunc \
88         unicase/u8-casecmp \
89         unicase/u8-casefold \
90         unicase/u8-tolower \
91         unicase/u8-toupper \
92         unictype/ctype-print \
93         unictype/category-of \
94         unigbrk/uc-is-grapheme-break \
95         unilbrk/u8-possible-linebreaks \
96         uninorm/nfkd \
97         unistd \
98         unistr/u8-check \
99         unistr/u8-cpy \
100         unistr/u8-mblen \
101         unistr/u8-mbtouc \
102         unistr/u8-mbtoucr \
103         unistr/u8-strlen \
104         unistr/u8-strmbtouc \
105         unistr/u8-strncat \
106         unistr/u8-uctomb \
107         uniwidth/u8-strwidth \
108         unitypes \
109         unlocked-io \
110         vasprintf-posix \
111         version-etc \
112         version-etc-fsf \
113         vfprintf-posix \
114         vprintf-posix \
115         vsnprintf \
116         vsnprintf-posix \
117         vsprintf-posix \
118         xalloc \
119         xalloc-die \
120         xmalloca \
121         xmemdup0 \
122         xsize \
123         xstrndup \
124         xvasprintf
126 APP_ICONS = \
127 src/ui/gui/icons/32x32/apps/pspp.png \
128 src/ui/gui/icons/22x22/apps/pspp.png \
129 src/ui/gui/icons/24x24/apps/pspp.png \
130 src/ui/gui/icons/16x16/apps/pspp.png \
131 src/ui/gui/icons/48x48/apps/pspp.png \
132 src/ui/gui/icons/256x256/apps/pspp.png \
133 src/ui/gui/icons/scalable/apps/pspp.svg
135 CATEGORY_ICONS = \
136 src/ui/gui/icons/16x16/categories/align-left.png \
137 src/ui/gui/icons/16x16/categories/align-center.png \
138 src/ui/gui/icons/16x16/categories/align-right.png \
139 src/ui/gui/icons/16x16/categories/measure-scale.png \
140 src/ui/gui/icons/16x16/categories/measure-ordinal.png \
141 src/ui/gui/icons/16x16/categories/measure-nominal.png \
142 src/ui/gui/icons/16x16/categories/measure-date-scale.png \
143 src/ui/gui/icons/16x16/categories/measure-date-nominal.png \
144 src/ui/gui/icons/16x16/categories/measure-date-ordinal.png \
145 src/ui/gui/icons/16x16/categories/measure-time-scale.png \
146 src/ui/gui/icons/16x16/categories/measure-time-nominal.png \
147 src/ui/gui/icons/16x16/categories/measure-time-ordinal.png \
148 src/ui/gui/icons/16x16/categories/measure-string-nominal.png \
149 src/ui/gui/icons/16x16/categories/measure-string-ordinal.png \
150 src/ui/gui/icons/16x16/categories/measure-currency-scale.png \
151 src/ui/gui/icons/16x16/categories/measure-currency-nominal.png \
152 src/ui/gui/icons/16x16/categories/measure-currency-ordinal.png \
153 src/ui/gui/icons/16x16/categories/role-input.png \
154 src/ui/gui/icons/16x16/categories/role-target.png \
155 src/ui/gui/icons/16x16/categories/role-both.png \
156 src/ui/gui/icons/16x16/categories/role-none.png \
157 src/ui/gui/icons/16x16/categories/role-partition.png \
158 src/ui/gui/icons/16x16/categories/role-split.png
160 MIMETYPE_ICONS = \
161 src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \
162 src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \
163 src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \
164 src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \
165 src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \
166 src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \
167 src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \
168 src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \
169 src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \
170 src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \
171 src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \
172 src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \
173 src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \
174 src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \
175 src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \
176 src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png \
177 src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \
178 src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \
179 src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \
180 src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \
181 src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \
182 src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \
183 src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \
184 src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png
187 src/ui/gui/artwork/splash-t.svg: src/ui/gui/artwork/splash.svg
188         cp $< $@
190 src/ui/gui/artwork/splash-r.svg: src/ui/gui/artwork/splash.svg
191         sed -e '/inkscape:label="Overlay"/s/inline/none/' $< > $@
194 MISC_ICONS = src/ui/gui/icons/splash-t.png \
195         src/ui/gui/icons/splash-r.png
198 ACTION_ICONS = \
199 src/ui/gui/icons/32x32/actions/data-split-file.png \
200 src/ui/gui/icons/32x32/actions/data-select-cases.png \
201 src/ui/gui/icons/32x32/actions/data-weight-cases.png \
202 src/ui/gui/icons/32x32/actions/transform-compute.png \
203 src/ui/gui/icons/32x32/actions/edit-find.png \
204 src/ui/gui/icons/32x32/actions/edit-go-to-case.png \
205 src/ui/gui/icons/32x32/actions/edit-go-to-variable.png \
206 src/ui/gui/icons/32x32/actions/edit-insert-case.png \
207 src/ui/gui/icons/32x32/actions/edit-insert-variable.png \
208 src/ui/gui/icons/32x32/actions/edit-cut.png \
209 src/ui/gui/icons/32x32/actions/edit-copy.png \
210 src/ui/gui/icons/32x32/actions/edit-paste.png \
211 src/ui/gui/icons/32x32/actions/edit-undo.png \
212 src/ui/gui/icons/32x32/actions/edit-redo.png \
213 src/ui/gui/icons/32x32/actions/edit-select-all.png \
214 src/ui/gui/icons/32x32/actions/file-open-data.png \
215 src/ui/gui/icons/32x32/actions/file-save-data.png \
216 src/ui/gui/icons/32x32/actions/file-export-data.png \
217 src/ui/gui/icons/32x32/actions/file-print.png \
218 src/ui/gui/icons/32x32/actions/view-value-labels.png \
219 src/ui/gui/icons/32x32/actions/utilities-variables.png \
220 src/ui/gui/icons/32x32/actions/run-all.png \
221 src/ui/gui/icons/24x24/actions/data-split-file.png \
222 src/ui/gui/icons/24x24/actions/data-select-cases.png \
223 src/ui/gui/icons/24x24/actions/data-weight-cases.png \
224 src/ui/gui/icons/24x24/actions/transform-compute.png \
225 src/ui/gui/icons/24x24/actions/edit-find.png \
226 src/ui/gui/icons/24x24/actions/edit-go-to-case.png \
227 src/ui/gui/icons/24x24/actions/edit-go-to-variable.png \
228 src/ui/gui/icons/24x24/actions/edit-insert-case.png \
229 src/ui/gui/icons/24x24/actions/edit-insert-variable.png \
230 src/ui/gui/icons/24x24/actions/edit-cut.png \
231 src/ui/gui/icons/24x24/actions/edit-copy.png \
232 src/ui/gui/icons/24x24/actions/edit-paste.png \
233 src/ui/gui/icons/24x24/actions/edit-undo.png \
234 src/ui/gui/icons/24x24/actions/edit-redo.png \
235 src/ui/gui/icons/24x24/actions/edit-select-all.png \
236 src/ui/gui/icons/24x24/actions/file-open-data.png \
237 src/ui/gui/icons/24x24/actions/file-save-data.png \
238 src/ui/gui/icons/24x24/actions/file-export-data.png \
239 src/ui/gui/icons/24x24/actions/file-print.png \
240 src/ui/gui/icons/24x24/actions/view-value-labels.png \
241 src/ui/gui/icons/24x24/actions/utilities-variables.png \
242 src/ui/gui/icons/24x24/actions/run-all.png \
243 src/ui/gui/icons/16x16/actions/file-new-data.png \
244 src/ui/gui/icons/16x16/actions/file-syntax-data.png \
245 src/ui/gui/icons/16x16/actions/file-system-data.png \
246 src/ui/gui/icons/16x16/actions/file-open-data.png \
247 src/ui/gui/icons/16x16/actions/file-import-data.png \
248 src/ui/gui/icons/16x16/actions/file-export-data.png \
249 src/ui/gui/icons/16x16/actions/file-save-data.png \
250 src/ui/gui/icons/16x16/actions/file-save-as.png \
251 src/ui/gui/icons/16x16/actions/file-print.png \
252 src/ui/gui/icons/16x16/actions/file-rename-data-set.png \
253 src/ui/gui/icons/16x16/actions/file-display-information.png \
254 src/ui/gui/icons/16x16/actions/display-information-working-file.png \
255 src/ui/gui/icons/16x16/actions/display-information-external-file.png \
256 src/ui/gui/icons/16x16/actions/file-recently-used.png \
257 src/ui/gui/icons/16x16/actions/file-quit.png \
258 src/ui/gui/icons/16x16/actions/file-display-information.png \
259 src/ui/gui/icons/16x16/actions/edit-insert-variable.png \
260 src/ui/gui/icons/16x16/actions/edit-insert-case.png \
261 src/ui/gui/icons/16x16/actions/edit-go-to-variable.png \
262 src/ui/gui/icons/16x16/actions/edit-go-to-case.png \
263 src/ui/gui/icons/16x16/actions/edit-cut.png \
264 src/ui/gui/icons/16x16/actions/edit-copy.png \
265 src/ui/gui/icons/16x16/actions/edit-paste.png \
266 src/ui/gui/icons/16x16/actions/edit-delete.png \
267 src/ui/gui/icons/16x16/actions/edit-undo.png \
268 src/ui/gui/icons/16x16/actions/edit-redo.png \
269 src/ui/gui/icons/16x16/actions/edit-select-all.png \
270 src/ui/gui/icons/16x16/actions/edit-clear.png \
271 src/ui/gui/icons/16x16/actions/edit-find.png \
272 src/ui/gui/icons/16x16/actions/view-font.png \
273 src/ui/gui/icons/16x16/actions/view-value-labels.png \
274 src/ui/gui/icons/16x16/actions/data-sort-cases.png \
275 src/ui/gui/icons/16x16/actions/data-transpose.png \
276 src/ui/gui/icons/16x16/actions/data-aggregate.png \
277 src/ui/gui/icons/16x16/actions/data-split-file.png \
278 src/ui/gui/icons/16x16/actions/data-select-cases.png \
279 src/ui/gui/icons/16x16/actions/data-weight-cases.png \
280 src/ui/gui/icons/16x16/actions/run-all.png \
281 src/ui/gui/icons/16x16/actions/run-selection.png \
282 src/ui/gui/icons/16x16/actions/run-current-line.png \
283 src/ui/gui/icons/16x16/actions/run-to-end.png \
284 src/ui/gui/icons/16x16/actions/transform-compute.png \
285 src/ui/gui/icons/16x16/actions/transform-count.png \
286 src/ui/gui/icons/16x16/actions/transform-rank-cases.png \
287 src/ui/gui/icons/16x16/actions/transform-automatic-recode.png \
288 src/ui/gui/icons/16x16/actions/transform-in-to-same-variables.png \
289 src/ui/gui/icons/16x16/actions/transform-in-to-different-variables.png \
290 src/ui/gui/icons/16x16/actions/transform-run-pending.png \
291 src/ui/gui/icons/16x16/actions/analyze-descriptive-statistics.png \
292 src/ui/gui/icons/16x16/actions/analyze-compare-means.png \
293 src/ui/gui/icons/16x16/actions/analyze-univariate-analysis.png \
294 src/ui/gui/icons/16x16/actions/analyze-bivariate-correlation.png \
295 src/ui/gui/icons/16x16/actions/analyze-kmeans-cluster.png \
296 src/ui/gui/icons/16x16/actions/analyze-factor-analysis.png \
297 src/ui/gui/icons/16x16/actions/analyze-reliability.png \
298 src/ui/gui/icons/16x16/actions/analyze-regression.png \
299 src/ui/gui/icons/16x16/actions/analyze-non-parametric-statistics.png \
300 src/ui/gui/icons/16x16/actions/analyze-roc-curve.png \
301 src/ui/gui/icons/16x16/actions/utilities-variables.png \
302 src/ui/gui/icons/16x16/actions/utilities-data-file-comments.png \
303 src/ui/gui/icons/16x16/actions/windows-minimize-all.png \
304 src/ui/gui/icons/16x16/actions/windows-split.png \
305 src/ui/gui/icons/16x16/actions/help-reference-manual.png \
306 src/ui/gui/icons/16x16/actions/help-about.png
309 ICONS=$(CATEGORY_ICONS) $(ACTION_ICONS) $(MIMETYPE_ICONS) $(APP_ICONS) $(MISC_ICONS)
311 everything: prep_ph  icons
312         $(MAKE) -f Smake Makefile.in configure
314 icons: $(ICONS)
316 src/ui/gui/icons/manifest: $(MAKEFILE_LIST)
317         $(RM) $@
318         printf '# This is a generated file. Do not edit.\n' >> $@
319         printf 'icons =' >> $@
320         for i in  $(ICONS); do \
321                 printf ' \\\n\t '$$i >> $@; \
322         done
323         echo >> $@
324         echo >> $@
325         printf 'icon_srcs = ' >> $@
326         for i in  $(ICONS); do \
327                 printf ' \\\n\t ' >> $@ ;\
328                 printf $$i | awk '{ gsub(".png",".svg")gsub("icons","artwork");printf $$0}' >> $@ ; \
329         done
330         echo ' ' >> $@
331         echo >> $@
334 src/ui/gui/resources.xml: $(ICONS)
335         printf '<?xml version="1.0" encoding="UTF-8"?>\n' > $@
336         printf '<gresources>\n' >> $@
337         printf ' <gresource prefix="gnu/pspp">\n' >> $@
338         for x in $^; do \
339           z=`echo "$$x" | sed -e 's%src/ui/gui/%%'` ; \
340           printf "  <file>$$z</file>\n" >> $@ ; \
341         done
342         printf ' </gresource>\n' >> $@
343         printf '</gresources>\n' >> $@
346 .PHONY: prep_ph
347 prep_ph: 
348         test -e ChangeLog || touch ChangeLog
349         test -d m4 || mkdir m4
350         touch m4/Makefile.am
351         $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \
352                 --source-base=gl --lib=libgl --tests-base=tests \
353                 --doc-base=gl/doc --aux-dir=build-aux  \
354                 --libtool $(GNULIB_MODULES)
355         if (glibtoolize --version) >/dev/null 2>&1; then        \
356                 LIBTOOLIZE=glibtoolize;                         \
357         elif (libtoolize --version) >/dev/null 2>&1; then       \
358                 LIBTOOLIZE=libtoolize;                          \
359         else                                                    \
360                 echo >&2 "libtoolize not found";                \
361                 exit 1;                                         \
362         fi;                                                     \
363         $$LIBTOOLIZE --force --automake --copy
365 aclocal.m4:
366         aclocal -I m4 -I gl/m4
368 configure: configure.ac aclocal.m4
369         autoconf || rm $@  # autoconf 2.69 has (what I think is) a bug.  It will create configure even when failure is detected.
371 config.h.in: configure.ac
372         autoheader
374 Makefile.in: Makefile.am config.h.in aclocal.m4 src/ui/gui/resources.xml src/ui/gui/icons/manifest
375         automake --add-missing --copy --no-force --include-deps
378 gettextize:
379         test -d m4 || mkdir m4
380         touch m4/Makefile.am
381         gettextize --force --no-changelog
383 check: all
384         rm -rf _check
385         mkdir _check
386         cd _check && ../configure $(CONFIGUREFLAGS)
387         cd _check && make distcheck
388         rm -rf _check
390 _build: all
391         test -d _build || mkdir _build
392         cd _build && ../configure $(CONFIGUREFLAGS)
394 _debug: all
395         test -d _debug || mkdir _debug
396         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
400 PO_FILES = po/Rules-quot po/boldquot.sed \
401 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
402 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
403 po/Makevars.template po/pspp.pot
405 clean:
406         rm -f config.sub config.guess config.rpath
407         rm -fr autom4te.cache
408         rm -f aclocal.m4
409         rm -f missing mkinstalldirs
410         rm -f install-sh
411         rm -f configure Makefile 
412         rm -f depcomp
413         rm -rf intl gl
414         rm -f m4/*.m4
415         rm -f $(PO_FILES) po/*.gmo 
416         rm -f mdate-sh texinfo.tex
417         rm -f doc/stamp-vti
418         rm -f config.h.in~
419         rm -f config.h.in
420         rm -f gl/Makefile.in
421         rm -f Makefile.in
422         rm -f compile
423         rm -f ltmain.sh
424         rm -f reloc-ldflags install-reloc
426 .PHONY: all gettextize clean
429 # The "convert" program from imagemagick can be used to create png from svg but doesn't properly deal
430 # with the alpha channels.  Therefore, it is not recommended for production pspp builds, but might
431 # be useful to get something working on a platform which doesn't have a working gimp.
433 #svg2png=convert -background transparent $1 $3
435 src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
436         mkdir -p $(dir $@)
437         build-aux/svg2png "$<" "$(lastword $^)" "$@"
440 src/ui/gui/icons/%.svg: src/ui/gui/artwork/%.svg
441         mkdir -p $(dir $@)
442         cp $< $@