diff options
author | px4dev <px4@purgatory.org> | 2013-04-20 14:57:15 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-04-20 14:57:15 -0700 |
commit | a7cf9e2a366b3ac4d92e8e12da23308e285d6ead (patch) | |
tree | 2ee2e9159e848272fe320854d78625f6ec7fc3f4 /Makefile | |
parent | 754a11f4fcad7c9d6c2d771cf2f5ff58f90e2224 (diff) | |
download | px4-firmware-a7cf9e2a366b3ac4d92e8e12da23308e285d6ead.tar.gz px4-firmware-a7cf9e2a366b3ac4d92e8e12da23308e285d6ead.tar.bz2 px4-firmware-a7cf9e2a366b3ac4d92e8e12da23308e285d6ead.zip |
Make 'make upload' work
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -63,11 +63,26 @@ MQUIET = --no-print-directory # # If the user has listed a config as a target, strip it out and override CONFIGS. # +FIRMWARE_GOAL = firmware EXPLICIT_CONFIGS := $(filter $(CONFIGS),$(MAKECMDGOALS)) ifneq ($(EXPLICIT_CONFIGS),) CONFIGS := $(EXPLICIT_CONFIGS) .PHONY: $(EXPLICIT_CONFIGS) $(EXPLICIT_CONFIGS): all + +# +# If the user has asked to upload, they must have also specified exactly one +# config. +# +ifneq ($(filter upload,$(MAKECMDGOALS)),) +ifneq ($(words $(EXPLICIT_CONFIGS)),1) +$(error In order to upload, exactly one board config must be specified) +endif +FIRMWARE_GOAL = upload +.PHONY: upload +upload: + @: +endif endif # @@ -100,7 +115,7 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: -f $(PX4_MK_DIR)firmware.mk \ CONFIG=$(config) \ WORK_DIR=$(work_dir) \ - firmware + $(FIRMWARE_GOAL) # # Build the NuttX export archives. |