blob: 24f8ffe1e4feb28b50bc67afaa2f06161de35b2c [file] [log] [blame]
Fred Draked8faf851998-11-24 17:40:33 +00001# -*- makefile -*-
2#
3# Extra magic needed by the LaTeX->SGML conversion process. This requires
4# $(TOOLSDIR) to be properly defined.
Fred Draked8faf851998-11-24 17:40:33 +00005
6DOCFIXER= $(TOOLSDIR)/sgmlconv/docfixer.py
Fred Drake3695b121998-12-01 19:05:56 +00007ESIS2ML= $(TOOLSDIR)/sgmlconv/esis2sgml.py
Fred Draked8faf851998-11-24 17:40:33 +00008FIXGES= $(TOOLSDIR)/sgmlconv/fixgenents.sh
9LATEX2ESIS= $(TOOLSDIR)/sgmlconv/latex2esis.py
Fred Drake2394c981999-07-29 22:14:09 +000010CONVERSION= $(TOOLSDIR)/sgmlconv/conversion.xml
Fred Draked8faf851998-11-24 17:40:33 +000011
Fred Drakef954b651998-11-30 22:31:45 +000012ESISTARGETS= $(patsubst %.tex,%.esis,$(wildcard *.tex))
Fred Drake3695b121998-12-01 19:05:56 +000013SGMLTARGETS= $(patsubst %.tex,%.sgml,$(wildcard *.tex))
Fred Draked8faf851998-11-24 17:40:33 +000014XMLTARGETS= $(patsubst %.tex,%.xml,$(wildcard *.tex))
15
Fred Drake2394c981999-07-29 22:14:09 +000016L2EFLAGS=
Fred Drake3695b121998-12-01 19:05:56 +000017
Fred Drake7dbde511999-07-22 13:56:51 +000018all: xml
Fred Drake3695b121998-12-01 19:05:56 +000019
Fred Drake997eec71999-02-18 16:31:05 +000020esis: $(ESISTARGETS)
Fred Drake3695b121998-12-01 19:05:56 +000021sgml: $(SGMLTARGETS)
22xml: $(XMLTARGETS)
23
24ESISTOOLS= $(TOOLSDIR)/sgmlconv/esistools.py
25
Fred Drake2394c981999-07-29 22:14:09 +000026$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS) $(CONVERSION)
27# This variant is easier to work with while debugging the conversion spec:
28#$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS)
Fred Drake3695b121998-12-01 19:05:56 +000029$(SGMLTARGETS): $(ESIS2ML) $(FIXGES)
30$(XMLTARGETS): $(ESIS2ML) $(FIXGES)
31
32
33.SUFFIXES: .esis .sgml .tex .xml
Fred Draked8faf851998-11-24 17:40:33 +000034
Fred Drakef954b651998-11-30 22:31:45 +000035.tex.esis:
Fred Drake2394c981999-07-29 22:14:09 +000036 $(LATEX2ESIS) $(L2EFLAGS) $< temp.esis
Fred Drake7dbde511999-07-22 13:56:51 +000037 $(DOCFIXER) temp.esis $@
38 rm temp.esis
Fred Drake3695b121998-12-01 19:05:56 +000039
40.esis.sgml:
Fred Drake2394c981999-07-29 22:14:09 +000041 $(ESIS2ML) --sgml --autoclose para $< | $(FIXGES) >$@
Fred Draked8faf851998-11-24 17:40:33 +000042
Fred Drakef954b651998-11-30 22:31:45 +000043.esis.xml:
Fred Drake2394c981999-07-29 22:14:09 +000044 $(ESIS2ML) --xml $< | $(FIXGES) >$@
Fred Drakea50a1df1999-01-14 18:26:23 +000045
46
47clean:
48 rm -f *.esis
49
50clobber: clean
51 rm -f *.sgml *.xml