[svnbook commit] r2338 - trunk/src/it/lab
maxb
noreply at red-bean.com
Thu Jul 20 18:03:45 CDT 2006
Author: maxb
Date: Thu Jul 20 18:03:44 2006
New Revision: 2338
Modified:
trunk/src/it/lab/Makefile.base-rules
trunk/src/it/lab/Makefile.base-vars
Log:
Re-commit the initial modifications made to the build files in the Italian
build sandbox directory.
* 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 18:03:44 2006
@@ -23,8 +23,30 @@
html: $(HTML_TARGET)
$(HTML_TARGET): $(ALL_SOURCE) $(VERSION_SOURCE) $(STYLESHEET) $(IMAGES)
$(ENSURE_XSL)
- $(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_TARGET) \
- $(TOOLS_DIR)/html-stylesheet.xsl $(XML_SOURCE)
+#----- 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) \
+ 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 ------
# The trailing slash on the xsltproc --output option is essential to
# output pages into the directory
@@ -33,9 +55,7 @@
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 18:03:44 2006
@@ -40,6 +40,13 @@
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
@@ -64,7 +71,11 @@
ENDIF = ; fi
# Customization hooks for xsltproc options
-HTML_XSLTPROC_OPTS =
+
+#----- start it contrib ------
+HTML_XSLTPROC_OPTS = --stringparam profile.lang "it"
+#----- end it contrib ------
+
FO_XSLTPROC_OPTS =
# FO example: --stringparam page.height 9in --stringparam page.width 6.4in
More information about the svnbook-dev
mailing list