aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Build
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-07-10 18:51:21 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-07-10 18:51:21 +0000
commit3afc3ce310a5b611b6264eec5d9361e73e49dfb1 (patch)
tree08f85c3ba97b81914ee3c112b895bf193eb9f5e3 /LUFA/Build
parent245a0a81abcd4706fef7d034eb0bb69af79ec595 (diff)
Add check and error to the BUILD module if OBJDIR option is set but object filenames are not unique.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2392 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa.build.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in
index 9d527dde..db0a78f2 100644
--- a/LUFA/Build/lufa.build.in
+++ b/LUFA/Build/lufa.build.in
@@ -148,6 +148,11 @@ ifneq ($(OBJDIR),.)
$(shell mkdir $(OBJDIR) 2> /dev/null)
VPATH += $(dir $(SRC))
OBJECT_FILES := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
+
+ # Check if any object file (without path) appears more than once in the object file list
+ ifneq ($(words $(sort $(OBJECT_FILES))), $(words $(OBJECT_FILES)))
+ $(error Cannot build with OBJDIR parameter set - one or more object file name is not unique)
+ endif
endif
# Create a list of dependency files from the list of object files