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