summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/jadetex/base/Makefile
blob: 7a3ffdb68cde522ca3f4a26bb0c04f5ebfffbcf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
MAX_TEX_RECURSION=4
JADE=openjade
JADETEX=jadetex
PDFJADETEX=pdfjadetex
XMLDECL=/usr/share/sgml/xml.dcl

all: releasenotes.pdf releasenotes.html releasenotes.ps

%.tex: %.xml %.dsl
	$(JADE) -v -t tex -V tex-backend -d $*.dsl#print $(XMLDECL) $*.xml

%.pdf: %.tex
	$(PDFJADETEX) $<
	if ! cmp $(shell basename $< .tex).aux prior.aux 2>/dev/null && \
		expr $(MAKELEVEL) '<' $(MAX_TEX_RECURSION); then \
		cp -pf $(shell basename $< .tex).aux prior.aux ; \
		rm -f $@ ; \
		$(MAKE) $@ ; \
	fi
	rm -f prior.aux

%.dvi: %.tex
	$(JADETEX) $<
	if ! cmp $(shell basename $< .tex).aux prior.aux 2>/dev/null && \
		expr $(MAKELEVEL) '<' $(MAX_TEX_RECURSION); then \
		cp -pf $(shell basename $< .tex).aux prior.aux ; \
		rm -f $@ ; \
		$(MAKE) $@ ; \
	fi
	rm -f prior.aux

%.ps: %.pdf
	acroread -toPostScript -pairs $< $@

%.html: %.xml %.dsl
	$(JADE) -v -t sgml -i html -V nochunks -V rootchunk -V "%root-filename%=$*" -V "%html-ext%=.html" -d $*.dsl#html $(XMLDECL) $*.xml

%.1: %.xml
	xmlto man -x /usr/share/xmlto/xsl/db2man/docbook.xsl $*.xml
   
clean:
	-rm -f *.out *.aux *.log *.dvi *.tex

realclean: clean
	-rm -f *.html *.pdf *.ps