From: Ralph Ronnquist Date: Wed, 27 Dec 2023 12:23:12 +0000 (+1100) Subject: Added install targets. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=353d93fd6a056d46dc846348c9e2ace148164ebf;p=rrq%2Fnewlisp%2Fpacknl.git Added install targets. --- diff --git a/Makefile b/Makefile index 723eef2..240d8d7 100644 --- a/Makefile +++ b/Makefile @@ -11,3 +11,25 @@ packnl: packnl.lsp incore.lsp main-args.lsp clean: rm -f packnl packnl.8 incore.lsp.8 + +# Installation targets + +BINFILES = packnl +MAN8FILES = packnl.8 incore.lsp.8 main-args.lsp.8 +LSPMODFILES = incore.lsp main-args.lsp + +BINDIR = $(DESTDIR)/usr/bin +MAN8DIR = $(DESTDIR)/usr/share/man/man8 +LSPMODDIR = $(DESTDIR)/usr/share/newlisp + +INSTALLTARGETS = +INSTALLTARGETS += $(addprefix $(BINDIR),$(BINFILES)) +INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES)) +INSTALLTARGETS += $(addprefix $(LSPMODDIR)/,$(LSPMODFILES)) + +INSTALL = install + +$(BINDIR)/% $(MAN8DIR)/% $(LSPMODDIR)/%: % + $(INSTALL) -D -T $< $@ + +install: $(INSTALLTARGETS)