CMake: Don't assume we have a "cat" command.

Use "copy /B" on Windows to create wireshark.pod, similar to
doc/Makefile.nmake.

Change-Id: I454afca0bd3497cca795ca18256dd7c4e2f224d4
Reviewed-on: https://code.wireshark.org/review/4415
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2014-10-01 17:18:31 -07:00
parent ff7b51f920
commit 242a1e5012
1 changed files with 25 additions and 6 deletions

View File

@ -1464,23 +1464,42 @@ ADD_CUSTOM_COMMAND(
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
${CMAKE_BINARY_DIR}/wireshark.pod
COMMAND ${PERL_EXECUTABLE}
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
< ${CMAKE_BINARY_DIR}/AUTHORS-SHORT
> ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
COMMAND cat
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
> ${CMAKE_BINARY_DIR}/wireshark.pod
DEPENDS
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
)
if(WIN32)
FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template WPT_WIN_PATH)
FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT ASF_WIN_PATH)
FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/wireshark.pod WP_WIN_PATH)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
COMMAND copy /B ${WPT_WIN_PATH} + ${ASF_WIN_PATH} ${WP_WIN_PATH}
DEPENDS
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
)
else()
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
COMMAND cat
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
> ${CMAKE_BINARY_DIR}/wireshark.pod
DEPENDS
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
)
endif()
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/capinfos 1 )
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/captype 1 )
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/dftest 1 )