From 7e8d8f9e7226bcc04a5f8dd4b01c9a6a4f1f9910 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 20 Apr 2013 12:49:56 -0700 Subject: [PATCH] Call sub-makes with -r to make them start faster (mostly on Windows, where this inhibits an enormous amount of silly scanning for things). Force non-parallel builds for the NuttX archives. --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0b8a65d94a..2347b09bf3 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: @echo %%%% Building $(config) in $(work_dir) @echo %%%% $(Q) mkdir -p $(work_dir) - $(Q) make -C $(work_dir) \ + $(Q) make -r -C $(work_dir) \ -f $(PX4_MK_DIR)firmware.mk \ CONFIG=$(config) \ WORK_DIR=$(work_dir) \ @@ -119,15 +119,21 @@ NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export) .PHONY: archives archives: $(NUTTX_ARCHIVES) +# We cannot build these parallel; note that we also force -j1 for the +# sub-make invocations. +ifneq ($(filter archives,$(MAKECMDGOALS)),) +.NOTPARALLEL: +endif + $(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@)) $(ARCHIVE_DIR)%.export: configuration = $(if $(filter $(board),px4io),io,nsh) $(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC) $(NUTTX_APPS) @echo %% Configuring NuttX for $(board) $(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export) - $(Q) make -C $(NUTTX_SRC) -r $(MQUIET) distclean + $(Q) make -r -j1 -C $(NUTTX_SRC) -r $(MQUIET) distclean $(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration)) @echo %% Exporting NuttX for $(board) - $(Q) make -C $(NUTTX_SRC) -r $(MQUIET) export + $(Q) make -r -j1 -C $(NUTTX_SRC) -r $(MQUIET) export $(Q) mkdir -p $(dir $@) $(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@