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
This commit is contained in:
anthony cantor 2013-11-21 18:53:36 -07:00 committed by Sudar
parent e04bb4d7d4
commit 24128a1819
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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