aboutsummaryrefslogtreecommitdiff
path: root/Bootloaders/makefile
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-04 15:38:05 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-04 15:38:05 +0000
commitab09354c5cd91404e7de0111dfb82e0b58e963a7 (patch)
tree21684b12363cd430e49a073155b2a38e648fae32 /Bootloaders/makefile
parent48590be1e6e5cfc28ce06c679ddc041035d5cf7d (diff)
Add emergency aborts to the recursive makefiles to prevent system failures due to infinite recursion if something happens while building the project lists.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2303 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Bootloaders/makefile')
-rw-r--r--Bootloaders/makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bootloaders/makefile b/Bootloaders/makefile
index 94147ead..56db6580 100644
--- a/Bootloaders/makefile
+++ b/Bootloaders/makefile
@@ -15,6 +15,13 @@
PROJECT_DIRECTORIES = $(shell ls -d *)
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+ $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
all:
@$(foreach PROJECT, $(PROJECT_DIRECTORIES), $(MAKE) -s -C $(PROJECT) clean all;)