Ticket #303: clean_pngs

File clean_pngs, 1.8 KB (added by Pini, 13 years ago)
Line 
1Index: navit-0.1.1.~svn2032/navit/xpm/Makefile.am
2===================================================================
3--- navit-0.1.1.~svn2032.orig/navit/xpm/Makefile.am     2009-02-13 00:19:17.000000000 +0100
4+++ navit-0.1.1.~svn2032/navit/xpm/Makefile.am  2009-02-13 00:24:45.000000000 +0100
5@@ -181,19 +181,20 @@
6 if USE_SVG2PNG
7 %.png:$(srcdir)/*.svg
8        SRCDIR=$(srcdir) $(srcdir)/navit_svg2png "@SVG2PNG@" "$@"
9-xpm_DATA += $(addsuffix .png,$(basename $(svgs)))
10+pngs = $(addsuffix .png,$(basename $(svgs)))
11 xsize=$(firstword $(subst x, ,$(scale)))
12 ysize=$(lastword $(subst x, ,$(scale)))
13 comma=,
14 if USE_SVG2PNG_SCALES
15-xpm_DATA += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(svgs))))
16+pngs += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(svgs))))
17 endif
18 if USE_SVG2PNG_SCALES_FLAG
19-xpm_DATA += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES_FLAG@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(flag_svgs))))
20+pngs += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES_FLAG@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(flag_svgs))))
21 endif
22 if USE_SVG2PNG_SCALES_NAV
23-xpm_DATA += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES_NAV@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(nav_svgs))))
24+pngs += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES_NAV@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(nav_svgs))))
25 endif
26+xpm_DATA += $(pngs)
27 endif
28 
29 DESKTOPFILEdir=$(datadir)/applications
30@@ -208,3 +209,8 @@
31 EXTRA_DIST = $(xpm_DATA) $(DESKTOPFILE_DATA) $(ICON128_DATA) $(ICON22_DATA) navit_svg2png
32 #burgerking.ico:
33 #      wget http://www.burgerking.de/favicon.ico -O burgerking.ico
34+
35+if USE_SVG2PNG
36+distclean-local:
37+       rm -f $(pngs)
38+endif