X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/utils/blobdiff_plain/8a48d402ca6948144107b6e3bc857d90155bf4cb..9d63af994dcdeabc463fcf3b841c931ce4cb80b6:/multi/Makefile diff --git a/multi/Makefile b/multi/Makefile index dbd057a..b0a56be 100644 --- a/multi/Makefile +++ b/multi/Makefile @@ -1,6 +1,18 @@ +# for `make release' and `make html' 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=$@ $< @@ -9,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 @@ -17,5 +30,13 @@ release: multi.1 ln -s ../../multi.1 reltmp/multi ln -s ../../multi.but reltmp/multi ln -s ../../Makefile reltmp/multi - tar -C reltmp -chzvf $(DESTDIR)/multi.tar.gz multi + tar -C reltmp -chzf $(DESTDIR)/multi.tar.gz multi rm -rf reltmp + +install: install-progs install-man +install-progs: + mkdir -p $(SCRIPTDIR) + $(INSTALL) $(IPROG) multi $(SCRIPTDIR)/multi +install-man: multi.1 + mkdir -p $(MANDIR) + $(INSTALL) $(IDATA) multi.1 $(MANDIR)/multi.1