Browse Source

Makefile: wipe incomplete ninja build generation

release/1.12
Daniel Agar 4 years ago committed by Lorenz Meier
parent
commit
3ad0da51c4
  1. 2
      Makefile

2
Makefile

@ -174,6 +174,8 @@ define cmake-build
@$(call cmake-cache-check) @$(call cmake-cache-check)
@# make sure to start from scratch when switching from GNU Make to Ninja @# make sure to start from scratch when switching from GNU Make to Ninja
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi @if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
@# make sure to start from scratch if ninja build file is missing
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ ! -f $(BUILD_DIR)/build.ninja ]; then rm -rf $(BUILD_DIR); fi
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary @# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \ @if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
mkdir -p $(BUILD_DIR) \ mkdir -p $(BUILD_DIR) \

Loading…
Cancel
Save