CmdBuild / make: Accommodate projects that only have a Makefile #112
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260919-cmdbuild-make-accommodate-projects-that-only-have-a-makefile"
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?
Legacy projects that only have a Makefile (no
VERSION, nomake/project.conf) are breaking the workspace build: subdirectories includemake/disabled.mk, which the 2025-11-14 make purge dropped, and working around that,projects buildstill raises an unmet dependency, because the dependency walk requires package installation proofs that such a project can never have. This PR restoresdisabled.mkand lets the build accommodate such projects: requested modules without package proofs but with a workspace directory holding a Makefile are appended to the build order as dependency-less leaves and built with a plain make. The walk andApp.is_installed()stay strict for every other projects command.make/disabled.mk: Re-add file for legacy projects
The
Remove everything non-essential for make clean allcommit (bc883deed) droppeddisabled.mk, judged non-essential from thejw-pkgtree's own perspective. Legacy projects still include it, though: their Makefiles use it to replace a directory build with no-op targets that report the target as disabled. Without the file, make fails in such projects in any workspace that mounts a currentjw-pkg.Re-add it verbatim. The post-purge re-adds
dummy.mkanddummy-topdir.mkcover the current-style stubs;disabled.mkcovers the legacy includes.CmdBuild.run(): Build projects that only have a Makefile
A workspace project directory that has a Makefile but no package proofs - no
project.conf, noVERSION- is buildable with a plain make, yet the build fails on it:calculate_order()walks the requested modules, and the walk inApp.__get_project_refs()raises an unmet dependency, because the installation state of such a project is unprovable.The walk has to stay strict: its proofs are package proofs, and loosening
App.is_installed()would weaken the unmet dependency detection for everyget_project_refs()caller.This commit therefore keeps the tolerance in the build: before calculating the order,
run()partitions the requested modules. A module that is not installed in any flavour but resolves to a workspace directory with a Makefile is appended to the build order as a dependency-less leaf and built with a plain make; modules without any directory at all still raise the unmet dependency error. A jw dependency declared in aproject.confon such a project still raises, which is correct: it is a declared dependency on a package that does not exist.