Arrange `make release' targets everywhere, and also `make html'
[sgt/utils] / xcopy / Makefile
1 DESTDIR = .
2
3 X11LIB=-L/usr/X11R6/lib -lX11
4
5 all: xcopy.1 xcopy
6
7 xcopy: xcopy.c
8 $(CC) $(CFLAGS) -o $@ $< $(X11LIB)
9
10 %.1: %.but
11 halibut --man=$@ $<
12
13 clean:
14 rm -f *.1 xcopy *.html *.tar.gz
15
16 html:
17 halibut --html=$(DESTDIR)/xcopy.html xcopy.but
18
19 release: xcopy.1
20 mkdir -p reltmp/xcopy
21 ln -s ../../xcopy.c reltmp/xcopy
22 ln -s ../../xcopy.1 reltmp/xcopy
23 ln -s ../../xcopy.but reltmp/xcopy
24 ln -s ../../Makefile reltmp/xcopy
25 tar -C reltmp -chzvf $(DESTDIR)/xcopy.tar.gz xcopy
26 rm -rf reltmp
27
28