[gimp-help-2: 4/7] [make] Change image dependencies (Makefile.GNU)
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp-help-2: 4/7] [make] Change image dependencies (Makefile.GNU)
- Date: Sat, 15 Aug 2009 18:57:00 +0000 (UTC)
commit 9b7eb28298293ea820d353d099dce7ccffb47836
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Thu Aug 13 19:32:41 2009 +0200
[make] Change image dependencies (Makefile.GNU)
* Makefile.GNU:
When building HTML, always rebuild images, but don't force HTML
to be updated. (Experimenting with order-only prerequisite.)
Same for PDF.
* Add new target "images-LANG" (also "xml-images-LANG" and
"html-images-LANG").
Makefile.GNU | 34 ++++++++++++++++++++--------------
Makefile.am | 28 +++++++++++++++++-----------
2 files changed, 37 insertions(+), 25 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 6e80a52..f34e7a4 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -463,6 +463,19 @@ xml-$(1): xml/$(1) $$($(1)_XML_FILES) xml/$(1)/images ;
endef
$(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
+# Special case: en
+
+en_XML_FILES = $(SRC_FILES:src/%=xml/en/%)
+$(en_XML_FILES): xml/en/%.xml : src/%.xml
+ $(msg) "[XML] $@ (copy)"
+ $(cmd) $(call make_target_dir,$@)
+ $(cmd) cp -f $< $@
+
+xml/en: $(en_XML_FILES)
+ $(cmd) test -d $@ && touch $@ || $(mkdir_p) $@
+
+# Images
+
# TODO: test new image files structure;
# how to ensure that $@ is up-to-date without forcing
# rebuild (which will also force e.g. html-% to be rebuilt)
@@ -472,22 +485,11 @@ xml/%/images: FORCE
$(cmd) if test -L xml/$*; then rm -v xml/$*; fi
$(cmd) if test -d $@; then rm -rf $@/*; fi
$(cmd) test -d $@ || $(mkdir_p) $@
- $(cmd) $(echo_n) "*** Copying images ($*) ..."
+ $(cmd) $(echo_n) "Copying images ($*) ..."
$(cmd) perl tools/make_image_links.pl -v \
images/common images/C \
xml/$*
-# Special case: en
-
-en_XML_FILES = $(SRC_FILES:src/%=xml/en/%)
-$(en_XML_FILES): xml/en/%.xml : src/%.xml
- $(msg) "[XML] $@ (copy)"
- $(cmd) $(call make_target_dir,$@)
- $(cmd) cp -f $< $@
-
-xml/en: $(en_XML_FILES)
- $(cmd) test -d $@ && touch $@ || $(mkdir_p) $@
-
# remove stale xml files
cleanup-xml-%:
$(cmd) $(find_l) xml/$*/ $(file_predicates) | \
@@ -497,6 +499,8 @@ cleanup-xml-%:
# Target suitable for command line
xml-en: cleanup-xml-en xml/en $(en_XML_FILES) ;
+xml-images-%: xml/%/images ;
+images-%: xml-images-% html-images-% ;
.PRECIOUS: xml/%/images
@@ -551,7 +555,7 @@ html: $(foreach lang,$(LANGUAGES),html-$(lang)) ;
# html/%/gimp-xrefs.xml --> html/%/index.html
html-%: index-% ;
-html/%/index.html: xml/% $(HTML_STYLESHEETS) html/%/images
+html/%/index.html: xml/% $(HTML_STYLESHEETS) | html/%/images
$(msg) "*** Making html for $* ... "
$(cmd) rm -f html/$*/*.*
@@ -569,7 +573,9 @@ html/%/index.html: xml/% $(HTML_STYLESHEETS) html/%/images
if [ -f $${file} ]; then cp -f $${file} html/$*; fi; \
done
+#### HTML images ####
# TODO: check/enhance new image files structure
+html-images-%: html/%/images ;
html/%/images: xml/%/images
$(cmd) test -d html/$* || $(mkdir_p) html/$*
$(cmd) test -e $@ || $(ln_s) ../../$< $@
@@ -651,7 +657,7 @@ pdf: $(foreach lang,$(LANGUAGES),pdf-$(lang)) ;
pdf-%: pdf/%/gimp.pdf ;
# TODO: images (--fig-path option?); prerequisites
-pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl xml/%/images
+pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl | xml/%/images
$(cmd) if test -f pdf/%.pdf; then rm -f pdf/%.pdf; fi
$(cmd) test -d pdf/$* || $(mkdir_p) pdf/$*
$(msg) "*** Making PDF ($*) ..."
diff --git a/Makefile.am b/Makefile.am
index 4d9825e..e89b71e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -484,6 +484,19 @@ include $(foreach LANG,$(PO_LANGS),xml/$(LANG)/.deps.mk)
# HIDE FROM AUTOMAKE #endef
# HIDE FROM AUTOMAKE #$(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
+# Special case: en
+
+en_XML_FILES = $(SRC_FILES:src/%=xml/en/%)
+$(en_XML_FILES): xml/en/%.xml : src/%.xml
+ $(msg) "[XML] $@ (copy)"
+ $(cmd) $(call make_target_dir,$@)
+ $(cmd) cp -f $< $@
+
+xml/en: $(en_XML_FILES)
+ $(cmd) test -d $@ && touch $@ || $(MKDIR_P) $@
+
+# Images
+
# TODO: test new image files structure;
# how to ensure that $@ is up-to-date without forcing
# rebuild (which will also force e.g. html-% to be rebuilt
@@ -498,17 +511,6 @@ xml/%/images: FORCE
$(srcdir)/images/common $(srcdir)/images/C \
xml/$*
-# Special case: en
-
-en_XML_FILES = $(SRC_FILES:src/%=xml/en/%)
-$(en_XML_FILES): xml/en/%.xml : src/%.xml
- $(msg) "[XML] $@ (copy)"
- $(cmd) $(call make_target_dir,$@)
- $(cmd) cp -f $< $@
-
-xml/en: $(en_XML_FILES)
- $(cmd) test -d $@ && touch $@ || $(MKDIR_P) $@
-
# remove stale xml files
cleanup-xml-%:
$(cmd) $(find_l) xml/$*/ $(file_predicates) | \
@@ -518,6 +520,8 @@ cleanup-xml-%:
# Target suitable for command line
xml-en: cleanup-xml-en xml/en $(en_XML_FILES) ;
+xml-images-%: xml/%/images ;
+images-%: xml-images-% html-images-% ;
.PHONY: FORCE
FORCE: ;
@@ -589,7 +593,9 @@ html/%/index.html: xml/% $(HTML_STYLESHEETS) html/%/images
if [ -f $${file} ]; then cp -f $${file} html/$*; fi; \
done
+#### HTML images ####
# TODO: check/enhance new image files structure
+html-images-%: html/%/images ;
html/%/images: xml/%/images
$(cmd) test -d html/$* || $(MKDIR_P) html/$*
$(cmd) test -e $@ || $(LN_S) ../../$< $@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]