py/mkrules.mk: Add $(MPY_CROSS) as a dependency#5760
py/mkrules.mk: Add $(MPY_CROSS) as a dependency#5760osresearch wants to merge 1 commit intomicropython:masterfrom
Conversation
By making $(MPY_CROSS) an order-only prerequisite of the various frozen files, this removes the need to remember to build ../../mpy-cross/mpy-cross by hand on a clean checkout. Signed-off-by: Trammell hudson <hudson@trmm.net>
|
Thanks for the PR. This was actually the original behaviour but it was removed because it had a few difficulties. See 4173950 and #3255 and #4825 (and issues linked from that one). The main problem calling make recursively to build mpy-cross is that setting/env variables for the port being built then apply to mpy-cross. |
|
The order-only prereq prevents the slow build issue in #3255: it only builds However, if |
|
I agree with the above reasoning, that the change here is a nice convenience for users (and building mpy-cross is often a stumbling block for newcomers, so making it smoother is good). But I think there a problem: currently |
Commit 4173950 removed automatic building of mpy-cross, which rebuilt it whenever any of its dependent source files changed. But needing to build mpy-cross, and not knowing how, is a frequent issue. This commit aims to help by automatically building mpy-cross only if it doesn't exist. For Makefiles it uses an order-only prerequisite, while for CMake it uses a custom command. If MICROPY_MPYCROSS (which is what makemanifest.py uses to locate the mpy-cross executable) is defined in the environment then automatic build will not be attempted, allowing a way to prevent this auto-build if needed. Thanks to Trammell Hudson aka osresearch for the original idea; see micropython#5760. Signed-off-by: Damien George <damien@micropython.org>
|
See #7610 for an alternative which also supports CMake. |
Commit 4173950 removed automatic building of mpy-cross, which rebuilt it whenever any of its dependent source files changed. But needing to build mpy-cross, and not knowing how, is a frequent issue. This commit aims to help by automatically building mpy-cross only if it doesn't exist. For Makefiles it uses an order-only prerequisite, while for CMake it uses a custom command. If MICROPY_MPYCROSS (which is what makemanifest.py uses to locate the mpy-cross executable) is defined in the environment then automatic build will not be attempted, allowing a way to prevent this auto-build if needed. Thanks to Trammell Hudson aka @osresearch for the original idea; see micropython#5760. Signed-off-by: Damien George <damien@micropython.org>
|
Done in 78718ff |
circuitpython_stubs: Use `circuitpython_typing` for cp-specific typing
By making
$(MPY_CROSS)an order-only prerequisite of the various frozen files, it removes the need to remember to build../../mpy-cross/mpy-crossby hand on a clean checkout.More info on order-only prerequisites.