Adjust 'after' so that it tries more rigorously to parse the input
[sgt/utils] / xcopy / 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 X11LIB=-L/usr/X11R6/lib -lX11
14
15 all: xcopy.1 xcopy
16 man: xcopy.1
17 progs: xcopy
18
19 xcopy: xcopy.c
20 $(CC) $(CFLAGS) -o $@ $< $(X11LIB)
21
22 %.1: %.but
23 halibut --man=$@ $<
24
25 clean:
26 rm -f *.1 xcopy *.html *.tar.gz
27
28 html:
29 halibut --html=xcopy.html xcopy.but
30 mv xcopy.html $(DESTDIR)/xcopy.html
31
32 release: xcopy.1
33 mkdir -p reltmp/xcopy
34 ln -s ../../xcopy.c reltmp/xcopy
35 ln -s ../../xcopy.1 reltmp/xcopy
36 ln -s ../../xcopy.but reltmp/xcopy
37 ln -s ../../Makefile reltmp/xcopy
38 tar -C reltmp -chzf $(DESTDIR)/xcopy.tar.gz xcopy
39 rm -rf reltmp
40
41 install: install-progs install-man
42
43 install-progs: xcopy
44 mkdir -p $(BINDIR)
45 $(INSTALL) $(IPROG) xcopy $(BINDIR)/xcopy
46 install-man: xcopy.1
47 mkdir -p $(MANDIR)
48 $(INSTALL) $(IDATA) xcopy.1 $(MANDIR)/xcopy.1