Makefile: add `make install` (native jerboa + jmcp/jlsp links → ~/.local/bin)
ober
71e6cfd51e85c54d040026d6e6ba49ab9da053e2
--- a/Makefile +++ b/Makefile @@ -224,6 +224,21 @@ jerboa-smoke: jerboa rm -f /tmp/jms.ss; \ [ $$fail -eq 0 ] && echo "jerboa-smoke: PASS" || { echo "jerboa-smoke: FAIL" >&2; exit 1; } +# Install the native multicall binary + jmcp/jlsp symlinks into PREFIX/bin. +# Defaults to ~/.local/bin; override e.g. `make install PREFIX=/usr/local`. +# Copies what `make jerboa` produced in dist/ (run that first). +PREFIX ?= $(HOME)/.local +BINDIR ?= $(PREFIX)/bin +.PHONY: install +install: + @test -x "$(CURDIR)/dist/jerboa" || { echo "ERROR: dist/jerboa not built — run 'make jerboa' first" >&2; exit 1; } + @mkdir -p "$(BINDIR)" + @install -m 0755 "$(CURDIR)/dist/jerboa" "$(BINDIR)/jerboa" + @ln -sf jerboa "$(BINDIR)/jmcp" + @ln -sf jerboa "$(BINDIR)/jlsp" + @echo "Installed: $(BINDIR)/{jerboa,jmcp,jlsp}" + @case ":$$PATH:" in *":$(BINDIR):"*) ;; *) echo "NOTE: $(BINDIR) is not on PATH — add it to use these commands" >&2 ;; esac + # ── Cross-compiled multicall binary ────────────────────────────────────────── # Builds dist/<os-arch>/{jerboa,jmcp,jlsp,jerbuild} for a foreign target, all # four modes runnable on that target. The xpatch retargets the host Chez's