Implement Ian's suggestion that nntpid should output via $PAGER by
[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 MANDIR = $(PREFIX)/man/man1
8
9 X11LIB=-L/usr/X11R6/lib -lX11
10
11 all: xcopy.1 xcopy
12
13 xcopy: xcopy.c
14 $(CC) $(CFLAGS) -o $@ $< $(X11LIB)
15
16 %.1: %.but
17 halibut --man=$@ $<
18
19 clean:
20 rm -f *.1 xcopy *.html *.tar.gz
21
22 html:
23 halibut --html=$(DESTDIR)/xcopy.html xcopy.but
24
25 release: xcopy.1
26 mkdir -p reltmp/xcopy
27 ln -s ../../xcopy.c reltmp/xcopy
28 ln -s ../../xcopy.1 reltmp/xcopy
29 ln -s ../../xcopy.but reltmp/xcopy
30 ln -s ../../Makefile reltmp/xcopy
31 tar -C reltmp -chzf $(DESTDIR)/xcopy.tar.gz xcopy
32 rm -rf reltmp
33
34 install: xcopy xcopy.1
35 mkdir -p $(BINDIR)
36 install xcopy $(BINDIR)/xcopy
37 mkdir -p $(MANDIR)
38 install -m 0644 xcopy.1 $(MANDIR)/xcopy.1