summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-06-11 01:24:54 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-06-11 11:08:39 +0300
commita19ba5fea073245b98277b372493d652243354e9 (patch)
treeac76cde8b81dd04807113b64a852cf51fc00ad88
parentf28ed55aebe4ced1dc3e6a4016ecd7e3497110ce (diff)
downloadmicropython-a19ba5fea073245b98277b372493d652243354e9.tar.gz
micropython-a19ba5fea073245b98277b372493d652243354e9.zip
py: Rebuild port if mpconfigport.mk changed (if any).
mpconfigport.mk contains configuration options which affect the way MicroPython is linked. In this regard, it's "stronger" configuration dependency than even mpconfigport.h, so if we rebuild everything on mpconfigport.h change, we certianly should of that on mpconfigport.mk change too.
-rw-r--r--py/py.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/py.mk b/py/py.mk
index 5c22a8f006..84f3295e14 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -131,13 +131,17 @@ FORCE:
$(HEADER_BUILD)/mpversion.h: FORCE | $(HEADER_BUILD)
$(Q)$(PYTHON) $(PY_SRC)/makeversionhdr.py $@
+# mpconfigport.mk is optional, but changes to it may drastically change
+# overall config, so they need to be caught
+MPCONFIGPORT_MK = $(wildcard mpconfigport.mk)
+
# qstr data
# Adding an order only dependency on $(HEADER_BUILD) causes $(HEADER_BUILD) to get
# created before we run the script to generate the .h
# Note: we need to protect the qstr names from the preprocessor, so we wrap
# the lines in "" and then unwrap after the preprocessor is finished.
-$(HEADER_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(PY_SRC)/makeqstrdata.py mpconfigport.h $(PY_SRC)/mpconfig.h | $(HEADER_BUILD)
+$(HEADER_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(PY_SRC)/makeqstrdata.py mpconfigport.h $(MPCONFIGPORT_MK) $(PY_SRC)/mpconfig.h | $(HEADER_BUILD)
$(ECHO) "GEN $@"
$(Q)cat $(PY_QSTR_DEFS) $(QSTR_DEFS) | $(SED) 's/^Q(.*)/"&"/' | $(CPP) $(CFLAGS) - | sed 's/^"\(Q(.*)\)"/\1/' > $(HEADER_BUILD)/qstrdefs.preprocessed.h
$(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(HEADER_BUILD)/qstrdefs.preprocessed.h > $@