pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smake patch to shorten icon generation output


From: John Darrington
Subject: Re: Smake patch to shorten icon generation output
Date: Sat, 16 Nov 2013 09:26:54 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Having the details of the icon conversion in a separate file seems like a good 
idea.

However, build-aux/svg2png should be a dependency of the %.png rule otherwise it
could be updated and Smake would never know about it.

J'

On Thu, Nov 14, 2013 at 09:35:45PM -0800, Ben Pfaff wrote:
     Do you think that the following patch is worthwhile?
     
     Thanks,
     
     Ben.
     
     --8<--------------------------cut here-------------------------->8--
     
     From: Ben Pfaff <address@hidden>
     Date: Thu, 14 Nov 2013 21:34:46 -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                 |    5 +----
      build-aux/automake.mk |    3 +++
      build-aux/svg2png     |    9 +++++++++
      4 files changed, 14 insertions(+), 4 deletions(-)
      create mode 100644 build-aux/automake.mk
      create mode 100755 build-aux/svg2png
     
     diff --git a/Makefile.am b/Makefile.am
     index 48ec507..a5a7d5c 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 3d06270..f70b7f4 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
        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 0000000..0641088
     --- /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 0000000..5c41840
     --- /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)"
     -- 
     1.7.10.4

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]