cpython/Doc/tools/sgmlconv/make.rules
Fred Drake 7dbde51f97 Make the default target xml instead of sgml.
Use a temporary file to pass results from latex2esis.py to
docfixer.py; this makes for better error detection by make (if the
first pipeline stage fails, make wasn't catching it).
1999-07-22 13:56:51 +00:00

47 lines
1,020 B
Makefile

# -*- 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
FIXGES= $(TOOLSDIR)/sgmlconv/fixgenents.sh
LATEX2ESIS= $(TOOLSDIR)/sgmlconv/latex2esis.py
ESISTARGETS= $(patsubst %.tex,%.esis,$(wildcard *.tex))
SGMLTARGETS= $(patsubst %.tex,%.sgml,$(wildcard *.tex))
XMLTARGETS= $(patsubst %.tex,%.xml,$(wildcard *.tex))
all: xml
esis: $(ESISTARGETS)
sgml: $(SGMLTARGETS)
xml: $(XMLTARGETS)
ESISTOOLS= $(TOOLSDIR)/sgmlconv/esistools.py
$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS)
$(SGMLTARGETS): $(ESIS2ML) $(FIXGES)
$(XMLTARGETS): $(ESIS2ML) $(FIXGES)
.SUFFIXES: .esis .sgml .tex .xml
.tex.esis:
$(LATEX2ESIS) $< temp.esis
$(DOCFIXER) temp.esis $@
rm temp.esis
.esis.sgml:
$(ESIS2ML) --sgml --autoclose para $< | $(FIXGES) > $@
.esis.xml:
$(ESIS2ML) --xml $< | $(FIXGES) > $@
clean:
rm -f *.esis
clobber: clean
rm -f *.sgml *.xml