| 1 | mandir=$(prefix)/man |
| 2 | man1dir=$(mandir)/man1 |
| 3 | |
| 4 | CHAPTERS := $(SITE) blurb intro running input output licence manpage index |
| 5 | |
| 6 | INPUTS = $(patsubst %,%.but,$(CHAPTERS)) |
| 7 | |
| 8 | HALIBUT = ../build/halibut |
| 9 | |
| 10 | all: index.html halibut.1 |
| 11 | |
| 12 | index.html: $(INPUTS) $(HALIBUT) |
| 13 | $(HALIBUT) --text=halibut.txt --html --info=halibut.info \ |
| 14 | --ps=halibut.ps --pdf=halibut.pdf $(INPUTS) |
| 15 | |
| 16 | halibut.1: manpage.but |
| 17 | $(HALIBUT) --man=halibut.1 manpage.but |
| 18 | |
| 19 | install: |
| 20 | $(INSTALL) -m 644 halibut.1 $(man1dir)/halibut.1 |
| 21 | |
| 22 | clean: |
| 23 | rm -f *.html *.txt *.hlp *.cnt *.1 *.info* *.ps *.pdf |