aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 0c59a31a4ee47441f764fe92e9cfaf84f166d180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TMACDIR ?= /usr/share/tmac
BINDIR ?= /usr/local/bin
MANDIR ?= /usr/local/man

TROFF ?= troff
PDFROFF ?= troff | dpost | ps2pdf -

all: README.pdf HACKING.pdf

install:
	install -m 644 k.tmac t/toc.tmac $(TMACDIR)
	install -m 644 toc/toc.1 list/list.1 $(MANDIR)/man1
	install toc/toc list/list $(BINDIR)

HACKING.pdf: HACKING.t k.tmac
	perl -pe '$$_=`$$_` if s/^\!//' HACKING.t |\
	LC_ALL=en_US.UTF-8\
	$(PDFROFF) > HACKING.pdf

README.pdf: README.t k.tmac
	TROFFONTS=/usr/pkg/share/fonts/X11/TTF/\
	LC_ALL=en_US.UTF-8\
	<README.t toc/toc list/list -p.l \| $(PDFROFF) > README.pdf