From 24128a1819e679c65c832452b53d6a075d74ce7d Mon Sep 17 00:00:00 2001 From: anthony cantor Date: Thu, 21 Nov 2013 18:53:36 -0700 Subject: [PATCH] Use MAKEFILE_LIST to get the name of the make file This way we don't assume the make file is 'Makefile' and it will work even if it is named as 'makefile' or 'makefile-uno' Fix #130 --- HISTORY.md | 1 + arduino-mk/Arduino.mk | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 77fd8a3..fe669b9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -13,6 +13,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Change echo for printf. Fix #129 (https://github.com/thomassigurdsen) - Add support for ChipKiT 2013. Fix #136 (https://github.com/peplin) - Auto detect and include libraries specified in `USER_LIB_PATH`. Fix #135 (https://github.com/tinyladi) +- Use `MAKEFILE_LIST` to get the name of the make file. Fix #130 (https://github.com/cantora) ### 1.0.1 (2013-09-25) - Unconditionally add -D in avrdude options. See #114 diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 42b3abe..1ba2b81 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -880,9 +880,9 @@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ ifdef COMMON_DEPS - COMMON_DEPS := $(COMMON_DEPS) Makefile + COMMON_DEPS := $(COMMON_DEPS) $(MAKEFILE_LIST) else - COMMON_DEPS := Makefile + COMMON_DEPS := $(MAKEFILE_LIST) endif # normal local sources