From 79227ff4f1eb42578825065f7c8087cb40b10b44 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 19 Sep 2026 16:50:56 +0200 Subject: [PATCH 1/2] make/disabled.mk: Re-add file for legacy projects The "Remove everything non-essential for make clean all" commit (bc883deed) dropped disabled.mk, judged non-essential from the jw-pkg tree'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 current jw-pkg. Re-add it verbatim. The post-purge re-adds dummy.mk and dummy-topdir.mk cover the current-style stubs; disabled.mk covers the legacy includes. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 Signed-off-by: Jan Lindemann --- make/disabled.mk | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 make/disabled.mk diff --git a/make/disabled.mk b/make/disabled.mk new file mode 100644 index 00000000..2b6558c8 --- /dev/null +++ b/make/disabled.mk @@ -0,0 +1,7 @@ +DISABLED = @echo Target \"$1\" in $(shell pwd)/Makefile has been disabled. + +all: + $(call DISABLED,$@) + +install clean distclean: + $(call DISABLED,$@) -- 2.55.0 From 9961d4b5f4fbc108d86eece61cc556c4d6dc40d2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 19 Sep 2026 16:54:09 +0200 Subject: [PATCH 2/2] CmdBuild.run(): Build projects that only have a Makefile A workspace project directory that has a Makefile but no package proofs - no project.conf, no VERSION - is buildable with a plain make, yet the build fails on it: calculate_order() walks the requested modules, and the walk in App.__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 every get_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 a project.conf on such a project still raises, which is correct: it is a declared dependency on a package that does not exist. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 Signed-off-by: Jan Lindemann --- src/python/jw/pkg/cmds/projects/CmdBuild.py | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/python/jw/pkg/cmds/projects/CmdBuild.py b/src/python/jw/pkg/cmds/projects/CmdBuild.py index 6677e71b..09f71122 100644 --- a/src/python/jw/pkg/cmds/projects/CmdBuild.py +++ b/src/python/jw/pkg/cmds/projects/CmdBuild.py @@ -283,7 +283,29 @@ class CmdBuild(Cmd): # export log(NOTICE, 'Using prerequisite flavours ' + ' '.join(dep_flavours)) log(NOTICE, 'Calculating order for modules ... ') - calculate_order(order, modules, dep_flavours) + def is_makefile_only(m: str) -> bool: + # Not installed as a package (no project.conf, no VERSION), + # but a project directory with a Makefile in the workspace: + # buildable with a plain make, no jw dependencies to read. + if self.app.is_installed(m, devel = True) \ + or self.app.is_installed(m, devel = False): + return False + try: + wd = proj_dir(m) + except Exception: + return False + return wd is not None and os.path.exists(f'{wd}/Makefile') + + makefile_only = {m for m in modules if is_makefile_only(m)} + for m in sorted(makefile_only): + log( + NOTICE, + f'Project {m} is not installed, building it as a plain ' + f'Makefile project' + ) + calculate_order(order, modules - makefile_only, dep_flavours) + for m in sorted(makefile_only): + order.append(m) if args.ignore_deps: order = [m for m in order if m in args.modules] order = [m for m in order if m not in exclude] -- 2.55.0