From a703f869583ce8bf296b0238b85f0c7e170b3ef2 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 8 Mar 2016 15:25:25 +0100 Subject: Fix dist_clean target --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72c50b6..486e29a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,10 +197,10 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.bzr/) add_dependencies(pci build) # We need to generate build.h for source releases - add_custom_target(dist_clean - COMMAND make clean WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/driver - COMMAND ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_DIR} - ) + add_custom_target(dist_clean make clean -C driver + COMMAND ${CMAKE_MAKE_PROGRAM} clean + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) add_custom_target(dist_prepare DEPENDS dist_clean COMMAND ${CMAKE_COMMAND} -DPCILIB_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DPCILIB_BINARY_DIR=${CMAKE_SOURCE_DIR} -DPCILIB_RELEASE=${CPACK_PACKAGE_VERSION} -P ${CMAKE_SOURCE_DIR}/cmake/build.cmake WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -- cgit v1.2.3