diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-07-23 11:26:22 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-07-24 17:52:29 +0000 |
commit | 0c0dadb2ee08b13f6b834c6f72c89ac80ce21d3b (patch) | |
tree | 89e8af2f643df6f54d4d2c265febae8fec58a1c9 | |
parent | b489a835c21b9ada2db33482c528a9988f6f4696 (diff) |
CMake: More update_tools_help fixes.
Use our target name instead of $<TARGET_FILE:...> in a few places. As
Peter pointed out, CMake will do the desired substitution for us. Update
a comment.
Change-Id: I03bf98cc1bf4807213eb89e5e5b1f4e3c08c17be
Reviewed-on: https://code.wireshark.org/review/28836
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | docbook/CMakeLists.txt | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt index 33f78d9cc8..15cda5a215 100644 --- a/docbook/CMakeLists.txt +++ b/docbook/CMakeLists.txt @@ -77,10 +77,16 @@ if (PCAP_FOUND) ) endif(PCAP_FOUND) -# We want the wsug_* targets to depend on the tools help files. -# We want update_tools_help to be an independent target. -# We don't necessarily want to depend on building our executables before -# being able to build our documentation. +# We want the wsug_* targets to depend on our tools help files. However, +# each WSUG_TOOLS_HELP_COMMANDS target depends on its corresponding +# binary. Due to this and the following issues update_tools_help should +# be as independent as possible: +# - Aside from the first line (which contains the git commit ID) each +# command's `-h` output might change every few months or years. +# - It changes files in the source directory, which usually gives you +# git changes that you probably don't want or at least don't care about. +# - Having our documentation depend on our executables increases the +# likelihood of unwanted rebuilds, particularly on the Buildbot. set(WSUG_TOOLS_HELP_FILES) set(GUIDE_INSTALL_DIRS) @@ -100,8 +106,8 @@ foreach(th_command ${WSUG_TOOLS_HELP_COMMANDS}) list(APPEND WSUG_TOOLS_HELP_FILES ${th_file}) add_custom_command( OUTPUT ${th_file} - COMMAND $<TARGET_FILE:${th_command}> -h > ${th_file} - DEPENDS $<TARGET_FILE:${th_command}> + COMMAND ${th_command} -h > ${th_file} + DEPENDS ${th_command} ) endforeach() @@ -113,15 +119,15 @@ if(BUILD_editcap) list(APPEND WSUG_TOOLS_HELP_FILES ${th_file}) add_custom_command( OUTPUT ${th_file} - COMMAND $<TARGET_FILE:editcap> -F > ${th_file} - DEPENDS $<TARGET_FILE:editcap> + COMMAND editcap -F > ${th_file} + DEPENDS editcap ) set(th_file ${CMAKE_CURRENT_SOURCE_DIR}/wsug_src/editcap-T.txt) list(APPEND WSUG_TOOLS_HELP_FILES ${th_file}) add_custom_command( OUTPUT ${th_file} - COMMAND $<TARGET_FILE:editcap> -T > ${th_file} - DEPENDS $<TARGET_FILE:editcap> + COMMAND editcap -T > ${th_file} + DEPENDS editcap ) else() message(STATUS "WSUG: will not update editcap output") |