From b00d04d26ff5b9a266adedb6065e0bf9bf12f795 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 16 Dec 2012 02:01:00 +0000 Subject: [PATCH] Webhelp: Improving sample Makefile to allow for profiling params and other params, removing content dir from template and making related adjustments in Makefile and build.xml --- xsl/webhelp/Makefile | 2 +- xsl/webhelp/Makefile.sample | 73 +++++++++++++++++-- xsl/webhelp/build.xml | 13 +--- .../{content => }/search/default.props | 0 .../template/{content => }/search/en-us.props | 0 .../template/{content => }/search/es-es.props | 0 .../template/{content => }/search/ja-jp.props | 0 .../{content => }/search/nwSearchFnt.js | 0 .../{content => }/search/punctuation.props | 0 .../search/stemmers/de_stemmer.js | 0 .../search/stemmers/en_stemmer.js | 0 .../search/stemmers/fr_stemmer.js | 0 12 files changed, 70 insertions(+), 18 deletions(-) rename xsl/webhelp/template/{content => }/search/default.props (100%) rename xsl/webhelp/template/{content => }/search/en-us.props (100%) rename xsl/webhelp/template/{content => }/search/es-es.props (100%) rename xsl/webhelp/template/{content => }/search/ja-jp.props (100%) rename xsl/webhelp/template/{content => }/search/nwSearchFnt.js (100%) rename xsl/webhelp/template/{content => }/search/punctuation.props (100%) rename xsl/webhelp/template/{content => }/search/stemmers/de_stemmer.js (100%) rename xsl/webhelp/template/{content => }/search/stemmers/en_stemmer.js (100%) rename xsl/webhelp/template/{content => }/search/stemmers/fr_stemmer.js (100%) diff --git a/xsl/webhelp/Makefile b/xsl/webhelp/Makefile index 2feb65c0e..7489b2f4e 100644 --- a/xsl/webhelp/Makefile +++ b/xsl/webhelp/Makefile @@ -47,7 +47,7 @@ index: -classpath $(classpath) \ com.nexwave.nquindexer.IndexerMain - cp -r template/content/search/* ${OUTPUT_DIR}/search + cp -r template/search/* ${OUTPUT_DIR}/search clean: $(RM) -r docs/* diff --git a/xsl/webhelp/Makefile.sample b/xsl/webhelp/Makefile.sample index 2feb65c0e..b336d3f4c 100644 --- a/xsl/webhelp/Makefile.sample +++ b/xsl/webhelp/Makefile.sample @@ -1,13 +1,55 @@ # Configuration -DOCBOOK_DIST := ../$(pwd) - -DOCBOOK_EXTENSIONS_DIR = $(DOCBOOK_DIST)/extensions - +# The name of the source DocBook xml file INPUT_XML = docsrc/readme.xml + +# The makefile assumes that you have a +# directory named images that contains +# your images. It copies this to the +# output directory USER_IMAGES_PARENT_DIR=docsrc + +# Name of the desired output directory +# This will be created if it doesn't exist OUTPUT_DIR = docs + +# A list of files to exclude from indexing INDEXER_EXCLUDED_FILES = ix01.html +# Profiling params. For more information on +# profiling (conditional text) and DocBook documents, see +# http://www.sagehill.net/docbookxsl/Profiling.html +PROFILE.ARCH = "" +PROFILE.AUDIENCE = "" +PROFILE.CONDITION = "" +PROFILE.CONFORMANCE = "" +PROFILE.LANG = "" +PROFILE.OS = "" +PROFILE.REVISION = "" +PROFILE.REVISIONFLAG = "" +PROFILE.ROLE = "" +PROFILE.SECURITY = "" +PROFILE.STATUS = "" +PROFILE.USERLEVEL = "" +PROFILE.VENDOR = "" +PROFILE.WORDSIZE = "" +PROFILE.ATTRIBUTE = "" +PROFILE.VALUE = "" + +# Use this variable to pass in other stringparams +# to the xsltproc pass that generates DocBook output. +# For example: +# OTHER_XSLTPROC_ARGS = --stringparam example.param "" +OTHER_XSLTPROC_ARGS = + +# Path to the DocBook Distribution that +# contains the xslts etc. +DOCBOOK_DIST := ../$(pwd) + +# ================================================= +# You probably don't need to change anything below +# unless you choose to add a validation step. +# ================================================ +DOCBOOK_EXTENSIONS_DIR = $(DOCBOOK_DIST)/extensions INDEXER_JAR := $(DOCBOOK_EXTENSIONS_DIR)/webhelpindexer.jar TAGSOUP_JAR := $(DOCBOOK_EXTENSIONS_DIR)/tagsoup-1.2.1.jar LUCENE_ANALYZER_JAR := $(DOCBOOK_EXTENSIONS_DIR)/lucene-analyzers-3.0.0.jar @@ -28,11 +70,26 @@ copyfiles: chunk: xsltproc --output xincluded-profiled.xml \ - --stringparam profile.os "linux" \ + --stringparam profile.arch ${PROFILE.ARCH} \ + --stringparam profile.audience ${PROFILE.AUDIENCE} \ + --stringparam profile.condition ${PROFILE.CONDITION} \ + --stringparam profile.conformance ${PROFILE.CONFORMANCE} \ + --stringparam profile.lang ${PROFILE.LANG} \ + --stringparam profile.os ${PROFILE.OS} \ + --stringparam profile.revision ${PROFILE.REVISION} \ + --stringparam profile.revisionflag ${PROFILE.REVISIONFLAG} \ + --stringparam profile.role ${PROFILE.ROLE} \ + --stringparam profile.security ${PROFILE.SECURITY} \ + --stringparam profile.status ${PROFILE.STATUS} \ + --stringparam profile.userlevel ${PROFILE.USERLEVEL} \ + --stringparam profile.vendor ${PROFILE.VENDOR} \ + --stringparam profile.wordsize ${PROFILE.WORDSIZE} \ + --stringparam profile.attribute ${PROFILE.ATTRIBUTE} \ + --stringparam profile.value ${PROFILE.VALUE} \ ../profiling/profile.xsl \ ${INPUT_XML} - xsltproc --xinclude xsl/webhelp.xsl xincluded-profiled.xml + xsltproc ${OTHER_XSLTPROC_ARGS} --xinclude xsl/webhelp.xsl xincluded-profiled.xml rm xincluded-profiled.xml index: @@ -47,8 +104,8 @@ index: -classpath $(classpath) \ com.nexwave.nquindexer.IndexerMain - cp -r template/content/search/* ${OUTPUT_DIR}/search + cp -r template/search/* ${OUTPUT_DIR}/search clean: - $(RM) -r docs/* + $(RM) -r ${OUTPUT_DIR} diff --git a/xsl/webhelp/build.xml b/xsl/webhelp/build.xml index 6fb04cc64..87f44471d 100644 --- a/xsl/webhelp/build.xml +++ b/xsl/webhelp/build.xml @@ -75,7 +75,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -108,11 +108,6 @@ - - Indexing html files in ${output-dir} @@ -121,7 +116,7 @@ - + diff --git a/xsl/webhelp/template/content/search/default.props b/xsl/webhelp/template/search/default.props similarity index 100% rename from xsl/webhelp/template/content/search/default.props rename to xsl/webhelp/template/search/default.props diff --git a/xsl/webhelp/template/content/search/en-us.props b/xsl/webhelp/template/search/en-us.props similarity index 100% rename from xsl/webhelp/template/content/search/en-us.props rename to xsl/webhelp/template/search/en-us.props diff --git a/xsl/webhelp/template/content/search/es-es.props b/xsl/webhelp/template/search/es-es.props similarity index 100% rename from xsl/webhelp/template/content/search/es-es.props rename to xsl/webhelp/template/search/es-es.props diff --git a/xsl/webhelp/template/content/search/ja-jp.props b/xsl/webhelp/template/search/ja-jp.props similarity index 100% rename from xsl/webhelp/template/content/search/ja-jp.props rename to xsl/webhelp/template/search/ja-jp.props diff --git a/xsl/webhelp/template/content/search/nwSearchFnt.js b/xsl/webhelp/template/search/nwSearchFnt.js similarity index 100% rename from xsl/webhelp/template/content/search/nwSearchFnt.js rename to xsl/webhelp/template/search/nwSearchFnt.js diff --git a/xsl/webhelp/template/content/search/punctuation.props b/xsl/webhelp/template/search/punctuation.props similarity index 100% rename from xsl/webhelp/template/content/search/punctuation.props rename to xsl/webhelp/template/search/punctuation.props diff --git a/xsl/webhelp/template/content/search/stemmers/de_stemmer.js b/xsl/webhelp/template/search/stemmers/de_stemmer.js similarity index 100% rename from xsl/webhelp/template/content/search/stemmers/de_stemmer.js rename to xsl/webhelp/template/search/stemmers/de_stemmer.js diff --git a/xsl/webhelp/template/content/search/stemmers/en_stemmer.js b/xsl/webhelp/template/search/stemmers/en_stemmer.js similarity index 100% rename from xsl/webhelp/template/content/search/stemmers/en_stemmer.js rename to xsl/webhelp/template/search/stemmers/en_stemmer.js diff --git a/xsl/webhelp/template/content/search/stemmers/fr_stemmer.js b/xsl/webhelp/template/search/stemmers/fr_stemmer.js similarity index 100% rename from xsl/webhelp/template/content/search/stemmers/fr_stemmer.js rename to xsl/webhelp/template/search/stemmers/fr_stemmer.js -- 2.40.0