summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodney Dawes <dobey@gnome.org>2008-09-05 15:28:40 -0400
committerRodney Dawes <dobey@gnome.org>2008-09-05 15:28:40 -0400
commita33aa4cdae1df567391bfe2cf1687e0c480a8832 (patch)
treeaa30062c2176d9f5b77922d439554debcf5ad922
parent8c544bdb6aa8119cb3e0d69f29fbef61acced38f (diff)
2008-09-05 Rodney Dawes <dobey.pwns@gmail.com>
* render-bitmaps.pl.in: Only print the context and name, and not "Rendering" or the ellipse * svg/.gitignore: Update for the rendercache files * svg/Makefile.am: Update the build to use rendercache files to list all the icons produced from the SVG files and dist the rendercache so that install can work automatically
-rw-r--r--render-bitmaps.pl.in2
-rw-r--r--svg/.gitignore1
-rw-r--r--svg/Makefile.am44
3 files changed, 23 insertions, 24 deletions
diff --git a/render-bitmaps.pl.in b/render-bitmaps.pl.in
index 6b92ba8..5552c7f 100644
--- a/render-bitmaps.pl.in
+++ b/render-bitmaps.pl.in
@@ -64,7 +64,7 @@ sub render_icons {
system ("mkdir -p $dir");
}
my $cmd = "$inkscape -i $box->{id} -e $dir/$name.png $filename > /dev/null";
- print "Rendering $dir/$name.png...\n";
+ print "$context/$name.png\n";
system ($cmd);
}
}
diff --git a/svg/.gitignore b/svg/.gitignore
index 2fa80d6..63fcb35 100644
--- a/svg/.gitignore
+++ b/svg/.gitignore
@@ -1,2 +1,3 @@
*.png
+*.rendercache
diff --git a/svg/Makefile.am b/svg/Makefile.am
index 78b2699..3c3caa3 100644
--- a/svg/Makefile.am
+++ b/svg/Makefile.am
@@ -1,60 +1,58 @@
-icon_in_files = $(shell for i in `find . -name "*.svg"`; do printf "$$i "; done)
-icon_files = $(icon_in_files:.svg=.png)
+icon_in_files = $(shell SRCDIR="$(srcdir)"; for i in `find $$SRCDIR -name "*.svg"`; do printf "$$i "; done)
+icon_cache = $(icon_in_files:.svg=.rendercache)
+icon_files = $(shell BUILDDIR="$(builddir)"; for i in `find $$BUILDDIR -name "*.rendercache"`; do cat $$i; done)
if ENABLE_RENDERING
$(top_builddir)/render-bitmaps.pl: $(top_srcdir)/render-bitmaps.pl.in
(cd $(top_builddir) && make render-bitmaps.pl)
-%.png: %.svg $(top_builddir)/render-bitmaps.pl
+%.rendercache: %.svg $(top_builddir)/render-bitmaps.pl
for size in $(render_sizes); do \
- $(top_builddir)/render-bitmaps.pl -s $$size -o $(top_builddir) $<; \
+ $(top_builddir)/render-bitmaps.pl -s $$size -o $(top_builddir) $< > $@; \
done
- touch $@
-dist-hook: $(icon_files)
+dist-hook: $(icon_cache)
for size in $(render_sizes); do \
cp -a $(top_builddir)/$$size $(top_distdir)/$$size; \
done
else
-%.png: %.svg
- touch $@
+%.rendercache: %.svg
-dist-hook: $(icon_files)
+dist-hook: $(icon_cache)
for size in $(render_sizes); do \
cp -a $(top_srcdir)/$$size $(top_distdir)/$$size; \
done
endif
-all: $(icon_files)
-$(render_sizes): $(icon_files)
+all: $(icon_cache)
+$(render_sizes): $(icon_cache)
install-data-local:
for size in $(render_sizes); do \
- for file in $(icon_files); do \
- for dir in `find $(top_srcdir)/$$size/* -type d`; do \
- context="`basename $$dir`"; \
+ for dir in `if [ -d $(top_srcdir)/$$size ]; then find $(top_srcdir)/$$size/* -type d; fi`; do \
+ for file in $(icon_files); do \
+ context="`dirname $$file`"; \
$(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
- $(install_sh_DATA) $(top_srcdir)/$$size/$$context/$$file $(DESTDIR)$(themedir)/$$size/$$context/$$file; \
+ $(install_sh_DATA) $(top_srcdir)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
done; \
done; \
done
uninstall-local:
for size in $(render_sizes); do \
- for file in $(icon_files); do \
- for dir in `find $(top_srcdir)/$$size/* -type d`; do \
- context="`basename $$dir`"; \
- rm -f $(DESTDIR)$(themedir)/$$size/$$context/$$file; \
+ for dir in `if [ -d $(top_srcdir)/$$size ]; then find $(top_srcdir)/$$size/* -type d; fi`; do \
+ for file in $(icon_files); do \
+ rm -f $(DESTDIR)$(themedir)/$$size/$$file; \
done; \
done; \
done
EXTRA_DIST = \
- $(icon_in_files)
+ $(icon_in_files) \
+ $(icon_cache)
-CLEANFILES = \
- $(icon_files)
MAINTAINERCLEANFILES = \
- Makefile.in
+ Makefile.in \
+ $(icon_cache)