diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-03-27 23:31:36 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-03-28 22:13:59 +0000 |
commit | e6c54017a7fbf4009454577a445530a7649f2c4f (patch) | |
tree | bff7bb32beecb8b9038feedeff1e500e8ce864be /CMakeLists.txt | |
parent | 30900b443b85a7e760d703ca3d6efe61df4fe623 (diff) |
Fix out-of-tree "gen-authors" target
Change directory to the source tree before invoking `git shortlog`,
otherwise it fails on build directories outside the source tree.
Alexis suggested to move the git invocation to the perl script, this is
done now and also avoids writing AUTHORS.git in the source tree.
Change-Id: I5905ebf40d8d32a586c88671b52f28c542ca33ba
Reviewed-on: https://code.wireshark.org/review/14660
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 08d805480b..ac866575b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2582,15 +2582,15 @@ add_custom_target(test-sh ) set_target_properties(test-sh PROPERTIES FOLDER "Tests") -#Generate list of AUTHORS (Name + E-Mail) sort by name if (GIT_EXECUTABLE) - ADD_CUSTOM_TARGET( + # Update AUTHORS file with entries from git shortlog + add_custom_target( gen-authors - COMMAND ${GIT_EXECUTABLE} --no-pager shortlog -se HEAD > ${CMAKE_SOURCE_DIR}/AUTHORS.git - COMMAND ${PERL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/generate_authors.pl ${CMAKE_SOURCE_DIR}/AUTHORS.src ${CMAKE_SOURCE_DIR}/AUTHORS.git > ${CMAKE_SOURCE_DIR}/AUTHORS + COMMAND ${PERL_EXECUTABLE} tools/generate_authors.pl AUTHORS.src > AUTHORS + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) else (GIT_EXECUTABLE) - ADD_CUSTOM_TARGET( gen-authors COMMAND ${CMAKE_COMMAND} -E echo "Git not found." ) + add_custom_target( gen-authors COMMAND ${CMAKE_COMMAND} -E echo "Git not found." ) endif (GIT_EXECUTABLE) set_target_properties(gen-authors PROPERTIES FOLDER "Docs") |