From 36066cdc33572b2297f2df8743c4c00c0f04bf45 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 16 Nov 2013 09:47:20 -0800 Subject: [PATCH] Smake: Break svg2png out as separate script. This makes the output of "make -f Smake" shorter and easier to read. --- Makefile.am | 1 + Smake | 7 ++----- build-aux/automake.mk | 3 +++ build-aux/svg2png | 9 +++++++++ 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 build-aux/automake.mk create mode 100755 build-aux/svg2png diff --git a/Makefile.am b/Makefile.am index 48ec507366..a5a7d5c79e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,6 +59,7 @@ generate-changelog: DIST_HOOKS += generate-changelog +include $(top_srcdir)/build-aux/automake.mk include $(top_srcdir)/po/automake.mk include $(top_srcdir)/lib/automake.mk include $(top_srcdir)/doc/automake.mk diff --git a/Smake b/Smake index 3d06270160..e976e46379 100644 --- a/Smake +++ b/Smake @@ -440,12 +440,9 @@ clean: #svg2png=convert -background transparent $1 $3 -svg2png=gimp -i -b '(let* ((image (car (gimp-file-load 1 "$1" "$1")))) (gimp-image-attach-parasite image (list "gimp-comment" 0 "$(shell cat $2)")) (gimp-file-save 1 image (car (gimp-image-get-active-drawable image)) "$3" "$3")) (gimp-quit 1)' - - -src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg src/ui/gui/icons/COPYING_CCBYSA3 +src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3 mkdir -p $(dir $@) - $(call svg2png,$<,$(lastword $^),$@) + build-aux/svg2png "$<" "$(lastword $^)" "$@" src/ui/gui/icons/%.svg: src/ui/gui/artwork/%.svg diff --git a/build-aux/automake.mk b/build-aux/automake.mk new file mode 100644 index 0000000000..06410885ac --- /dev/null +++ b/build-aux/automake.mk @@ -0,0 +1,3 @@ +## Process this file with automake to produce Makefile.in -*- makefile -*- + +EXTRA_DIST += build-aux/svg2png diff --git a/build-aux/svg2png b/build-aux/svg2png new file mode 100755 index 0000000000..5c41840c51 --- /dev/null +++ b/build-aux/svg2png @@ -0,0 +1,9 @@ +#! /bin/sh + +comment=`cat $2` +gimp -i -b "\ +(let* ((image (car (gimp-file-load 1 \"$1\" \"$1\")))) + (gimp-image-attach-parasite image (list \"gimp-comment\" 0 \"$comment\")) + (gimp-file-save 1 image (car (gimp-image-get-active-drawable image)) + \"$3\" \"$3\")) + (gimp-quit 1)" -- 2.30.2