Makefile 800 Bytes
Newer Older
1 2
root-rel=../
dir-name=doc
3

4
ifneq ($(wildcard ../Rules),)
5
include ../Rules
6 7 8 9
else
srcdir=$(shell cd $(root-rel) ; pwd)
srcdir_abs=$(srcdir)
endif
10

Ondřej Zajíček's avatar
Ondřej Zajíček committed
11 12
export TEXINPUTS := $(TEXINPUTS):$(srcdir_abs)/doc/tex

13 14 15 16
# Force rebuilds
.PHONY: prog.sgml bird.sgml

docs: progdocs userdocs
17
progdocs: prog.html prog.pdf
18
userdocs: bird.html bird.pdf
19 20

prog.sgml:
21
	$(srcdir)/tools/progdoc $(srcdir_abs)
22 23 24 25

%.html: %.sgml
	./sgml2html $<

26 27 28
%.dvi: %.tex
	latex $<
	latex $<
29

30 31
%.ps: %.dvi
	dvips -D600 -ta4 -o $@ $<
32

33 34 35 36
%.pdf: %.tex
	pdflatex $<
	pdflatex $<

37 38
%.tex: %.sgml
	./sgml2latex --output=tex $<
39

40 41 42
%.txt: %.sgml
	./sgml2txt $<

43 44 45 46
progspell: prog.sgml
	sed -f prog-spell.sed <prog.sgml >prog.spell
	ispell prog.spell

47
clean:
48
	rm -f *.tex *.dvi *.log *.txt *.aux *.toc *.spell
49
	rm -f prog.sgml
50 51 52

distclean: clean
	rm -f *.html *.ps