Adjust 'after' so that it tries more rigorously to parse the input
[sgt/utils] / base64 / Makefile
CommitLineData
1166ff62 1# for `make release' and `make html'
8a48d402 2DESTDIR = .
3
1166ff62 4# for `make install'
5PREFIX = /usr/local
6BINDIR = $(PREFIX)/bin
c51c76d1 7SCRIPTDIR = $(PREFIX)/bin
1166ff62 8MANDIR = $(PREFIX)/man/man1
f6cacff9 9INSTALL = install
10IPROG =# flags for installing programs (default none)
11IDATA = -m 0644 # flags for installing data
1166ff62 12
9acadc2b 13all: base64.1 base64
22bf13b3 14progs: base64
15man: base64.1
9acadc2b 16
17base64: base64.c
18 $(CC) $(CFLAGS) -o $@ $<
19
20%.1: %.but
21 halibut --man=$@ $<
22
23clean:
8a48d402 24 rm -f *.1 base64 *.html *.tar.gz
25
26html:
6a3eb0f9 27 halibut --html=base64.html base64.but
28 mv base64.html $(DESTDIR)
8a48d402 29
30release: base64.1
31 mkdir -p reltmp/base64
32 ln -s ../../base64.c reltmp/base64
33 ln -s ../../base64.1 reltmp/base64
34 ln -s ../../base64.but reltmp/base64
35 ln -s ../../Makefile reltmp/base64
ef397e72 36 tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64
8a48d402 37 rm -rf reltmp
1166ff62 38
22bf13b3 39install: install-progs install-man
40install-progs: base64
1166ff62 41 mkdir -p $(BINDIR)
f6cacff9 42 $(INSTALL) $(IPROG) base64 $(BINDIR)/base64
22bf13b3 43install-man: base64.1
1166ff62 44 mkdir -p $(MANDIR)
f6cacff9 45 $(INSTALL) $(IDATA) base64.1 $(MANDIR)/base64.1