]> granicus.if.org Git - docbook-dsssl/commitdiff
Webhelp: Improving sample Makefile to allow for profiling params and other params...
authorDavid Cramer <david@thingbag.net>
Sun, 16 Dec 2012 02:01:00 +0000 (02:01 +0000)
committerDavid Cramer <david@thingbag.net>
Sun, 16 Dec 2012 02:01:00 +0000 (02:01 +0000)
12 files changed:
xsl/webhelp/Makefile
xsl/webhelp/Makefile.sample
xsl/webhelp/build.xml
xsl/webhelp/template/search/default.props [moved from xsl/webhelp/template/content/search/default.props with 100% similarity]
xsl/webhelp/template/search/en-us.props [moved from xsl/webhelp/template/content/search/en-us.props with 100% similarity]
xsl/webhelp/template/search/es-es.props [moved from xsl/webhelp/template/content/search/es-es.props with 100% similarity]
xsl/webhelp/template/search/ja-jp.props [moved from xsl/webhelp/template/content/search/ja-jp.props with 100% similarity]
xsl/webhelp/template/search/nwSearchFnt.js [moved from xsl/webhelp/template/content/search/nwSearchFnt.js with 100% similarity]
xsl/webhelp/template/search/punctuation.props [moved from xsl/webhelp/template/content/search/punctuation.props with 100% similarity]
xsl/webhelp/template/search/stemmers/de_stemmer.js [moved from xsl/webhelp/template/content/search/stemmers/de_stemmer.js with 100% similarity]
xsl/webhelp/template/search/stemmers/en_stemmer.js [moved from xsl/webhelp/template/content/search/stemmers/en_stemmer.js with 100% similarity]
xsl/webhelp/template/search/stemmers/fr_stemmer.js [moved from xsl/webhelp/template/content/search/stemmers/fr_stemmer.js with 100% similarity]

index 2feb65c0e46d91fbee792d498d2219b53a06ef50..7489b2f4e5d81de8f6dc3c5c8d5532a476a4526c 100644 (file)
@@ -47,7 +47,7 @@ index:
                 -classpath $(classpath) \\r
                 com.nexwave.nquindexer.IndexerMain\r
 \r
-       cp -r template/content/search/* ${OUTPUT_DIR}/search\r
+       cp -r template/search/* ${OUTPUT_DIR}/search\r
 \r
 clean:\r
        $(RM) -r docs/*\r
index 2feb65c0e46d91fbee792d498d2219b53a06ef50..b336d3f4ca2e1c8099c50da68c358187b7a687c3 100644 (file)
@@ -1,13 +1,55 @@
 # Configuration\r
-DOCBOOK_DIST := ../$(pwd)\r
-\r
-DOCBOOK_EXTENSIONS_DIR = $(DOCBOOK_DIST)/extensions\r
-\r
+# The name of the source DocBook xml file\r
 INPUT_XML = docsrc/readme.xml\r
+\r
+# The makefile assumes that you have a \r
+# directory named images that contains \r
+# your images. It copies this to the \r
+# output directory\r
 USER_IMAGES_PARENT_DIR=docsrc\r
+\r
+# Name of the desired output directory\r
+# This will be created if it doesn't exist\r
 OUTPUT_DIR = docs\r
+\r
+# A list of files to exclude from indexing\r
 INDEXER_EXCLUDED_FILES = ix01.html\r
 \r
+# Profiling params. For more information on \r
+# profiling (conditional text) and DocBook documents, see\r
+# http://www.sagehill.net/docbookxsl/Profiling.html\r
+PROFILE.ARCH = ""\r
+PROFILE.AUDIENCE = ""\r
+PROFILE.CONDITION = ""\r
+PROFILE.CONFORMANCE = ""\r
+PROFILE.LANG = ""\r
+PROFILE.OS = ""\r
+PROFILE.REVISION = ""\r
+PROFILE.REVISIONFLAG = ""\r
+PROFILE.ROLE = ""\r
+PROFILE.SECURITY = ""\r
+PROFILE.STATUS = ""\r
+PROFILE.USERLEVEL = ""\r
+PROFILE.VENDOR = ""\r
+PROFILE.WORDSIZE = ""\r
+PROFILE.ATTRIBUTE = ""\r
+PROFILE.VALUE = ""\r
+\r
+# Use this variable to pass in other stringparams\r
+# to the xsltproc pass that generates DocBook output.\r
+# For example:\r
+# OTHER_XSLTPROC_ARGS = --stringparam example.param ""\r
+OTHER_XSLTPROC_ARGS = \r
+\r
+# Path to the DocBook Distribution that \r
+# contains the xslts etc.\r
+DOCBOOK_DIST := ../$(pwd)\r
+\r
+# =================================================\r
+# You probably don't need to change anything below\r
+# unless you choose to add a validation step.\r
+# ================================================\r
+DOCBOOK_EXTENSIONS_DIR = $(DOCBOOK_DIST)/extensions\r
 INDEXER_JAR   := $(DOCBOOK_EXTENSIONS_DIR)/webhelpindexer.jar\r
 TAGSOUP_JAR   := $(DOCBOOK_EXTENSIONS_DIR)/tagsoup-1.2.1.jar\r
 LUCENE_ANALYZER_JAR   := $(DOCBOOK_EXTENSIONS_DIR)/lucene-analyzers-3.0.0.jar\r
@@ -28,11 +70,26 @@ copyfiles:
 \r
 chunk:\r
        xsltproc  --output  xincluded-profiled.xml  \\r
-                  --stringparam  profile.os  "linux" \\r
+                  --stringparam  profile.arch ${PROFILE.ARCH} \\r
+                  --stringparam  profile.audience ${PROFILE.AUDIENCE} \\r
+                  --stringparam  profile.condition ${PROFILE.CONDITION} \\r
+                  --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \\r
+                  --stringparam  profile.lang ${PROFILE.LANG} \\r
+                  --stringparam  profile.os ${PROFILE.OS} \\r
+                  --stringparam  profile.revision ${PROFILE.REVISION} \\r
+                  --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \\r
+                  --stringparam  profile.role ${PROFILE.ROLE} \\r
+                  --stringparam  profile.security ${PROFILE.SECURITY} \\r
+                  --stringparam  profile.status ${PROFILE.STATUS} \\r
+                  --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \\r
+                  --stringparam  profile.vendor ${PROFILE.VENDOR} \\r
+                  --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \\r
+                  --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \\r
+                  --stringparam  profile.value ${PROFILE.VALUE} \\r
                   ../profiling/profile.xsl  \\r
                   ${INPUT_XML}\r
 \r
-       xsltproc --xinclude xsl/webhelp.xsl xincluded-profiled.xml      \r
+       xsltproc ${OTHER_XSLTPROC_ARGS} --xinclude xsl/webhelp.xsl xincluded-profiled.xml \r
 \r
        rm xincluded-profiled.xml\r
 index:\r
@@ -47,8 +104,8 @@ index:
                 -classpath $(classpath) \\r
                 com.nexwave.nquindexer.IndexerMain\r
 \r
-       cp -r template/content/search/* ${OUTPUT_DIR}/search\r
+       cp -r template/search/* ${OUTPUT_DIR}/search\r
 \r
 clean:\r
-       $(RM) -r docs/*\r
+       $(RM) -r ${OUTPUT_DIR}\r
 \r
index 6fb04cc64a6d11feb9f60db41537f1a279b1291e..87f44471d9293332c01dda09aae8b4627c5dd2eb 100644 (file)
@@ -75,7 +75,7 @@
        <copy todir="${output-dir}">
          <fileset dir="${ant.file.dir}/template">
                <include name="**/*"/>
-               <exclude name="**/content/**"/>
+               <exclude name="**/search/**"/>
          </fileset>
        </copy>
 
@@ -91,7 +91,7 @@
   <target name="index" if="do-search-indexing">
 
        <copy todir="${output-dir}/search">
-         <fileset dir="${ant.file.dir}/template/content/search">
+         <fileset dir="${ant.file.dir}/template/search">
                <include name="**/*"/>
                <exclude name="**/*.props"/>
                <exclude name="**/stemmers/*"/>
 
        <!-- We separate this out so we only copy the stopwords list and stemmer for the indexer language -->
        <copy todir="${output-dir}/search">
-         <fileset dir="${ant.file.dir}/template/content/search">
+         <fileset dir="${ant.file.dir}/template/search">
                <include name="**/default.props"/>
                <include name="**/punctuation.props"/>
                <include name="**/${webhelp.indexer.language}*.props"/>
          </fileset>
        </copy>
 
-       <!--taskdef name="indexertask"
-         classname="com.nexwave.nquindexer.IndexerMain">
-         <classpath refid="classpath"/>
-       </taskdef-->
-
        <echo>Indexing html files in ${output-dir}</echo>
 
        <java classname="com.nexwave.nquindexer.IndexerMain" fork="true"> 
          <sysproperty key="htmlExtension" value="${html.extension}"/>
          <sysproperty key="doStem" value="${enable.stemming}"/>
          <sysproperty key="tocFile" value="${toc.file}"/>
-               <sysproperty key="indexerExcludedFiles" value="${indexer-excluded-files}"/>
+         <sysproperty key="indexerExcludedFiles" value="${indexer-excluded-files}"/>
                
         <!--TagSoup SAX Parser for parsing even the bad html contents. see 
              http://sourceforge.net/tracker/?func=detail&aid=3401185&group_id=21935&atid=373750-->