mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-06 16:03:58 -04:00
PX4: allow NuttX tree to be in directory above Firmware tree
This commit is contained in:
parent
4794d90bbb
commit
0e0afbd756
@ -3,11 +3,20 @@
|
|||||||
ifneq ($(PX4_ROOT),)
|
ifneq ($(PX4_ROOT),)
|
||||||
|
|
||||||
# try to cope with relative paths
|
# try to cope with relative paths
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/NuttX),)
|
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
||||||
PX4_ROOT := $(shell cd $(SKETCHBOOK)/$(PX4_ROOT) && pwd)
|
PX4_ROOT := $(shell cd $(SKETCHBOOK)/$(PX4_ROOT) && pwd)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
||||||
|
$(error ERROR: PX4_ROOT not set correctly - no nuttx-configs directory found)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# allow user to have NuttX git tree in directory above Firmware tree. This
|
||||||
|
# makes life simpler for git usage
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/NuttX),)
|
ifeq ($(wildcard $(PX4_ROOT)/NuttX),)
|
||||||
$(error ERROR: PX4_ROOT not set correctly - no NuttX directory found)
|
ifeq ($(wildcard $(PX4_ROOT)/../NuttX),)
|
||||||
|
$(error ERROR: NuttX git tree not found)
|
||||||
|
endif
|
||||||
|
$(shell cd $(PX4_ROOT) && ln -s ../NuttX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# we have different config files for V1 and V2
|
# we have different config files for V1 and V2
|
||||||
|
Loading…
Reference in New Issue
Block a user