* [gentoo-commits] devmanual r140 - trunk
@ 2009-02-14 14:22 Petteri Raty (betelgeuse)
0 siblings, 0 replies; only message in thread
From: Petteri Raty (betelgeuse) @ 2009-02-14 14:22 UTC (permalink / raw
To: gentoo-commits
Author: betelgeuse
Date: 2009-02-14 14:22:59 +0000 (Sat, 14 Feb 2009)
New Revision: 140
Modified:
trunk/Makefile
Log:
Rewrite the Makefile so that only updated files to get rebuilt when make is run.
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-02-13 19:39:47 UTC (rev 139)
+++ trunk/Makefile 2009-02-14 14:22:59 UTC (rev 140)
@@ -1,18 +1,19 @@
-all: transform
+text_files := $(shell find -name "text.xml" | sed -e "s/text.xml$$/index.html/")
+image_files := $(shell find -name "*.svg" | sed -e "s/svg$$/png/")
+all: $(text_files) $(image_files)
+
+%index.html : %text.xml
+ xsltproc devbook.xsl $< > $@
+
+# Someone should figure out a way to put this to the pattern
+index.html : text.xml
+ xsltproc devbook.xsl $< > $@
+
+%.png : %.svg
+ convert $< $@
+
clean:
- @find -name "index.html" | xargs rm
- @find -name "*.png" |grep -v icons | xargs rm
+ @find . -name "*.png" -a \! -path "./icons/*" -exec rm -v {} +
+ @find . -name "index.html" -exec rm -v {} +
-transform:
- @for file in $$(find -name text.xml) ; do \
- htmlfile=$${file/text.xml/index.html} ; \
- echo "Processing $${file} --> $${htmlfile}" ; \
- xsltproc devbook.xsl $$file > $$htmlfile ; \
- done
- @for file in $$(find -name *.svg) ; do \
- pngfile=$${file/.svg/.png} ; \
- echo "Converting $${file} --> $${pngfile}" ; \
- convert $$file $$pngfile ; \
- done
-
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-14 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-14 14:22 [gentoo-commits] devmanual r140 - trunk Petteri Raty (betelgeuse)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox