diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-19 12:18:46 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-19 12:18:46 +0300 |
commit | 0dc85c9f86735c35cf14555482b2c8923cf31a6a (patch) | |
tree | ac71d9b8e8d94f5172d63d0c3554eb9238320d3a | |
parent | 098f3e2862a82a9005a256deb2f1edf2d7a32ef2 (diff) | |
download | micropython-0dc85c9f86735c35cf14555482b2c8923cf31a6a.tar.gz micropython-0dc85c9f86735c35cf14555482b2c8923cf31a6a.zip |
py/mkrules.mk: Try to detect and emulate make -B behavior for qstr extraction.
If make -B is run, the rule is run with $? empty. Extract fron all file in
this case. But this gets fragile, really "make clean" should be used instead
with such build complexity.
-rw-r--r-- | py/mkrules.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk index 9a739b8b7b..068d370552 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -83,7 +83,12 @@ $(OBJ): | $(HEADER_BUILD)/qstrdefs.generated.h $(HEADER_BUILD)/mpversion.h $(HEADER_BUILD)/qstr.i.last: $(SRC_QSTR) | $(HEADER_BUILD)/mpversion.h $(ECHO) "GEN $@" - $(Q)$(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $? >$(HEADER_BUILD)/qstr.i.last + if [ "$?" == "" ]; then \ + echo "QSTR Looks like -B used, trying to emulate"; \ + $(Q)$(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $^ >$(HEADER_BUILD)/qstr.i.last; \ + else \ + $(Q)$(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $? >$(HEADER_BUILD)/qstr.i.last; \ + fi $(QSTR_DEFS_COLLECTED): $(HEADER_BUILD)/qstr.i.last $(ECHO) "GEN $@" |