X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Smake;h=8061b698f7ed4996909a370d02a43b2c6ea38fbe;hb=3facf6314da231910f60a53805916e879b1782e9;hp=bded601daf899fdd56298496c73284316f9c0d2a;hpb=32af4826ef82cd3ea8b92ddac2e10ae019fe1bce;p=pspp diff --git a/Smake b/Smake index bded601daf..8061b698f7 100644 --- 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 \ @@ -55,7 +59,8 @@ GNULIB_MODULES = \ fwriteerror \ getline \ getpass \ - gettext \ + gettext-h \ + gettime \ gettimeofday \ getopt-gnu \ gitlog-to-changelog \ @@ -66,6 +71,7 @@ GNULIB_MODULES = \ intprops \ inttostr \ localcharset \ + localename \ mbchar \ mbiter \ memcasecmp \ @@ -97,13 +103,16 @@ GNULIB_MODULES = \ strcasestr \ stpcpy \ strerror \ - strftime \ + nstrftime \ strsep \ strtod \ strtok_r \ sys_stat \ tempname \ termios \ + timespec \ + timespec-add \ + timespec-sub \ trunc \ unicase/u8-casecmp \ unicase/u8-casefold \ @@ -129,6 +138,7 @@ GNULIB_MODULES = \ unitypes \ unlocked-io \ vasprintf-posix \ + verify \ version-etc \ version-etc-fsf \ vfprintf-posix \ @@ -138,6 +148,7 @@ GNULIB_MODULES = \ vsprintf-posix \ xalloc \ xalloc-die \ + xbinary-io \ xmalloca \ xmemdup0 \ xsize \ @@ -145,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 \ @@ -286,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) $@ @@ -304,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 '\n' > $@ printf '\n' >> $@ - printf ' \n' >> $@ - for x in $^; do \ + printf ' \n' >> $@ + for x in $(ICONS); do \ z=`echo "$$x" | sed -e 's%src/ui/gui/%%'` ; \ printf " $$z\n" >> $@ ; \ done @@ -321,9 +335,11 @@ prep_ph: test -e ChangeLog || touch ChangeLog test -d m4 || mkdir m4 touch m4/Makefile.am + 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; \ @@ -375,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 @@ -391,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 @@ -404,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 # =========================================== # @@ -441,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