projects, make: Follow pkg.recommends.jw in the build closure #121
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260922-build-recommends"
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 makes the relations of the workspace build closure a workspace property:
projects buildandrequired-os-pkggrow a--pkg-relationsoption, defaulting to requires, so direct invocations keep their behaviour;DEP_PROJECTSis derived from the very build order thatmake alland the workspace mount use; and a newPKG_RELATIONS_BUILDvariable threads the choice through every build invocation of the workspace. The final commit sets it to requires,recommends, so that recommended projects get built and released along with their recommenders by default.cmds.projects.CmdBuild: Add --pkg-relations
The relations the build closure of
projects buildfollows are hard-coded inread_deps(): [pkg.requires.jw] only. A workspace that also wants to build the projects its seeds recommend in [pkg.recommends.jw] has no way to say so.Add a
--pkg-relationsoption that lists the relations between jw packages to take into consideration for the build, comma or space separated, defaulting to requires.cmds.projects.CmdRequiredOsPkg: Add --pkg-relations
The OS package list of
required-os-pkg, like the build closure, is derived from the [pkg.requires.jw] section only, hard-coded in_run(). Add a--pkg-relationsoption torequired-os-pkg, mirroring the one ofCmdBuild.projects-dir.mk: Derive DEP_PROJECTS from the build order
DEP_PROJECTSis computed withpkg-requires--recursive, which follows [pkg.requires.jw] only. That set does not match what the build actually builds, and it omits seed projects that no other project of the closure depends on.Derive
DEP_PROJECTSfromprojects build--build-orderwith the same dependency flavours asmake all, the very command the build-order make target and the workspace mount closure (mount-projects-dir.sh) use.DEP_PROJECTSis now exactly the build closure, so the file listings, the text-files cache and the git helpers of a workspace cover the same project set asmake all.Introduce the
PKG_RELATIONS_BUILDvariable, defaulting to requires, and pass it throughJW_PKG_PY_BUILDto every build invocation of the workspace, so the relations of the build closure are a workspace property.projects-dir.mk: Add JW_PKG_PY_REQUIRED_OS_PKG
Add and use
JW_PKG_PY_REQUIRED_OS_PKG. The variable and its use effectively ties more targets to act on the same package set as themake all, influenced by the contents of$(PKG_RELATIONS_BUILD):echo-build-depsecho-install-depsecho-release-depspkg-install-build-depspkg-install-release-depsprojects-dir.mk: PKG_RELATIONS_BUILD += recommends
Add recommended projects into the build closure. Would be nice if they got built along. Let's see if nightly survives it.