make: Beautify *.mk #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260624-defs-mk-add-slice-to-local-systemd"
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?
This PR fixes some non-blocking bugs and some uglyness in make/*.mk files, and adds some features.
py-defs.mk: Move all path defs into py-path.mk
py-path.mk is the place to host PYTHONPATH and MYPYPATH definitions, so move them there from py-defs.mk for consistency. Also, remove some dead code.
projects-dir.mk: Fix: clean-dirs does too much
The clean-dirs target does not only clean the repos present in PROJECTS, but all repos it finds to be dirty, and clean-all-dirs does the opposite. I suppose that was an oversight, swap their recipes.
Moreover, cleaning all directories goes about its business in an overly complicated and unecessarily time-consuming way, fix that, too.
platform.mk: Move include .cache-project.mk up
Reverse inclusion order of .cache-project.mk and cache-projects.mk: Definitions in .cache-project.mk should win over cache-projects.mk, because it's the more specialized include file, and the way the definitions in both files are structured, the later doesn't overwrite the earlier.
platform.mk: Support PREREQ_RUN_ADD
Modifying JW_PKG_XXX_PATH in pre-local.mk is fragile.
Amending PREREQ_RUN in pre-local.mk works, but only with $(JW_PKG_NO_CACHE) == true, or if "undefine JW_PKG_XXX_PATH" is also added in pre-local.mk. Otherwise JW_PKG_XXX_PATH will not be recomputed, because it's already defined from the cache.
Introduce the new variable PREREQ_RUN_ADD to solve that. If it's defined, it automatically invalidates the JW_PKG_XXX_PATH variables and sets them up for recalculation in py-path.mk / ldlibpath.mk.
defs.mk: Minor code beautification
Uppercase some comments, and remove some dead code.
defs.mk: Add *.slice to LOCAL_SYSTEMD
Support automatic installation of *.slice files into the system's systemd directory.