The examples section is confusing at the best of times, and really
[sgt/utils] / lns / Makefile
CommitLineData
337ff285 1# for `make release' and `make html'
2DESTDIR = .
3
4# for `make install'
5PREFIX = /usr/local
6BINDIR = $(PREFIX)/bin
c51c76d1 7SCRIPTDIR = $(PREFIX)/bin
337ff285 8MANDIR = $(PREFIX)/man/man1
f6cacff9 9INSTALL = install
10IPROG =# flags for installing programs (default none)
11IDATA = -m 0644 # flags for installing data
337ff285 12
13all: lns.1
14
15%.1: %.but
16 halibut --man=$@ $<
17
18clean:
19 rm -f *.1 *.html *.tar.gz
20
21html:
22 halibut --html=$(DESTDIR)/lns.html lns.but
23
24release: lns.1
25 mkdir -p reltmp/lns
26 ln -s ../../lns reltmp/lns
27 ln -s ../../lns.1 reltmp/lns
28 ln -s ../../lns.but reltmp/lns
29 ln -s ../../Makefile reltmp/lns
30 tar -C reltmp -chzf $(DESTDIR)/lns.tar.gz lns
31 rm -rf reltmp
32
33install: lns.1
c51c76d1 34 mkdir -p $(SCRIPTDIR)
35 $(INSTALL) $(IPROG) lns $(SCRIPTDIR)/lns
337ff285 36 mkdir -p $(MANDIR)
f6cacff9 37 $(INSTALL) $(IDATA) lns.1 $(MANDIR)/lns.1