Fix for make_dbg_constants target always being out of date.

It would cause the perl script to run with every `make` even if it's not
really necessary.
This commit is contained in:
Jon Siwek 2010-10-20 15:46:17 -05:00
parent 05d2c89618
commit 27d80462da

View file

@ -123,8 +123,6 @@ endforeach(bift)
########## targets that need binpac ##########
#TODO: need logic to find binpac when it's a separate component?
macro(BINPAC_TARGET pacFile)
get_filename_component(basename ${pacFile} NAME_WE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${basename}_pac.h
@ -196,19 +194,16 @@ if (USE_NMALLOC)
endif ()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.h
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
COMMAND ${PERL_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.pl
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.pl
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
COMMENT "[Perl] Processing debug commands"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(make_dbg_constants DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.h)
set(bro_SRCS
${BINPAC_AUXSRC}
${BINPAC_RPC_AUXSRC}
@ -222,6 +217,7 @@ set(bro_SRCS
${FLEX_REScanner_OUTPUTS}
parse.cc
${FLEX_Scanner_OUTPUTS}
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
main.cc
net_util.cc
util.cc
@ -368,8 +364,6 @@ add_definitions(-DPOLICYDEST="${CMAKE_INSTALL_PREFIX}/${DATADIR}")
add_executable(bro ${bro_SRCS})
add_dependencies(bro make_dbg_constants)
target_link_libraries(bro
m
binpac_lib