summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-10-01 13:24:50 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-01 20:45:55 -0700
commit58540e90a5269604cb11857c0f579a915a85de58 (patch)
tree358460e74f03b02d40cda43ad34aecdfbe138a67 /Makefile.rules
parentfa7baa6ad917ccbcbfe0d355adee030fc2416af3 (diff)
downloadchrome-ec-58540e90a5269604cb11857c0f579a915a85de58.tar.gz
Cause "make buildall -j" to yell about failures.
When building with -j, it's easy to miss errors. If you don't have your shell configured to warn you about nonzero exit, you may not even notice that "make buildall -j" failed. To make it more obvious, we'll do one level of recursion for that target. That will ensure that the last line of output is always a pass/fail message. BUG=none BRANCH=none TEST=make buildall -j (with and without errors) Before this CL, a successful "make buildall -j" ends with this: MV ec.bin OBJCOPY ec.hex LD RW/ec.RW.elf NM RO/ec.RO.smap OBJCOPY RO/ec.RO.flat NM RW/ec.RW.smap OBJCOPY RW/ec.RW.flat CAT ec.obj OBJCOPY ec.bin COPY_RW ec.bin MV ec.bin buildall completed successfully! (cr) ((fa7baa6...)) ~/trunk/src/platform/ec $ while a failing one looks like this: MV ec.bin OBJCOPY ec.hex LD RW/ec.RW.elf NM RO/ec.RO.smap OBJCOPY RO/ec.RO.flat NM RW/ec.RW.smap OBJCOPY RW/ec.RW.flat CAT ec.obj OBJCOPY ec.bin COPY_RW ec.bin MV ec.bin (cr) ((fa7baa6...)) ~/trunk/src/platform/ec $ Did you see the difference? I suspect some people miss it. With this CL, a failing "make buildall -j" looks like this: NM RW/ec.RW.smap OBJCOPY RW/ec.RW.flat CAT ec.obj OBJCOPY ec.bin NM RW/chip/mec1322/lfw/ec_lfw-lfw.smap OBJCOPY RW/chip/mec1322/lfw/ec_lfw-lfw.flat COPY_RW ec.bin MV ec.bin COPY_RW ec.bin MV ec.bin OBJCOPY ec.bin COPY_RW ec.bin MV ec.bin make[1]: Leaving directory '/mnt/host/source/src/platform/ec' Makefile.rules:93: recipe for target 'buildall' failed make: *** [buildall] Error 2 (cr) (stopit) ~/trunk/src/platform/ec $ Change-Id: Id9b47d2869f61e8e3e44b3c618399ca9223f0a71 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/303811 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index cdd75caa33..32ba66a8ba 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -81,8 +81,17 @@ cmd_etags = etags -o $@ $(shell cat $<)
cmd_ctags = ctags -o $@ $(shell cat $<)
targ_if_prog = $(if $(shell which $(1) 2>/dev/null),$(2),)
+# When building with -j, it's easy to miss errors. If you don't have your shell
+# configured to warn you about nonzero exit, you may not even notice that "make
+# buildall -j" failed. To make it more obvious, we'll do one level of recursion
+# here.
+.PHONY: try_buildall
+try_buildall: $(foreach b, $(boards), proj-$(b))
+
.PHONY: buildall
-buildall: $(foreach b, $(boards), proj-$(b)) runtests
+buildall:
+ $(MAKE) try_buildall
+ $(MAKE) runtests
@touch .tests-passed
@echo "$@ completed successfully!"