Layered split file for FREQUENCIES works.
[pspp] / Smake
diff --git a/Smake b/Smake
index caae02fd97718c881cd5bf6ef95f978b707a3fe7..8061b698f7ed4996909a370d02a43b2c6ea38fbe 100644 (file)
--- a/Smake
+++ b/Smake
@@ -24,6 +24,8 @@ all: everything
 GNULIB = ../gnulib
 GNULIB_TOOL = $(GNULIB)/gnulib-tool
 
+PYTHON3 = python3
+
 GNULIB_MODULES = \
        assert \
        byteswap \
@@ -43,9 +45,11 @@ GNULIB_MODULES = \
        crypto/rijndael \
        dirname \
        dtoastr \
+       dtotimespec \
        environ \
        fatal-signal \
        fcntl \
+       fnmatch \
        fpieee \
        fprintf-posix \
        full-read \
@@ -56,6 +60,7 @@ GNULIB_MODULES = \
        getline \
        getpass \
        gettext-h \
+       gettime \
        gettimeofday \
         getopt-gnu \
        gitlog-to-changelog \
@@ -105,6 +110,9 @@ GNULIB_MODULES = \
        sys_stat \
        tempname \
        termios \
+       timespec \
+       timespec-add \
+       timespec-sub \
        trunc \
        unicase/u8-casecmp \
        unicase/u8-casefold \
@@ -130,6 +138,7 @@ GNULIB_MODULES = \
        unitypes \
        unlocked-io \
        vasprintf-posix \
+       verify \
        version-etc \
        version-etc-fsf \
        vfprintf-posix \
@@ -147,11 +156,11 @@ GNULIB_MODULES = \
        xvasprintf
 
 APP_ICONS = \
-src/ui/gui/icons/16x16/apps/pspp.png \
-src/ui/gui/icons/32x32/apps/pspp.png \
-src/ui/gui/icons/48x48/apps/pspp.png \
-src/ui/gui/icons/256x256/apps/pspp.png \
-src/ui/gui/icons/scalable/apps/pspp.svg
+src/ui/gui/icons/16x16/apps/org.gnu.pspp.png \
+src/ui/gui/icons/32x32/apps/org.gnu.pspp.png \
+src/ui/gui/icons/48x48/apps/org.gnu.pspp.png \
+src/ui/gui/icons/256x256/apps/org.gnu.pspp.png \
+src/ui/gui/icons/scalable/apps/org.gnu.pspp.svg
 
 CATEGORY_ICONS = \
 src/ui/gui/icons/48x48/categories/align-left.png \
@@ -288,6 +297,9 @@ everything: prep_ph  icons
        $(MAKE) -f Smake Makefile.in configure
 
 icons: $(ICONS)
+clean-icons:
+       rm -f $(ICONS)
+.PHONY: icons clean-icons
 
 src/ui/gui/icons/manifest: $(MAKEFILE_LIST)
        $(RM) $@
@@ -306,11 +318,11 @@ src/ui/gui/icons/manifest: $(MAKEFILE_LIST)
        echo >> $@
 
 
-src/ui/gui/resources.xml: $(ICONS)
+src/ui/gui/resources.xml: $(MAKEFILE_LIST)
        printf '<?xml version="1.0" encoding="UTF-8"?>\n' > $@
        printf '<gresources>\n' >> $@
-       printf ' <gresource prefix="gnu/pspp">\n' >> $@
-       for x in $^; do \
+       printf ' <gresource prefix="org/gnu/pspp">\n' >> $@
+       for x in $(ICONS); do \
          z=`echo "$$x" | sed -e 's%src/ui/gui/%%'` ; \
          printf "  <file>$$z</file>\n" >> $@ ; \
        done
@@ -326,7 +338,8 @@ prep_ph:
        touch build-aux/config.rpath
        $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \
                --source-base=gl --lib=libgl --tests-base=tests \
-               --doc-base=gl/doc --aux-dir=build-aux  \
+               --doc-base=gl/doc --aux-dir=build-aux \
+               --makefile-name=automake.mk --automake-subdir \
                --libtool $(GNULIB_MODULES)
        if (glibtoolize --version) >/dev/null 2>&1; then        \
                LIBTOOLIZE=glibtoolize;                         \
@@ -378,7 +391,7 @@ po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                     \
 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po    \
 po/Makevars.template po/pspp.pot
 
-clean:
+clean: clean-icons
        rm -f config.sub config.guess config.rpath
        rm -fr autom4te.cache
        rm -f aclocal.m4
@@ -394,6 +407,7 @@ clean:
        rm -f config.h.in~
        rm -f config.h.in
        rm -f gl/Makefile.in
+       rm -f gl/automake.mk
        rm -f Makefile.in
        rm -f build-aux/compile
        rm -f build-aux/ltmain.sh
@@ -407,12 +421,6 @@ clean:
 .PHONY: all gettextize clean
 
 
-# The "convert" program from imagemagick can be used to create png from svg but doesn't properly deal
-# with the alpha channels.  Therefore, it is not recommended for production pspp builds, but might
-# be useful to get something working on a platform which doesn't have a working gimp.
-
-#svg2png=convert -background transparent $1 $3
-
 # Graphical layout of icons and our portfolio
 # ===========================================
 #
@@ -444,33 +452,35 @@ clean:
 #  => all others are in scaled (just one design svg)
 #
 
+SVG2PNG = PYTHON3='$(PYTHON3)' build-aux/svg2png
+
 # Rule for icons with size dependent graphical design
 src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 
 # Rules for icons which are simply scaled - Attention multitarget would trigger only once...
 src/ui/gui/icons/16x16/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/22x22/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/24x24/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/32x32/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/48x48/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/96x96/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 src/ui/gui/icons/256x256/%.png : src/ui/gui/artwork/scalable/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
        mkdir -p $(dir $@)
-       build-aux/svg2png "$<" "$(lastword $^)" "$@"
+       $(SVG2PNG) "$<" "$(lastword $^)" "$@"
 
 # Copy svg
 src/ui/gui/icons/%.svg: src/ui/gui/artwork/%.svg