X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/utils/blobdiff_plain/29efe1b927173560be46e59e0986ef6228ff6330..22bf13b350b5cceb9bbfa0e17029e4f6c1cf1273:/multi/Makefile diff --git a/multi/Makefile b/multi/Makefile index 51b171d..f2ea823 100644 --- a/multi/Makefile +++ b/multi/Makefile @@ -1,7 +1,41 @@ +# 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=$@ $< clean: - rm -f *.1 + rm -f *.1 *.html *.tar.gz + +html: + halibut --html=$(DESTDIR)/multi.html multi.but + +release: multi.1 + mkdir -p reltmp/multi + ln -s ../../multi reltmp/multi + ln -s ../../multi.1 reltmp/multi + ln -s ../../multi.but reltmp/multi + ln -s ../../Makefile reltmp/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