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