[riot-notifications] [RIOT-OS/RIOT] pkg: micropython: initial commit (#2968)
notifications at github.com
Thu Jul 18 12:18:25 CEST 2019
kaspar030 commented on this pull request.
> +PY_H := $(PY:%.py=$(PY_HEADER_DIR)/%.py.h)
+ifneq (, $(PY_H))
+ CFLAGS += -I$(PY_HEADER_DIR)
+ @mkdir -p $@
+$(PY_H): $(PY_HEADER_DIR)/%.py.h: %.py $(PY)
+ cd $(dir $<); xxd -i $(notdir $<) > $@
+# make C and C++ objects of this module depend on generated headers, so they
+# get re-build on changes to the python files.
+$(OBJC) $(OBJCXX): $(PY_H)
Chicken-and-egg problem: without specifying everything manually, the dependencies of a given ```.c``` are only available after building it. Without the header present, the build fails. Thus there's no (easy) way to get the dependency.
Making the objects of a given module that is using python files depend on the generated headers ensures they get re-built. It is possible that more objects than necessary get re-built. IMO that's acceptable for a first iteration, given that our makefiles basically require to "make clean" anyways.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications