3 # PSPP - a program for statistical analysis.
4 # Copyright (C) 2017 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 # Adjust these to reflect where you've installed gnulib.
25 GNULIB_TOOL = $(GNULIB)/gnulib-tool
116 unicase/u8-casefold \
120 unictype/ctype-print \
121 unictype/category-of \
122 unigbrk/uc-is-grapheme-break \
123 unilbrk/u8-possible-linebreaks \
132 unistr/u8-strmbtouc \
135 uniwidth/u8-strwidth \
157 src/ui/gui/icons/16x16/apps/org.fsf.pspp.png \
158 src/ui/gui/icons/32x32/apps/org.fsf.pspp.png \
159 src/ui/gui/icons/48x48/apps/org.fsf.pspp.png \
160 src/ui/gui/icons/256x256/apps/org.fsf.pspp.png \
161 src/ui/gui/icons/scalable/apps/org.fsf.pspp.svg
164 src/ui/gui/icons/48x48/categories/align-left.png \
165 src/ui/gui/icons/48x48/categories/align-center.png \
166 src/ui/gui/icons/48x48/categories/align-right.png \
167 src/ui/gui/icons/48x48/categories/measure-scale.png \
168 src/ui/gui/icons/48x48/categories/measure-ordinal.png \
169 src/ui/gui/icons/48x48/categories/measure-nominal.png \
170 src/ui/gui/icons/48x48/categories/measure-date-scale.png \
171 src/ui/gui/icons/48x48/categories/measure-date-nominal.png \
172 src/ui/gui/icons/48x48/categories/measure-date-ordinal.png \
173 src/ui/gui/icons/48x48/categories/measure-time-scale.png \
174 src/ui/gui/icons/48x48/categories/measure-time-nominal.png \
175 src/ui/gui/icons/48x48/categories/measure-time-ordinal.png \
176 src/ui/gui/icons/48x48/categories/measure-string-nominal.png \
177 src/ui/gui/icons/48x48/categories/measure-string-ordinal.png \
178 src/ui/gui/icons/48x48/categories/measure-currency-scale.png \
179 src/ui/gui/icons/48x48/categories/measure-currency-nominal.png \
180 src/ui/gui/icons/48x48/categories/measure-currency-ordinal.png \
181 src/ui/gui/icons/48x48/categories/role-input.png \
182 src/ui/gui/icons/48x48/categories/role-target.png \
183 src/ui/gui/icons/48x48/categories/role-both.png \
184 src/ui/gui/icons/48x48/categories/role-none.png \
185 src/ui/gui/icons/48x48/categories/role-partition.png \
186 src/ui/gui/icons/48x48/categories/role-split.png \
187 src/ui/gui/icons/scalable/categories/align-left.svg \
188 src/ui/gui/icons/scalable/categories/align-center.svg \
189 src/ui/gui/icons/scalable/categories/align-right.svg \
190 src/ui/gui/icons/scalable/categories/measure-scale.svg \
191 src/ui/gui/icons/scalable/categories/measure-ordinal.svg \
192 src/ui/gui/icons/scalable/categories/measure-nominal.svg \
193 src/ui/gui/icons/scalable/categories/measure-date-scale.svg \
194 src/ui/gui/icons/scalable/categories/measure-date-nominal.svg \
195 src/ui/gui/icons/scalable/categories/measure-date-ordinal.svg \
196 src/ui/gui/icons/scalable/categories/measure-time-scale.svg \
197 src/ui/gui/icons/scalable/categories/measure-time-nominal.svg \
198 src/ui/gui/icons/scalable/categories/measure-time-ordinal.svg \
199 src/ui/gui/icons/scalable/categories/measure-string-nominal.svg \
200 src/ui/gui/icons/scalable/categories/measure-string-ordinal.svg \
201 src/ui/gui/icons/scalable/categories/measure-currency-scale.svg \
202 src/ui/gui/icons/scalable/categories/measure-currency-nominal.svg \
203 src/ui/gui/icons/scalable/categories/measure-currency-ordinal.svg \
204 src/ui/gui/icons/scalable/categories/role-input.svg \
205 src/ui/gui/icons/scalable/categories/role-target.svg \
206 src/ui/gui/icons/scalable/categories/role-both.svg \
207 src/ui/gui/icons/scalable/categories/role-none.svg \
208 src/ui/gui/icons/scalable/categories/role-partition.svg \
209 src/ui/gui/icons/scalable/categories/role-split.svg
211 # Mimetype icons have size dependent layouts
213 src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \
214 src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \
215 src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \
216 src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \
217 src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \
218 src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \
219 src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \
220 src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \
221 src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \
222 src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \
223 src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \
224 src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \
225 src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \
226 src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \
227 src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \
228 src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \
229 src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \
230 src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \
231 src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \
232 src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png \
233 src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \
234 src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \
235 src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \
236 src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png
238 src/ui/gui/artwork/splash-t.svg: src/ui/gui/artwork/splash.svg
241 src/ui/gui/artwork/splash-r.svg: src/ui/gui/artwork/splash.svg
242 sed -e '/inkscape:label="Overlay"/s/inline/none/' $< > $@
244 MISC_ICONS = src/ui/gui/icons/splash-t.png \
245 src/ui/gui/icons/splash-r.png
248 src/ui/gui/icons/24x24/actions/pspp-file-open-data.png \
249 src/ui/gui/icons/24x24/actions/pspp-file-save-data.png \
250 src/ui/gui/icons/24x24/actions/pspp-edit-go-to-variable.png \
251 src/ui/gui/icons/24x24/actions/pspp-edit-go-to-case.png \
252 src/ui/gui/icons/24x24/actions/pspp-edit-find.png \
253 src/ui/gui/icons/24x24/actions/pspp-edit-insert-case.png \
254 src/ui/gui/icons/24x24/actions/pspp-edit-insert-variable.png \
255 src/ui/gui/icons/24x24/actions/pspp-data-split-file.png \
256 src/ui/gui/icons/24x24/actions/pspp-data-weight-cases.png \
257 src/ui/gui/icons/24x24/actions/pspp-view-value-labels.png \
258 src/ui/gui/icons/48x48/actions/pspp-file-open-data.png \
259 src/ui/gui/icons/48x48/actions/pspp-file-save-data.png \
260 src/ui/gui/icons/48x48/actions/pspp-edit-go-to-variable.png \
261 src/ui/gui/icons/48x48/actions/pspp-edit-go-to-case.png \
262 src/ui/gui/icons/48x48/actions/pspp-edit-find.png \
263 src/ui/gui/icons/48x48/actions/pspp-edit-insert-case.png \
264 src/ui/gui/icons/48x48/actions/pspp-edit-insert-variable.png \
265 src/ui/gui/icons/48x48/actions/pspp-data-split-file.png \
266 src/ui/gui/icons/48x48/actions/pspp-data-weight-cases.png \
267 src/ui/gui/icons/48x48/actions/pspp-view-value-labels.png \
268 src/ui/gui/icons/96x96/actions/pspp-file-open-data.png \
269 src/ui/gui/icons/96x96/actions/pspp-file-save-data.png \
270 src/ui/gui/icons/96x96/actions/pspp-edit-go-to-variable.png \
271 src/ui/gui/icons/96x96/actions/pspp-edit-go-to-case.png \
272 src/ui/gui/icons/96x96/actions/pspp-edit-find.png \
273 src/ui/gui/icons/96x96/actions/pspp-edit-insert-case.png \
274 src/ui/gui/icons/96x96/actions/pspp-edit-insert-variable.png \
275 src/ui/gui/icons/96x96/actions/pspp-data-split-file.png \
276 src/ui/gui/icons/96x96/actions/pspp-data-weight-cases.png \
277 src/ui/gui/icons/96x96/actions/pspp-view-value-labels.png \
278 src/ui/gui/icons/scalable/actions/pspp-file-open-data.svg \
279 src/ui/gui/icons/scalable/actions/pspp-file-save-data.svg \
280 src/ui/gui/icons/scalable/actions/pspp-edit-go-to-variable.svg \
281 src/ui/gui/icons/scalable/actions/pspp-edit-go-to-case.svg \
282 src/ui/gui/icons/scalable/actions/pspp-edit-find.svg \
283 src/ui/gui/icons/scalable/actions/pspp-edit-insert-case.svg \
284 src/ui/gui/icons/scalable/actions/pspp-edit-insert-variable.svg \
285 src/ui/gui/icons/scalable/actions/pspp-data-split-file.svg \
286 src/ui/gui/icons/scalable/actions/pspp-data-weight-cases.svg \
287 src/ui/gui/icons/scalable/actions/pspp-view-value-labels.svg
289 ICONS=$(CATEGORY_ICONS) $(ACTION_ICONS) $(MIMETYPE_ICONS) $(APP_ICONS) $(MISC_ICONS)
291 ICON_SOURCES = $(wildcard src/ui/gui/artwork/*/*/*.svg)
292 ICON_SOURCES += $(wildcard src/ui/gui/artwork/splash*.svg)
294 everything: prep_ph icons
295 $(MAKE) -f Smake Makefile.in configure
300 .PHONY: icons clean-icons
302 src/ui/gui/icons/manifest: $(MAKEFILE_LIST)
304 printf '# This is a generated file. Do not edit.\n' >> $@
305 printf 'icons =' >> $@
306 for i in $(ICONS); do \
307 printf ' \\\n\t '$$i >> $@; \
311 printf 'icon_srcs = ' >> $@
312 for i in $(ICON_SOURCES); do \
313 printf ' \\\n\t '$$i >> $@ ;\
319 src/ui/gui/resources.xml: $(ICONS)
320 printf '<?xml version="1.0" encoding="UTF-8"?>\n' > $@
321 printf '<gresources>\n' >> $@
322 printf ' <gresource prefix="gnu/pspp">\n' >> $@
324 z=`echo "$$x" | sed -e 's%src/ui/gui/%%'` ; \
325 printf " <file>$$z</file>\n" >> $@ ; \
327 printf ' </gresource>\n' >> $@
328 printf '</gresources>\n' >> $@
333 test -e ChangeLog || touch ChangeLog
334 test -d m4 || mkdir m4
336 touch build-aux/config.rpath
337 $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \
338 --source-base=gl --lib=libgl --tests-base=tests \
339 --doc-base=gl/doc --aux-dir=build-aux \
340 --makefile-name=automake.mk --automake-subdir \
341 --libtool $(GNULIB_MODULES)
342 if (glibtoolize --version) >/dev/null 2>&1; then \
343 LIBTOOLIZE=glibtoolize; \
344 elif (libtoolize --version) >/dev/null 2>&1; then \
345 LIBTOOLIZE=libtoolize; \
347 echo >&2 "libtoolize not found"; \
350 $$LIBTOOLIZE --force --automake --copy
353 aclocal -I m4 -I gl/m4
355 configure: configure.ac aclocal.m4
356 autoconf || rm $@ # autoconf 2.69 has (what I think is) a bug. It will create configure even when failure is detected.
358 config.h.in: configure.ac
361 Makefile.in: Makefile.am config.h.in aclocal.m4 src/ui/gui/resources.xml src/ui/gui/icons/manifest
362 automake --add-missing --copy --no-force --include-deps
366 test -d m4 || mkdir m4
368 gettextize --force --no-changelog
373 cd _check && ../configure $(CONFIGUREFLAGS)
374 cd _check && make distcheck
378 test -d _build || mkdir _build
379 cd _build && ../configure $(CONFIGUREFLAGS)
382 test -d _debug || mkdir _debug
383 cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
387 PO_FILES = po/Rules-quot po/boldquot.sed \
388 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header \
389 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po \
390 po/Makevars.template po/pspp.pot
393 rm -f config.sub config.guess config.rpath
394 rm -fr autom4te.cache
396 rm -f missing mkinstalldirs
398 rm -f configure Makefile
402 rm -f $(PO_FILES) po/*.gmo
403 rm -f mdate-sh texinfo.tex
410 rm -f build-aux/compile
411 rm -f build-aux/ltmain.sh
412 rm -f build-aux/reloc-ldflags
413 rm -f build-aux/install-reloc
414 rm -f build-aux/config.rpath
415 rm -f build-aux/config.libpath
416 rm -f build-aux/libtool-reloc
417 rm -f build-aux/gitlog-to-changelog
419 .PHONY: all gettextize clean
422 # The "convert" program from imagemagick can be used to create png from svg but doesn't properly deal
423 # with the alpha channels. Therefore, it is not recommended for production pspp builds, but might
424 # be useful to get something working on a platform which doesn't have a working gimp.
426 #svg2png=convert -background transparent $1 $3
428 # Graphical layout of icons and our portfolio
429 # ===========================================
431 # We have two different kinds of icons in our artwork collection
433 # a) The mimetype icons have a different graphical layout depending on resolution
434 # This assumes that a higher resolution means a bigger size. On the bigger
435 # size you can identify more details and this is used in the design.
436 # b) Icons which are designed based on 16x16 pixels which are just scaled
437 # This are all other icons.
441 # The different icon resolutions are historically derived for bitmaps when an icon
442 # is displayed in different sizes. Then a scaled version of the icon requires a new
443 # bitmap image. All our icons are now svg type and can be scaled from one svg file as
444 # the names suggests - scalable vector format.
446 # The strategy for pspp gui
448 # All icons which are simply scaled provide a default 48x48 bitmap png image plus
449 # an svg version in the scalable directory.
450 # The mimetype icons with different layouts provide png bitmaps in their original resolutions
452 # The artwork directory contains only the pure source svg files. No copies and no
453 # version has another size indication although it is an svg.
455 # => mimetype icons are located in 16x16, 32x32, ... , 256x256 (different designs)
456 # => all others are in scaled (just one design svg)
459 # Rule for icons with size dependent graphical design
460 src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
462 build-aux/svg2png "$<" "$(lastword $^)" "$@"
464 # Rules for icons which are simply scaled - Attention multitarget would trigger only once...
465 src/ui/gui/icons/16x16/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
467 build-aux/svg2png "$<" "$(lastword $^)" "$@"
468 src/ui/gui/icons/22x22/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
470 build-aux/svg2png "$<" "$(lastword $^)" "$@"
471 src/ui/gui/icons/24x24/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
473 build-aux/svg2png "$<" "$(lastword $^)" "$@"
474 src/ui/gui/icons/32x32/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
476 build-aux/svg2png "$<" "$(lastword $^)" "$@"
477 src/ui/gui/icons/48x48/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
479 build-aux/svg2png "$<" "$(lastword $^)" "$@"
480 src/ui/gui/icons/96x96/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
482 build-aux/svg2png "$<" "$(lastword $^)" "$@"
483 src/ui/gui/icons/256x256/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
485 build-aux/svg2png "$<" "$(lastword $^)" "$@"
488 src/ui/gui/icons/%.svg: src/ui/gui/artwork/%.svg