cpython/Doc/tools/sgmlconv/make.rules

52 lines
1.2 KiB
Plaintext
Raw Normal View History

# -*- 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
1999-07-29 22:14:09 +00:00
CONVERSION= $(TOOLSDIR)/sgmlconv/conversion.xml
ESISTARGETS= $(patsubst %.tex,%.esis,$(wildcard *.tex))
SGMLTARGETS= $(patsubst %.tex,%.sgml,$(wildcard *.tex))
XMLTARGETS= $(patsubst %.tex,%.xml,$(wildcard *.tex))
1999-07-29 22:14:09 +00:00
L2EFLAGS=
all: xml
esis: $(ESISTARGETS)
sgml: $(SGMLTARGETS)
xml: $(XMLTARGETS)
ESISTOOLS= $(TOOLSDIR)/sgmlconv/esistools.py
1999-07-29 22:14:09 +00:00
$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS) $(CONVERSION)
# This variant is easier to work with while debugging the conversion spec:
#$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS)
$(SGMLTARGETS): $(ESIS2ML) $(FIXGES)
$(XMLTARGETS): $(ESIS2ML) $(FIXGES)
.SUFFIXES: .esis .sgml .tex .xml
.tex.esis:
1999-07-29 22:14:09 +00:00
$(LATEX2ESIS) $(L2EFLAGS) $< temp.esis
$(DOCFIXER) temp.esis $@
rm temp.esis
.esis.sgml:
1999-07-29 22:14:09 +00:00
$(ESIS2ML) --sgml --autoclose para $< | $(FIXGES) >$@
.esis.xml:
1999-07-29 22:14:09 +00:00
$(ESIS2ML) --xml $< | $(FIXGES) >$@
1999-01-14 18:26:23 +00:00
clean:
rm -f *.esis
clobber: clean
rm -f *.sgml *.xml