From 6ff84e5bf486f06dc61bbbc668c4ec8095057871 Mon Sep 17 00:00:00 2001 From: Nexoniarz Date: Sun, 13 Sep 2026 13:57:26 +0200 Subject: [PATCH] ports: zsh reinstalled on every make, and eventually stopped working licence-check is .PHONY, and I had put it on the left of the colon as a prerequisite of the install rule. A phony prerequisite is always out of date, so `make` reinstalled the whole of zsh every single time -- slow, and eventually fatal: zsh's installfns.sh trips over the installfnsdir its own previous run left behind, so the build failed outright with install: cannot stat 'installfnsdir/_vcs_info_hooks' It runs inside the rule now, which is what it always should have done, and the stale directory is removed first. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2 --- ports/zsh/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/zsh/Makefile b/ports/zsh/Makefile index bb66da6..8e799be 100644 --- a/ports/zsh/Makefile +++ b/ports/zsh/Makefile @@ -195,7 +195,15 @@ licence-check: | $(SRCDIR) if [ $$bad -ne 0 ]; then echo "zsh: refusing to install" >&2; exit 1; fi; \ echo "zsh: no GPL-licensed files in the tree" -$(SYSROOT)/bin/zsh: $(BUILDDIR)/Src/zsh licence-check | $(SYSROOT)/bin +# licence-check runs *inside* the rule, not as a prerequisite. +# +# It is .PHONY, and a phony prerequisite is always out of date -- so having it +# on the left of the colon re-ran the whole install on every `make`, which is +# slow, and which eventually failed outright when zsh's installfns.sh tripped +# over the installfnsdir its previous run had left behind. +$(SYSROOT)/bin/zsh: $(BUILDDIR)/Src/zsh | $(SYSROOT)/bin + $(MAKE) licence-check + rm -rf $(BUILDDIR)/installfnsdir $(MAKE) -C $(BUILDDIR) install DESTDIR=$(SYSROOT) rm -rf $(SYSROOT)/usr/share/man $(SYSROOT)/usr/share/zsh/$(ZSH_VERSION)/help chmod 755 $@