[gimp-help-2] [make] Change html prerequisites



commit e34d46b902bd2cd59229868b54c38c4f19133282
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Mon Jan 18 20:14:45 2010 +0100

    [make] Change html prerequisites
    
    Change the chain of dependencies for making html (dropping the
    "html-LANG: index-LANG" rule) to make rules more consistent.

 Makefile.GNU |   34 ++++++++++++++++------------------
 Makefile.am  |   49 +++++++++++++++++++++----------------------------
 2 files changed, 37 insertions(+), 46 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 64180df..4a57350 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -573,13 +573,11 @@ log:
 ####            Make HTML files:  XML --> HTML                      ####
 ########################################################################
 
+# Main commandline targets
+html-%: html/%/index.html html/%/gimp-help.xml ;
 html: $(foreach lang,$(LANGUAGES),html-$(lang)) ;
 
-# Chain of rules for making html-LANG:
-#     html-%  -->  index-%  -->  html/%/gimp-help.xml  -->
-#         html/%/gimp-xrefs.xml  -->  html/%/index.html
-html-%: index-% ;
-
+# Making the main HTML file (side effect: make gimp-xrefs.xml)
 html/%/index.html: xml/% $(HTML_STYLESHEETS) | html/%/images
 	$(msg) "*** Making html for $* ... "
 	$(cmd) rm -f html/$*/*.*
@@ -598,19 +596,7 @@ 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) ../../$< $@
-
-####  Cross references  ####
-# The xrefs file is a side effect of the HTML build
-html/%/gimp-xrefs.xml: html/%/index.html
-	$(cmd) touch $@
-
-####  Context Help  ####
+###  Cross references & context help ###
 index: $(foreach lang,$(LANGUAGES),index-$(lang)) ;
 index-%: html/%/gimp-help.xml ;
 
@@ -621,12 +607,24 @@ html/%/gimp-help.xml: html/%/gimp-xrefs.xml stylesheets/makeindex.xsl
 	  $< \
 	  > $@
 
+# The xrefs file is a side effect of the HTML build
+html/%/gimp-xrefs.xml: html/%/index.html
+	$(cmd) touch $@
+
+###  HTML images  ###
+html-images-%: html/%/images ;
+html/%/images: xml/%/images
+	$(cmd) test -d html/$* || $(mkdir_p) html/$*
+	$(cmd) test -e $@ || $(ln_s) ../../$< $@
+
 .PRECIOUS: \
 	html/%/index.html \
 	html/%/gimp-help.xml \
 	html/%/gimp-xrefs.xml \
 	html/%/images
 
+.PHONY: html html-% html-images-% index index-%
+
 
 ########################################################################
 ####            Make HTML draft (single page preview)               ####
diff --git a/Makefile.am b/Makefile.am
index fc834b1..881b8df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -651,14 +651,12 @@ log:
 ####            Make HTML files:  XML --> HTML                      ####
 ########################################################################
 
-# Note that Automake already defines an "html" target
+### Main commandline targets ###
+html-%: html/%/index.html html/%/gimp-help.xml ;
+# Note that automake already defines a target "html"
 html-local: $(foreach lang,$(LANGUAGES),html-$(lang)) ;
 
-# Chain of rules for making html-LANG:
-#     html-%  -->  index-%  -->  html/%/gimp-help.xml  -->
-#         html/%/gimp-xrefs.xml  -->  html/%/index.html
-html-%: index-% ;
-
+# Making the main HTML file (side effect: make gimp-xrefs.xml)
 html/%/index.html: xml/% $(HTML_STYLESHEETS) | html/%/images
 	$(msg) "*** Making html for $* ... "
 	$(cmd) rm -f html/$*/*.*
@@ -677,8 +675,22 @@ 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
+###  Cross references & context help ###
+index: $(foreach lang,$(LANGUAGES),index-$(lang)) ;
+index-%: html/%/gimp-help.xml ;
+
+html/%/gimp-help.xml: html/%/gimp-xrefs.xml stylesheets/makeindex.xsl
+	$(cmd) $(XSLTPROC) \
+	  $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
+	  $(srcdir)/stylesheets/makeindex.xsl \
+	  $< \
+	  > $@
+
+# The xrefs file is a side effect of the HTML build
+html/%/gimp-xrefs.xml: html/%/index.html
+	$(cmd) touch $@
+
+###  HTML images  ###
 html-images-%: html/%/images ;
 
 if CYGWIN
@@ -696,26 +708,7 @@ html/%/images: xml/%/images
 	$(cmd) test -e $@ || $(LN_S) ../../$< $@
 endif
 
-# The xrefs file is a side effect of the HTML build
-html/%/gimp-xrefs.xml: html/%/index.html
-	$(cmd) touch $@
-
-####  Context Help  ####
-index: $(foreach lang,$(LANGUAGES),index-$(lang)) ;
-index-%: html/%/gimp-help.xml ;
-
-html/%/gimp-help.xml: html/%/gimp-xrefs.xml stylesheets/makeindex.xsl
-	$(cmd) $(XSLTPROC) \
-	  $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
-	  $(srcdir)/stylesheets/makeindex.xsl \
-	  $< \
-	  > $@
-
-.PRECIOUS: \
-	html/%/index.html \
-	html/%/gimp-help.xml \
-	html/%/gimp-xrefs.xml \
-	html/%/images
+.PHONY: html-% html-images-% index index-%
 
 
 ########################################################################



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