X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/utils/blobdiff_plain/9acadc2b1377453e1c10614920bd390c52227e8a..1a969de4efe97666ce7089bbdd53ec7d2bb6bfa6:/base64/Makefile diff --git a/base64/Makefile b/base64/Makefile index 44ec017..e42cb95 100644 --- a/base64/Makefile +++ b/base64/Makefile @@ -1,4 +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: base64.1 base64 +progs: base64 +man: base64.1 base64: base64.c $(CC) $(CFLAGS) -o $@ $< @@ -7,4 +21,24 @@ base64: base64.c halibut --man=$@ $< clean: - rm -f *.1 base64 + rm -f *.1 base64 *.html *.tar.gz + +html: + halibut --html=$(DESTDIR)/base64.html base64.but + +release: base64.1 + mkdir -p reltmp/base64 + ln -s ../../base64.c reltmp/base64 + ln -s ../../base64.1 reltmp/base64 + ln -s ../../base64.but reltmp/base64 + ln -s ../../Makefile reltmp/base64 + tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64 + rm -rf reltmp + +install: install-progs install-man +install-progs: base64 + mkdir -p $(BINDIR) + $(INSTALL) $(IPROG) base64 $(BINDIR)/base64 +install-man: base64.1 + mkdir -p $(MANDIR) + $(INSTALL) $(IDATA) base64.1 $(MANDIR)/base64.1