summaryrefslogtreecommitdiff
path: root/py/py.mk
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-11 20:50:15 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-12 00:39:55 +0300
commita925cb54f1b3490a9e082816eb785750c4b25324 (patch)
tree1bc15ed93d55561ad1d4f895097201af54ccca4b /py/py.mk
parent6ea0e928d8aced4f8ce5ab451105c199092eb6df (diff)
py: Preprocess qstrdefs.h before feeding to makeqstrdata.py.
This is alternative implementation of supporting conditionals in qstrdefs.h, hard to say if it's much cleaner than munging #ifdef's in Python code...
Diffstat (limited to 'py/py.mk')
-rw-r--r--py/py.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/py.mk b/py/py.mk
index ecc4a6a0d..23ba9ebe7 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -104,9 +104,10 @@ $(PY_BUILD)/py-version.h: FORCE
# Adding an order only dependency on $(PY_BUILD) causes $(PY_BUILD) to get
# created before we run the script to generate the .h
$(PY_BUILD)/qstrdefs.generated.h: | $(PY_BUILD)/
-$(PY_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(PY_SRC)/makeqstrdata.py
+$(PY_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(PY_SRC)/makeqstrdata.py mpconfigport.h $(PY_SRC)/mpconfig.h
$(ECHO) "makeqstrdata $(PY_QSTR_DEFS) $(QSTR_DEFS)"
- $(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(PY_QSTR_DEFS) $(QSTR_DEFS) > $@
+ $(CPP) $(CFLAGS) $(PY_QSTR_DEFS) -o $(PY_BUILD)/qstrdefs.preprocessed.h
+ $(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(PY_BUILD)/qstrdefs.preprocessed.h $(QSTR_DEFS) > $@
# We don't know which source files actually need the generated.h (since
# it is #included from str.h). The compiler generated dependencies will cause