cmake: fix parallel docbook build
authorPeter Wu <peter@lekensteyn.nl>
Fri, 26 Feb 2016 00:03:45 +0000 (01:03 +0100)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Fri, 26 Feb 2016 19:52:09 +0000 (19:52 +0000)
Let targets depend on the generate_developer-guide.xml target instead of
the developer-guide.xml output file.

Change-Id: I66106ad69c9baedbd58a008b4dbbbf93b787c2c2
Reviewed-on: https://code.wireshark.org/review/14156
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
cmake/modules/FindASCIIDOC.cmake
cmake/modules/FindXSLTPROC.cmake
docbook/CMakeLists.txt

index dc272baca91e42369bad8669e26b0a431c34c554..ae3a474d3cf4e5ec0219c25a2e728acafb0b755c 100644 (file)
@@ -85,7 +85,7 @@ MACRO( ASCIIDOC2DOCBOOK _asciidocsource _conf_files _src_files _built_deps )
 
     TO_A2X_COMPATIBLE_PATH ( ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource} _a2x_asciidocsource )
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT
             ${_output_xml}
         # XXX - Output to a specific directory, e.g. wsdg_generated_src
@@ -107,6 +107,7 @@ MACRO( ASCIIDOC2DOCBOOK _asciidocsource _conf_files _src_files _built_deps )
             ${_src_deps}
             ${${_built_deps}}
     )
+    add_custom_target(generate_${_output_xml} DEPENDS ${_output_xml})
     unset(_src_deps)
     unset(_conf_deps)
     unset(_conf_opts_list)
index 5f851c7239f6e1c5a42e15e990a698eaab50df75..6b3b71df4a3e663b379f4a4b2dc4c6541d08172b 100644 (file)
@@ -127,7 +127,7 @@ MACRO(XML2HTML _target_dep _dir_pfx _mode _dbk_source _gfx_sources)
             ${_STYLESHEET}
             ${_dbk_source}
         DEPENDS
-            ${_dbk_source}
+            generate_${_dbk_source}
             ${_dbk_dep}
             #${_validated}
             ${_gfx_deps}
@@ -173,7 +173,7 @@ MACRO(XML2PDF _target_dep _output _dbk_source _stylesheet _paper)
             ${_output}.fo
             ${_output}
         DEPENDS
-            ${_dbk_source}
+            generate_${_dbk_source}
             ${_dbk_dep}
             ${_stylesheet}
     )
@@ -219,7 +219,7 @@ MACRO(XML2HHP _target_dep _guide _docbooksource)
             --nonet custom_layer_chm.xsl
             ${_docbook_plain_title}
         DEPENDS
-            ${_docbooksource}
+            generate_${_docbooksource}
             ${_dbk_dep}
             # AsciiDoc uses UTF-8 by default, which is unsupported by HTML
             # Help. We may want to render an ISO-8859-1 version, or get rid
index b257b69a7c9fbf6d36763fb66017dce77797fe89..cd5204bf0ed5f1f696cba1cd1c86e088fbc4b99a 100644 (file)
@@ -312,11 +312,11 @@ if(ENABLE_HTML_GUIDES OR ENABLE_PDF_GUIDES OR ENABLE_CHM_GUIDES)
        set( ASCIIDOC_CONF_FILES asciidoc.conf asciidoctor-asciidoc.conf )
 
        ASCIIDOC2DOCBOOK(user-guide.asciidoc ASCIIDOC_CONF_FILES WSUG_SOURCE WSUG_BUILT_DEPS)
-       add_custom_target(user_guide_docbook DEPENDS user-guide.xml)
+       add_custom_target(user_guide_docbook DEPENDS generate_user-guide.xml)
        set_target_properties(user_guide_docbook PROPERTIES FOLDER "Docbook")
 
        ASCIIDOC2DOCBOOK(developer-guide.asciidoc ASCIIDOC_WSLUARM_CONF_FILES WSDG_SOURCE WSDG_BUILT_DEPS)
-       add_custom_target(developer_guide_docbook DEPENDS developer-guide.xml)
+       add_custom_target(developer_guide_docbook DEPENDS generate_developer-guide.xml)
        set_target_properties(developer_guide_docbook PROPERTIES FOLDER "Docbook")
 
        # Top-level guide targets.