1 | # Configuration
|
---|
2 | # The name of the source DocBook xml file
|
---|
3 | INPUT_XML = docsrc/readme.xml
|
---|
4 |
|
---|
5 | # The makefile assumes that you have a
|
---|
6 | # directory named images that contains
|
---|
7 | # your images. It copies this to the
|
---|
8 | # output directory
|
---|
9 | USER_IMAGES_PARENT_DIR=docsrc
|
---|
10 |
|
---|
11 | # Name of the desired output directory
|
---|
12 | # This will be created if it doesn't exist
|
---|
13 | OUTPUT_DIR = docs
|
---|
14 |
|
---|
15 | # A list of files to exclude from indexing
|
---|
16 | INDEXER_EXCLUDED_FILES = ix01.html
|
---|
17 |
|
---|
18 | # Profiling params. For more information on
|
---|
19 | # profiling (conditional text) and DocBook documents, see
|
---|
20 | # http://www.sagehill.net/docbookxsl/Profiling.html
|
---|
21 | PROFILE.ARCH = ""
|
---|
22 | PROFILE.AUDIENCE = ""
|
---|
23 | PROFILE.CONDITION = ""
|
---|
24 | PROFILE.CONFORMANCE = ""
|
---|
25 | PROFILE.LANG = ""
|
---|
26 | PROFILE.OS = ""
|
---|
27 | PROFILE.REVISION = ""
|
---|
28 | PROFILE.REVISIONFLAG = ""
|
---|
29 | PROFILE.ROLE = ""
|
---|
30 | PROFILE.SECURITY = ""
|
---|
31 | PROFILE.STATUS = ""
|
---|
32 | PROFILE.USERLEVEL = ""
|
---|
33 | PROFILE.VENDOR = ""
|
---|
34 | PROFILE.WORDSIZE = ""
|
---|
35 | PROFILE.ATTRIBUTE = ""
|
---|
36 | PROFILE.VALUE = ""
|
---|
37 |
|
---|
38 | # Use this variable to pass in other stringparams
|
---|
39 | # to the xsltproc pass that generates DocBook output.
|
---|
40 | # For example:
|
---|
41 | # OTHER_XSLTPROC_ARGS = --stringparam example.param ""
|
---|
42 | OTHER_XSLTPROC_ARGS =
|
---|
43 |
|
---|
44 | # Path to the DocBook Distribution that
|
---|
45 | # contains the xslts etc.
|
---|
46 | DOCBOOK_DIST := ../$(pwd)
|
---|
47 |
|
---|
48 | # =================================================
|
---|
49 | # You probably don't need to change anything below
|
---|
50 | # unless you choose to add a validation step.
|
---|
51 | # ================================================
|
---|
52 | DOCBOOK_EXTENSIONS_DIR = $(DOCBOOK_DIST)/extensions
|
---|
53 | INDEXER_JAR := $(DOCBOOK_EXTENSIONS_DIR)/webhelpindexer.jar
|
---|
54 | TAGSOUP_JAR := $(DOCBOOK_EXTENSIONS_DIR)/tagsoup-1.2.1.jar
|
---|
55 | LUCENE_ANALYZER_JAR := $(DOCBOOK_EXTENSIONS_DIR)/lucene-analyzers-3.0.0.jar
|
---|
56 | LUCENE_CORE_JAR := $(DOCBOOK_EXTENSIONS_DIR)/lucene-core-3.0.0.jar
|
---|
57 |
|
---|
58 | classpath := $(INDEXER_JAR):$(TAGSOUP_JAR):$(LUCENE_ANALYZER_JAR):$(LUCENE_CORE_JAR)
|
---|
59 |
|
---|
60 | all: webhelp
|
---|
61 |
|
---|
62 | webhelp: $(INPUT_XML) copyfiles chunk index
|
---|
63 |
|
---|
64 | copyfiles:
|
---|
65 | -rm -rf $(OUTPUT_DIR)
|
---|
66 | mkdir -p $(OUTPUT_DIR)
|
---|
67 | cp -r template/common ${OUTPUT_DIR}
|
---|
68 | test ! -d $(USER_IMAGES_PARENT_DIR)/images/ || cp -r $(USER_IMAGES_PARENT_DIR)/images ${OUTPUT_DIR}/images
|
---|
69 | cp template/favicon.ico ${OUTPUT_DIR}/
|
---|
70 |
|
---|
71 | chunk:
|
---|
72 | xsltproc --xinclude --output xincluded-profiled.xml \
|
---|
73 | --stringparam profile.arch ${PROFILE.ARCH} \
|
---|
74 | --stringparam profile.audience ${PROFILE.AUDIENCE} \
|
---|
75 | --stringparam profile.condition ${PROFILE.CONDITION} \
|
---|
76 | --stringparam profile.conformance ${PROFILE.CONFORMANCE} \
|
---|
77 | --stringparam profile.lang ${PROFILE.LANG} \
|
---|
78 | --stringparam profile.os ${PROFILE.OS} \
|
---|
79 | --stringparam profile.revision ${PROFILE.REVISION} \
|
---|
80 | --stringparam profile.revisionflag ${PROFILE.REVISIONFLAG} \
|
---|
81 | --stringparam profile.role ${PROFILE.ROLE} \
|
---|
82 | --stringparam profile.security ${PROFILE.SECURITY} \
|
---|
83 | --stringparam profile.status ${PROFILE.STATUS} \
|
---|
84 | --stringparam profile.userlevel ${PROFILE.USERLEVEL} \
|
---|
85 | --stringparam profile.vendor ${PROFILE.VENDOR} \
|
---|
86 | --stringparam profile.wordsize ${PROFILE.WORDSIZE} \
|
---|
87 | --stringparam profile.attribute ${PROFILE.ATTRIBUTE} \
|
---|
88 | --stringparam profile.value ${PROFILE.VALUE} \
|
---|
89 | ../profiling/profile.xsl \
|
---|
90 | ${INPUT_XML}
|
---|
91 |
|
---|
92 | xsltproc ${OTHER_XSLTPROC_ARGS} xsl/webhelp.xsl xincluded-profiled.xml
|
---|
93 |
|
---|
94 | rm xincluded-profiled.xml
|
---|
95 | index:
|
---|
96 | java \
|
---|
97 | -DhtmlDir=$(OUTPUT_DIR) \
|
---|
98 | -DindexerLanguage=en \
|
---|
99 | -DhtmlExtension=html \
|
---|
100 | -DdoStem=true \
|
---|
101 | -DindexerExcludedFiles=$(INDEXER_EXCLUDED_FILES) \
|
---|
102 | -Dorg.xml.sax.driver=org.ccil.cowan.tagsoup.Parser \
|
---|
103 | -Djavax.xml.parsers.SAXParserFactory=org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl \
|
---|
104 | -classpath $(classpath) \
|
---|
105 | com.nexwave.nquindexer.IndexerMain
|
---|
106 |
|
---|
107 | cp -r template/search/* ${OUTPUT_DIR}/search
|
---|
108 |
|
---|
109 | clean:
|
---|
110 | $(RM) -r ${OUTPUT_DIR}
|
---|
111 |
|
---|