Makefile.sample 4.1 KB

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