py-*.mk: Make the Python make modules self-contained #140
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20261016-py-mk-make-the-python-make-modules-self-contained"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
These changes make the py-* makefile modules self-contained, so a hand-rolled Makefile can include
std-targets.mkandpy-defs.mkwithout pulling in the rest ofjw-pkg's make scaffolding. Each commit removes one hidden dependency, or moves a cheap, generally useful definition into the module that benefits from it:py-path.mk: Include platform.mk for JW_PKG_PY
py-path.mkinvokes$(JW_PKG_PY)to computeJW_PKG_PYTHON_PATH, but does not include the file that defines the variable. Not a problem from insidejw-pkg, but nice to have if you want to includestd-targets.mkandpy-defs.mkwithout anything else, so include it.Also drop a dead debug line in the
py-pathtarget.platform.mk: Define empty, space, comma
The
PYTHONPATHexport inpy-path.mkis built by substituting the spaces of the space-separatedJW_PKG_PYTHON_PATHlist with colons, usingspacefromdefs.mk. Which may not be included if somebody wants to include a barepy-defs.mk, so define it inplatform.mk. Not happening injw-pkg, but nice to have.py-defs.mk: Define PYTHON_RUNNER
PYTHON_RUNNERis defined inpy-run.mkbut is more generally useful, e.g. for hand-rolled test Makefiles. It's also a cheap definition. Lift it intopy-defs.mkinstead.