X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/utils/blobdiff_plain/1166ff629163edfcf817a033d581439a21240bc4..9d63af994dcdeabc463fcf3b841c931ce4cb80b6:/multi/Makefile?ds=sidebyside diff --git a/multi/Makefile b/multi/Makefile index 3b7f2d6..b0a56be 100644 --- a/multi/Makefile +++ b/multi/Makefile @@ -4,9 +4,15 @@ DESTDIR = . # for `make install' PREFIX = /usr/local BINDIR = $(PREFIX)/bin +SCRIPTDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/man/man1 +INSTALL = install +IPROG =# flags for installing programs (default none) +IDATA = -m 0644 # flags for installing data all: multi.1 +man: multi.1 +progs:; %.1: %.but halibut --man=$@ $< @@ -15,7 +21,8 @@ clean: rm -f *.1 *.html *.tar.gz html: - halibut --html=$(DESTDIR)/multi.html multi.but + halibut --html=multi.html multi.but + mv multi.html $(DESTDIR) release: multi.1 mkdir -p reltmp/multi @@ -26,8 +33,10 @@ release: multi.1 tar -C reltmp -chzf $(DESTDIR)/multi.tar.gz multi rm -rf reltmp -install: multi.1 - mkdir -p $(BINDIR) - install multi $(BINDIR)/multi +install: install-progs install-man +install-progs: + mkdir -p $(SCRIPTDIR) + $(INSTALL) $(IPROG) multi $(SCRIPTDIR)/multi +install-man: multi.1 mkdir -p $(MANDIR) - install -m 0644 multi.1 $(MANDIR)/multi.1 + $(INSTALL) $(IDATA) multi.1 $(MANDIR)/multi.1