-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
py/mkrules.mk: Add $(MPY_CROSS) as a dependency #5760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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-cross
by hand on a clean checkout.More info on order-only prerequisites.