summaryrefslogtreecommitdiffstats
path: root/Doc/tools/sgmlconv/make.rules
blob: 84c8f3188767022ef7d2ff1445b4f2623d195d0b (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
46
47
48
49
50
# -*- makefile -*-
#
# Extra magic needed by the LaTeX->SGML conversion process.  This requires
# $(TOOLSDIR) to be properly defined.

DOCFIXER=	$(TOOLSDIR)/sgmlconv/docfixer.py
ESIS2ML=	$(TOOLSDIR)/sgmlconv/esis2sgml.py
LATEX2ESIS=	$(TOOLSDIR)/sgmlconv/latex2esis.py
CONVERSION=	$(TOOLSDIR)/sgmlconv/conversion.xml

ESISTARGETS=	$(patsubst %.tex,%.esis,$(wildcard *.tex))
SGMLTARGETS=	$(patsubst %.tex,%.sgml,$(wildcard *.tex))
XMLTARGETS=	$(patsubst %.tex,%.xml,$(wildcard *.tex))

L2EFLAGS=

all:	xml

esis:	$(ESISTARGETS)
sgml:	$(SGMLTARGETS)
xml:	$(XMLTARGETS)

ESISTOOLS=	$(TOOLSDIR)/sgmlconv/esistools.py

$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS) $(CONVERSION)
# This variant is easier to work with while debugging the conversion spec:
#$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS)
$(SGMLTARGETS): $(ESIS2ML)
$(XMLTARGETS): $(ESIS2ML)


.SUFFIXES: .esis .sgml .tex .xml

.tex.esis:
	$(LATEX2ESIS) $(L2EFLAGS) $< temp.esis
	$(DOCFIXER) temp.esis $@
	rm temp.esis

.esis.sgml:
	$(ESIS2ML) --sgml --autoclose para $< $@

.esis.xml:
	$(ESIS2ML) --xml $< $@


clean:
	rm -f *.esis

clobber: clean
	rm -f *.sgml *.xml