From f71aa73e9c2ecef8fa86d5990f0d4620e365706f Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 29 Apr 2015 10:25:27 +0000 Subject: [PATCH] Ensure that asciidoc configuration file changes trigger doc builds git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5322 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- doc/CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 30fafe4fc..45fc08a3e 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,3 +1,7 @@ +set (CONF_FILES + ${CMAKE_CURRENT_BINARY_DIR}/wsjtx.conf + ) + set (common_SRCS common/communication.adoc common/license.adoc @@ -131,12 +135,19 @@ function (html_document) set (${args_HTML} ${_doc_file} PARENT_SCOPE) endfunction (html_document) -configure_file (wsjtx.conf.in wsjtx.conf) +configure_file (wsjtx.conf.in wsjtx.conf.out) +# copy the file to the final location only if the generated output +# changes reduces needless rebuilds +execute_process ( + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E copy_if_different wsjtx.conf.out wsjtx.conf + ) + html_document( HTML user_guide SOURCE user_guide/wsjtx-main.adoc ASCIIDOC_OPTIONS -a data-uri -a toc2 -a max-width=1024px --conf-file=${CMAKE_CURRENT_BINARY_DIR}/wsjtx.conf --backend=xhtml11 - DEPENDS ${common_SRCS} ${UG_SRCS} ${UG_IMGS} + DEPENDS ${CONF_FILES} ${common_SRCS} ${UG_SRCS} ${UG_IMGS} ) add_custom_target (docs ALL DEPENDS ${user_guide})