aboutsummaryrefslogtreecommitdiffstats
path: root/docbook/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2014-02-09 11:01:49 -0800
committerGerald Combs <gerald@wireshark.org>2014-02-11 18:04:45 +0000
commit5e3113e7c96c515d70288cdb5b44e0ebdc5b5711 (patch)
tree8016b9c3ab9272065976e5ee2a3c7b540d8c50d5 /docbook/CMakeLists.txt
parentbed30b8a94b645361a00d70ee2db0ec184cae103 (diff)
Finish converting the Developer's Guide to AsciiDoc.
Add developer-guide-docinfo.xml, which lets us carry over DocBook front matter. Remove the meta_info chapter. Most of its contents are now in developer-guide-docinfo.xml. Add a DocBook revision history based on hints from the Git/SVN/CVS revision history. Comment out or note makefile content that's no longer necessary for converting the Developer's Guide but will be useful for converting the User's Guide. Fix building the release notes with CMake. Other minor changes. Tested with Autotools, nmake, and CMake. Change-Id: Ib6d50c821ca906fff50a84ad4d6af3212ebdff0a Reviewed-on: https://code.wireshark.org/review/155 Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'docbook/CMakeLists.txt')
-rw-r--r--docbook/CMakeLists.txt63
1 files changed, 38 insertions, 25 deletions
diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt
index 1431c00100..7e4d814ca7 100644
--- a/docbook/CMakeLists.txt
+++ b/docbook/CMakeLists.txt
@@ -182,22 +182,6 @@ set(WSUG_GRAPHICS
)
set(WSDG_FILES
- wsdg_generated_src/WSDG_chapter_build_intro.xml
- wsdg_generated_src/WSDG_chapter_capture.xml
- wsdg_generated_src/WSDG_chapter_dissection.xml
- wsdg_generated_src/WSDG_chapter_env_intro.xml
- wsdg_generated_src/WSDG_chapter_libraries.xml
- wsdg_generated_src/WSDG_chapter_quick_setup.xml
- wsdg_generated_src/WSDG_chapter_sources.xml
- wsdg_generated_src/WSDG_chapter_tools.xml
- wsdg_generated_src/WSDG_chapter_userinterface.xml
- wsdg_generated_src/WSDG_chapter_works.xml
- wsdg_src/WSDG_meta_info.xml
- wsdg_generated_src/WSDG_preface.xml
- ws.css
-)
-
-set(WSDG_ASCIIDOC_FILES
wsdg_src/WSDG_chapter_build_intro.asciidoc
wsdg_src/WSDG_chapter_capture.asciidoc
wsdg_src/WSDG_chapter_dissection.asciidoc
@@ -209,6 +193,7 @@ set(WSDG_ASCIIDOC_FILES
wsdg_src/WSDG_chapter_userinterface.asciidoc
wsdg_src/WSDG_chapter_works.asciidoc
wsdg_src/WSDG_preface.asciidoc
+ ws.css
)
set(WSDG_GRAPHICS
@@ -233,8 +218,37 @@ set(WSUG_SOURCE
${WSUG_GRAPHICS}
)
+MACRO( ASCIIDOC2DOCBOOK _asciidocsource _conffile )
+ GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
+ set( A2X_HTML_OPTS --stylesheet=ws.css )
+ set( _output_xml ${_source_base_name}.xml )
+ set( _output_dbk ${_source_base_name}.dbk )
+ ADD_CUSTOM_TARGET(${_output_xml}
+ # XXX - Output to a specific directory, e.g. wsdg_generated_src
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMAND ${A2X_EXECUTABLE}
+ --verbose
+ --attribute=docinfo
+ --destination-dir=${CMAKE_CURRENT_BINARY_DIR}
+ --asciidoc-opts="--conf-file=${CMAKE_CURRENT_SOURCE_DIR}/${_conffile}"
+ --no-xmllint
+ --format=docbook
+ --fop
+ ${A2X_HTML_OPTS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_conffile}
+ ${WSDG_GENERATED_FILES}
+ )
+ENDMACRO()
+
+ASCIIDOC2DOCBOOK( developer-guide.asciidoc asciidoc.conf )
+
SET( WSDG_GENERATED_FILES )
-# Convert an AsciiDoc document to a Docbook chapter
+# Convert an AsciiDoc document to a DocBook chapter
+# Used for chapter-by-chapter conversion from DocBook to AsciiDoc.
+# Can be removed after the User's Guide is converted.
# .asciidoc -> whole book (.dbk) -> chapter (.xml)
MACRO( ASCIIDOC2CHAPTER _asciidocsource _conffile )
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
@@ -268,14 +282,14 @@ MACRO( ASCIIDOC2CHAPTER _asciidocsource _conffile )
LIST( APPEND WSDG_GENERATED_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_output_xml} )
ENDMACRO()
-FOREACH(ASCIIDOCFILE ${WSDG_ASCIIDOC_FILES})
- ASCIIDOC2CHAPTER(
- ${ASCIIDOCFILE}
- asciidoc.conf
- )
-ENDFOREACH()
+#FOREACH(ASCIIDOCFILE ${WSDG_ASCIIDOC_FILES})
+# ASCIIDOC2CHAPTER(
+# ${ASCIIDOCFILE}
+# asciidoc.conf
+# )
+#ENDFOREACH()
-ADD_CUSTOM_TARGET( wsdg_generated_src DEPENDS ${WSDG_GENERATED_FILES} )
+#ADD_CUSTOM_TARGET( wsdg_generated_src DEPENDS ${WSDG_GENERATED_FILES} )
# developer-guide.xml must be first in the list
set(WSDG_SOURCE
@@ -283,7 +297,6 @@ set(WSDG_SOURCE
git_version.xml
${WSDG_FILES}
${WSDG_GRAPHICS}
- wsdg_generated_src
)
set(WSLUA_MODULES