mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Makefile fix /bin/shs ninja check
This commit is contained in:
committed by
Lorenz Meier
parent
8421742906
commit
fb3465c117
3
Makefile
3
Makefile
@@ -67,7 +67,6 @@ all: px4fmu-v2_default
|
|||||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||||
j ?= 4
|
j ?= 4
|
||||||
|
|
||||||
# disable ninja by default for now because it hides upload progress
|
|
||||||
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
|
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
|
||||||
ifdef NINJA_BUILD
|
ifdef NINJA_BUILD
|
||||||
PX4_CMAKE_GENERATOR ?= "Ninja"
|
PX4_CMAKE_GENERATOR ?= "Ninja"
|
||||||
@@ -89,7 +88,7 @@ endif
|
|||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# describe how to build a cmake config
|
# describe how to build a cmake config
|
||||||
define cmake-build
|
define cmake-build
|
||||||
+@if [ $(PX4_CMAKE_GENERATOR) == "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||||
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
||||||
endef
|
endef
|
||||||
|
|||||||
Reference in New Issue
Block a user