make: report errors from multiple sub builds properly.

The reporting of make errors wasn't catching a failure from multiple
sublibs. rework it to iterate all found, rather than trying a single
file test.
This commit is contained in:
Karl Palsson 2018-07-10 22:16:34 +00:00
parent 72e1ffdc72
commit b309b7e082
2 changed files with 8 additions and 1 deletions

3
.gitignore vendored
View File

@ -43,3 +43,6 @@ locm3.sublime-workspace
# cscope databases
cscope.out
# build droppings
.stamp_failure*

View File

@ -70,7 +70,11 @@ $(LIB_DIRS): $(IRQ_DEFN_FILES:=.genhdr)
echo "Failure building: $@: code: $$?" > .stamp_failure_$(subst /,_,$@)
lib: $(LIB_DIRS)
$(Q)[ -f .stamp_failure_* ] && cat .stamp_failure_* && exit 1 || true;
$(Q)$(RM) .stamp_failure_tld
$(Q)for failure in .stamp_failure_*; do \
[ -f $$failure ] && cat $$failure >> .stamp_failure_tld || true; \
done;
$(Q)[ -f .stamp_failure_tld ] && cat .stamp_failure_tld && exit 1 || true;
html doc:
$(Q)$(MAKE) -C doc html