From 00b2e54b1c7c6c7cee8ec33e007b37aaacbdfef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Tue, 12 Feb 2019 16:25:20 +0100 Subject: [PATCH] cmake: x86: Add wrapper targets for custom commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In general, to have correct dependencies, one must not only depend on files, but also a wrapper target for the file. This is done for some of the files in arch/x86/CMakeLists.txt, but not all. To be consistent with how dependency management is done we add wrapper targets and add dependencies to them. Signed-off-by: Sebastian Bøe --- arch/x86/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/x86/CMakeLists.txt b/arch/x86/CMakeLists.txt index ef38371d73c..e42feac71c5 100644 --- a/arch/x86/CMakeLists.txt +++ b/arch/x86/CMakeLists.txt @@ -153,6 +153,12 @@ if(CONFIG_X86_MMU) DEPENDS ${ZEPHYR_PREBUILT_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) + + add_custom_target( + mmu_tables_bin_target + DEPENDS + mmu_tables.bin + ) add_custom_command( OUTPUT mmu_tables.bin user_mmu_tables.bin COMMAND @@ -179,6 +185,7 @@ if(CONFIG_X86_MMU) mmu_tables.o WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS mmu_tables.bin + mmu_tables_bin_target ) add_custom_target( mmu_tables_o DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mmu_tables.o) @@ -216,6 +223,11 @@ if(CONFIG_GDT_DYNAMIC) # way. # # ${ZEPHYR_PREBUILT_EXECUTABLE}.elf -> gdt.bin -> gdt.o + add_custom_target( + gdt_bin_target + DEPENDS + gdt.bin + ) add_custom_command( OUTPUT gdt.bin COMMAND @@ -239,6 +251,7 @@ if(CONFIG_GDT_DYNAMIC) gdt.o WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS gdt.bin + gdt_bin_target ) add_custom_target( gdt_o DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gdt.o)