From: Pierre Habouzit Date: Fri, 18 May 2007 08:54:46 +0000 (+0200) Subject: rm *.li/*.c files when cpkg2c fails. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=9120e2c008281fb4acb9048545aa67873197b1d1;p=apps%2Fmadmutt.git rm *.li/*.c files when cpkg2c fails. Signed-off-by: Pierre Habouzit --- diff --git a/cmake/Cpkg2c.cmake b/cmake/Cpkg2c.cmake index 2dee6ec..0d1c01c 100644 --- a/cmake/Cpkg2c.cmake +++ b/cmake/Cpkg2c.cmake @@ -11,13 +11,13 @@ macro (MADMUTT_SOURCES _result _gen) add_custom_command( OUTPUT ${_li} MAIN_DEPENDENCY ${_abs} - COMMAND ${madmutt_SOURCE_DIR}/tools/cpkg2c -h ${_abs} > ${_li} + COMMAND ${madmutt_SOURCE_DIR}/tools/cpkg2c -h ${_abs} > ${_li} || \(${RM} ${_li}; exit 1\) COMMENT "Generating ${_li} from ${_abs}" ) add_custom_command( OUTPUT ${_c} MAIN_DEPENDENCY ${_abs} - COMMAND ${madmutt_SOURCE_DIR}/tools/cpkg2c -c ${_abs} > ${_c} + COMMAND ${madmutt_SOURCE_DIR}/tools/cpkg2c -c ${_abs} > ${_c} || \(${RM} ${_c}; exit 1\) COMMENT "Generating ${_c} from ${_abs}" ) list(APPEND ${_result} ${_li} ${_c})