[gimp-help-2] [make] Fix some make rules



commit 35730c3f86bcf91d2196d5158ae4f291d9d5de8d
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Tue May 11 20:20:39 2010 +0200

    [make] Fix some make rules
    
    "make (xml|html|validate)-LANG" failed if some pofiles are missing
    ("make po-LANG" worked). This commit adds more prerequisites and an
    additional command to make these commands work as expected.

 Makefile.GNU            |    5 +++--
 Makefile.am             |    6 ++++--
 make.d/build-system.dot |    6 ++++--
 3 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 3336426..b323cb3 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -505,6 +505,7 @@ xml/$(1)/%.xml:
 	srcfile=src/$$$${stem}.xml; \
 	test "$$$${stem}" != "$$$${stem%/*}" && stem=$$$${stem%/*} || stem=gimp; \
 	pofile=po/$(1)/$$$${stem}.po; \
+	test -e "$$$${pofile}" || $$(RMAKE) "$$$${pofile}"; \
 	$(call po2xml,$$$${srcfile},$$$${pofile},$(1),$$@)
 
 # This is indirectly used as HTML and PDF prerequisite:
@@ -512,7 +513,7 @@ xml/$(1): $$($(1)_XML_FILES) | xml/$(1)/images
 	$$(cmd) test -d $$@ && touch $$@ || $(mkdir_p) $$@
 
 # Targets suitable for command line
-xml-$(1): xml/$(1) cleanup-xml-$(1) ;
+xml-$(1): po-$(1) xml/$(1) cleanup-xml-$(1) ;
 endef
 $(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
 
@@ -620,7 +621,7 @@ stylesheets/htmlalternate.xsl: stylesheets/htmlalternate.xsl.in
 ########################################################################
 
 # Main commandline targets
-html-%: html/%/index.html html/%/gimp-help.xml ;
+html-%: xml-% html/%/index.html html/%/gimp-help.xml ;
 html: $(foreach lang,$(LANGUAGES),html-$(lang)) ;
 
 # Making the main HTML file (side effect: make gimp-xrefs.xml)
diff --git a/Makefile.am b/Makefile.am
index c60b27e..3a88a5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -565,6 +565,7 @@ po: $(foreach LANG,$(PO_LANGS),po-$(LANG)) ;
 # HIDE FROM AUTOMAKE #	srcfile=$$(srcdir)/src/$$$${stem}.xml; \
 # HIDE FROM AUTOMAKE #	test "$$$${stem}" != "$$$${stem%/*}" && stem=$$$${stem%/*} || stem=gimp; \
 # HIDE FROM AUTOMAKE #	pofile=$$(srcdir)/po/$(1)/$$$${stem}.po; \
+# HIDE FROM AUTOMAKE #	test -e "$$$${pofile}" || $$(RMAKE) "$$$${pofile}"; \
 # HIDE FROM AUTOMAKE #	$(call po2xml,$$$${srcfile},$$$${pofile},$(1),$$@)
 # Special case: authors.xml
 # HIDE FROM AUTOMAKE #xml/$(1)/$(AUTHORS_DOCBOOK_XML:src/%=%): $(AUTHORS_DOCBOOK_XML)
@@ -574,6 +575,7 @@ po: $(foreach LANG,$(PO_LANGS),po-$(LANG)) ;
 # HIDE FROM AUTOMAKE #	srcfile=$(AUTHORS_DOCBOOK_XML); \
 # HIDE FROM AUTOMAKE #	stem=$$(dir $$(@:xml/$(1)/%=%)); \
 # HIDE FROM AUTOMAKE #	pofile=$$(srcdir)/po/$(1)/$$$${stem%/}.po; \
+# HIDE FROM AUTOMAKE #	test -e "$$$${pofile}" || $$(RMAKE) "$$$${pofile}"; \
 # HIDE FROM AUTOMAKE #	$(call po2xml,$$$${srcfile},$$$${pofile},$(1),$$@)
 # HIDE FROM AUTOMAKE #
 # HIDE FROM AUTOMAKE ## This is indirectly used as HTML and PDF prerequisite:
@@ -581,7 +583,7 @@ po: $(foreach LANG,$(PO_LANGS),po-$(LANG)) ;
 # HIDE FROM AUTOMAKE #	$$(cmd) test -d $$@ && touch $$@ || $(mkdir_p) $$@
 # HIDE FROM AUTOMAKE #
 # HIDE FROM AUTOMAKE ## Targets suitable for command line
-# HIDE FROM AUTOMAKE #xml-$(1): xml/$(1) cleanup-xml-$(1) ;
+# HIDE FROM AUTOMAKE #xml-$(1): po-$(1) xml/$(1) cleanup-xml-$(1) ;
 # HIDE FROM AUTOMAKE #endef
 # HIDE FROM AUTOMAKE #$(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
 
@@ -680,7 +682,7 @@ log:
 ########################################################################
 
 ### Main commandline targets ###
-html-%: html/%/index.html html/%/gimp-help.xml ;
+html-%: xml-% html/%/index.html html/%/gimp-help.xml ;
 # Note that automake already defines a target "html"
 html-local: $(foreach lang,$(LANGUAGES),html-$(lang)) ;
 
diff --git a/make.d/build-system.dot b/make.d/build-system.dot
index 4ea3af2..00c356c 100644
--- a/make.d/build-system.dot
+++ b/make.d/build-system.dot
@@ -98,11 +98,12 @@ digraph gimp_build_system {
         xml_files[label="LANG_XML_FILES\n----\nxml/LANG/.../*.xml"
                   shape=polygon side=4 skew=.2 color=green];
         xml_lang -> xml_dir -> xml_files;
-        xml_files -> po_files;
     } /* subgraph cluster_xml */
 
-    xml_files -> src_files[color=grey label="copy if\nLANG = en"];
     xml -> xml_lang[weight=4];
+    xml_lang  -> po_lang;
+    xml_files -> src_files[color=grey label="copy if\nLANG = en"];
+    xml_files -> po_files[color=grey label="via\ninclude\n.deps.mk"];
 
     index -> index_lang;
 
@@ -127,6 +128,7 @@ digraph gimp_build_system {
     } /* subgraph cluster_html */
 
     html -> html_lang;
+    html_lang  -> xml_lang;
 
     /* TODO */
 



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