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