[svnbook commit] r2340 - trunk/src/it/lab

maxb noreply at red-bean.com
Thu Jul 20 19:00:15 CDT 2006


Author: maxb
Date: Thu Jul 20 19:00:15 2006
New Revision: 2340

Modified:
   trunk/src/it/lab/Makefile.base-rules
   trunk/src/it/lab/Makefile.base-vars

Log:
Tidy up the forked Italian build system by removing spurious changes,
avoiding the use of a temporary file by using a pipe instead,
and performing other miscellaneous fixups.

* src/it/lab/Makefile.base-rules
* src/it/lab/Makefile.base-vars


Modified: trunk/src/it/lab/Makefile.base-rules
==============================================================================
--- trunk/src/it/lab/Makefile.base-rules	(original)
+++ trunk/src/it/lab/Makefile.base-rules	Thu Jul 20 19:00:15 2006
@@ -20,33 +20,28 @@
 	  mv $(VERSION_SOURCE).tmp $(VERSION_SOURCE); \
 	fi
 
+# This is a proposal from svn-it group: If you want to build the book with only
+# <para lang="it"> you simply have to set the variable LANG_FILTER.  Of course
+# this approach can be shared with any other translation group if needing of
+# preserving original <para> text is felt.
+# Here is an example of invocation from the command line:
+#   cd src/it 
+#   export LANG_FILTER=1
+#   make html
+
 html: $(HTML_TARGET)
 $(HTML_TARGET): $(ALL_SOURCE) $(VERSION_SOURCE) $(STYLESHEET) $(IMAGES)
 	$(ENSURE_XSL)
-#----- start it contrib ------
-#
-# This is a proposal from svn-it group: if you want to build html with only <para lang="it">
-# you simply have to set the variable LANG_FILTER=IT.
-# Of course this approach can be shared with any other translation group if
-# needing of preserving orginal <para> text is felt.
-# Follows an example of invocation from the command line:
-# cd src/it 
-# export LANG_FILTER=IT
-# make all-html
-#
-	$(IF_LANG_FILTER) \
-		echo "Building HTML filtering on <para lang=$(LANG_FILTER)>" ; \
-		$(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(XML_LANG_TARGET) \
-		$(TOOLS_DIR)/xsl/profiling/profile.xsl $(XML_SOURCE) ; \
-		$(XSLTPROC) --output $(HTML_TARGET) \
-		$(TOOLS_DIR)/html-stylesheet.xsl $(XML_LANG_TARGET) ; \
-		rm $(XML_LANG_TARGET) \
+	if test -n "$(LANG_FILTER)"; then \
+	  $(XSLTPROC) $(HTML_XSLTPROC_OPTS) \
+	    --stringparam profile.lang it \
+	    $(TOOLS_DIR)/xsl/profiling/profile.xsl $(XML_SOURCE) | \
+	    $(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_TARGET) \
+	    $(TOOLS_DIR)/html-stylesheet.xsl -; \
 	else \
-		echo "Building HTML without any filter." ; \
-		$(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_TARGET) \
-		$(TOOLS_DIR)/html-stylesheet.xsl $(XML_SOURCE) \
-	$(ENDIF) \
-#----- end it contrib ------
+	  $(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_TARGET) \
+	    $(TOOLS_DIR)/html-stylesheet.xsl $(XML_SOURCE); \
+	fi
 
 # The trailing slash on the xsltproc --output option is essential to
 # output pages into the directory
@@ -55,7 +50,9 @@
 	mkdir -p $(HTML_CHUNK_DIR)
 	$(IFIMAGES) mkdir -p $(HTML_CHUNK_DIR)/images $(ENDIF)
 	$(ENSURE_XSL)
-	$(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_CHUNK_DIR)/ $(TOOLS_DIR)/chunk-stylesheet.xsl $(XML_SOURCE)
+	$(XSLTPROC) $(HTML_XSLTPROC_OPTS) \
+           --output $(HTML_CHUNK_DIR)/ \
+	   $(TOOLS_DIR)/chunk-stylesheet.xsl $(XML_SOURCE)
 	cp $(STYLESHEET) $(HTML_CHUNK_DIR)
 	$(IFIMAGES) cp $(IMAGES) $(HTML_CHUNK_DIR)/images $(ENDIF)
 

Modified: trunk/src/it/lab/Makefile.base-vars
==============================================================================
--- trunk/src/it/lab/Makefile.base-vars	(original)
+++ trunk/src/it/lab/Makefile.base-vars	Thu Jul 20 19:00:15 2006
@@ -40,13 +40,6 @@
 
 HTML_CHUNK_DIR = $(DIR)/html-chunk
 HTML_TARGET = $(DIR)/$(OUTNAME).html
-
-#----- start it contrib ------
-#LANG_FILTER=IT #this should be set at command line level, so by default it does not filter anything
-IF_LANG_FILTER = if test "$(LANG_FILTER)" != ""; then
-XML_LANG_TARGET = $(DIR)/$(OUTNAME).$(LANG_FILTER).xml
-#----- end it contrib ------
-
 # In the HTML chunk build, index.html is created last, so serves as an 
 # acceptable timestamp file for the entire multi-file output.
 HTML_CHUNK_TARGET = $(HTML_CHUNK_DIR)/index.html
@@ -71,11 +64,7 @@
 ENDIF = ; fi
 
 # Customization hooks for xsltproc options
-
-#----- start it contrib ------
-HTML_XSLTPROC_OPTS = --stringparam  profile.lang "it"
-#----- end it contrib ------
-
+HTML_XSLTPROC_OPTS = 
 FO_XSLTPROC_OPTS =
 # FO example: --stringparam page.height 9in --stringparam page.width 6.4in
 




More information about the svnbook-dev mailing list