summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-16 08:42:08 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-20 03:56:43 +0300
commit03e31ef8b9752220d092a1950030cf7942e002eb (patch)
treeadd6ed9124ac87d9f575566233e28842fac3cbc0 /Makefile
parent3442e216dcec3ce6c8ba1c755b0d647a7f384f01 (diff)
Continue on error
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ed89b07337..f80d4e99c8 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,8 @@ endif
override SILENT = false
+ON_ERROR := error_occured=1
+
STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
ROOT_DIR := $(dir $(ROOT_MAKEFILE))
@@ -302,7 +304,9 @@ $(SUBPROJECTS): %: %-allkm
done
$(eval $(call PARSE_RULE,$@))
$(eval $(call SET_SILENT_MODE))
- +$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
+ +error_occured=0; \
+ $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
+ if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi
.PHONY: all