mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Fix double build when using new make target syntax
When make is invoked as "make posix posix_default" it will build the posix_default target twice. The Makefile was fixed to correct this. If "make posix" is run, the Makefile still calls "make PX4_TARGET_OS=posix". If "make posix posix_default" is run, the posix target just exports PX4_TARGET_OS=posix and then make evaluates the next goal (posix_default). Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
15
Makefile
15
Makefile
@@ -37,6 +37,7 @@ TARGETS := nuttx posix qurt
|
||||
EXPLICIT_TARGET := $(filter $(TARGETS),$(MAKECMDGOALS))
|
||||
ifneq ($(EXPLICIT_TARGET),)
|
||||
export PX4_TARGET_OS=$(EXPLICIT_TARGET)
|
||||
export GOALS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
#
|
||||
@@ -277,14 +278,12 @@ testbuild:
|
||||
$(Q) (cd $(PX4_BASE) && $(MAKE) distclean && $(MAKE) archives && $(MAKE) -j8)
|
||||
$(Q) (zip -r Firmware.zip $(PX4_BASE)/Images)
|
||||
|
||||
nuttx:
|
||||
make PX4_TARGET_OS=$@ $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
|
||||
posix:
|
||||
make PX4_TARGET_OS=$@ $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
|
||||
qurt:
|
||||
make PX4_TARGET_OS=$@ $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
nuttx posix qurt:
|
||||
ifeq ($(GOALS),)
|
||||
make PX4_TARGET_OS=$@ $(GOALS)
|
||||
else
|
||||
export PX4_TARGET_OS=$@
|
||||
endif
|
||||
|
||||
posixrun:
|
||||
Tools/posix_run.sh
|
||||
|
||||
Reference in New Issue
Block a user