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 $@