mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 04:33:34 +08:00
Add proper NuttX submodule checks
This commit is contained in:
@@ -104,7 +104,7 @@ DESIRED_FIRMWARES = $(foreach config,$(CONFIGS),$(IMAGE_DIR)$(config).px4)
|
||||
STAGED_FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(IMAGE_DIR)$(config).px4)
|
||||
FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(BUILD_DIR)$(config).build/firmware.px4)
|
||||
|
||||
all: $(DESIRED_FIRMWARES)
|
||||
all: checksubmodules $(DESIRED_FIRMWARES)
|
||||
|
||||
#
|
||||
# Copy FIRMWARES into the image directory.
|
||||
@@ -210,9 +210,11 @@ menuconfig:
|
||||
endif
|
||||
|
||||
$(NUTTX_SRC):
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) "NuttX sources missing - clone https://github.com/PX4/NuttX.git and try again."
|
||||
@$(ECHO) ""
|
||||
$(Q) if [ -d $(NUTTX_SRC) ]; then ./Tools/check_submodules.sh; else echo ""; echo ""; echo "NuttX submodule missing, doing auto checkout"; git submodule init; git submodule update; fi
|
||||
|
||||
.PHONY: checksubmodules
|
||||
checksubmodules:
|
||||
$(Q) if [ -d $(MAVLINK_SRC) ]; then ./Tools/check_submodules.sh; else echo ""; echo ""; echo "MAVLink submodule missing, doing auto checkout"; git submodule init; git submodule update; fi
|
||||
|
||||
#
|
||||
# Testing targets
|
||||
|
||||
@@ -7,4 +7,12 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STATUSRETVAL=$(git status --porcelain | grep -i "M NuttX")
|
||||
if [ "$STATUSRETVAL" == "" ]; then
|
||||
echo "checked NuttX submodule, correct version found"
|
||||
else
|
||||
echo "NuttX sub repo not at correct version. Try 'git submodule update'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user