From a30dcd9951ed5814ca1974a31db83756bfb5b233 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 17 Oct 2016 00:35:50 +0200 Subject: cmake: fix missing docbook dependency Running "ninja developer_guide_html" somehow did not produce a new HTML docbook once wsluarm.ascii (a dependency of developer-guide.xml) was modified. It turns out that output file docbook/wsdg_html/index.html only had a ordering-only dependency on target generate_developer-guide.xml. An extra dependency is needed on the output file to ensure that the HTML file gets rebuild on changes. See the last note on https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ Fixes v2.1.0rc0-2137-gd544ecd ("cmake: fix parallel docbook build"). Change-Id: I7689c71994f13b29cf7f8561f7c993aa8298632d Reviewed-on: https://code.wireshark.org/review/18225 Reviewed-by: Graham Bloice Reviewed-by: Peter Wu --- cmake/modules/FindXSLTPROC.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake index c1baffb2f0..5c42028a24 100644 --- a/cmake/modules/FindXSLTPROC.cmake +++ b/cmake/modules/FindXSLTPROC.cmake @@ -127,6 +127,7 @@ MACRO(XML2HTML _target_dep _dir_pfx _mode _dbk_source _gfx_sources) ${_dbk_source} DEPENDS generate_${_dbk_source} + ${_dbk_source} ${_dbk_dep} ${_gfx_deps} ) @@ -173,6 +174,7 @@ MACRO(XML2PDF _target_dep _output _dbk_source _stylesheet _paper) ${_output} DEPENDS generate_${_dbk_source} + ${_dbk_source} ${_dbk_dep} ${_stylesheet} ) @@ -183,10 +185,10 @@ ENDMACRO(XML2PDF) # wsug or wsdg # user-guide.xml or developer-guide.xml #) -MACRO(XML2HHP _target_dep _guide _docbooksource) +MACRO(XML2HHP _target_dep _guide _dbk_source) # We depend on the docbook target to avoid parallel builds. SET(_dbk_dep ${_target_dep}_docbook) - GET_FILENAME_COMPONENT( _source_base_name ${_docbooksource} NAME_WE ) + GET_FILENAME_COMPONENT( _source_base_name ${_dbk_source} NAME_WE ) set( _output_chm ${_source_base_name}.chm ) set( _output_hhp ${_source_base_name}.hhp ) set( _output_toc_hhc ${_source_base_name}-toc.hhc ) @@ -205,7 +207,7 @@ MACRO(XML2HHP _target_dep _guide _docbooksource) # HTML Help doesn't render decimal character entities in the title. COMMAND ${SED_EXECUTABLE} -e "s|er’s Guide|er's Guide|" - < ${_docbooksource} + < ${_dbk_source} > ${_docbook_plain_title} COMMAND ${XSLTPROC_EXECUTABLE} --path "${_xsltproc_path}" @@ -218,7 +220,8 @@ MACRO(XML2HHP _target_dep _guide _docbooksource) --nonet custom_layer_chm.xsl ${_docbook_plain_title} DEPENDS - generate_${_docbooksource} + generate_${_dbk_source} + ${_dbk_source} ${_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 -- cgit v1.2.1