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