Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # |
| 3 | # Extra magic needed by the LaTeX->SGML conversion process. This requires |
| 4 | # $(TOOLSDIR) to be properly defined. |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 5 | |
| 6 | DOCFIXER= $(TOOLSDIR)/sgmlconv/docfixer.py |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 7 | ESIS2ML= $(TOOLSDIR)/sgmlconv/esis2sgml.py |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 8 | FIXGES= $(TOOLSDIR)/sgmlconv/fixgenents.sh |
| 9 | LATEX2ESIS= $(TOOLSDIR)/sgmlconv/latex2esis.py |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 10 | CONVERSION= $(TOOLSDIR)/sgmlconv/conversion.xml |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 11 | |
Fred Drake | f954b65 | 1998-11-30 22:31:45 +0000 | [diff] [blame] | 12 | ESISTARGETS= $(patsubst %.tex,%.esis,$(wildcard *.tex)) |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 13 | SGMLTARGETS= $(patsubst %.tex,%.sgml,$(wildcard *.tex)) |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 14 | XMLTARGETS= $(patsubst %.tex,%.xml,$(wildcard *.tex)) |
| 15 | |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 16 | L2EFLAGS= |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 17 | |
Fred Drake | 7dbde51 | 1999-07-22 13:56:51 +0000 | [diff] [blame] | 18 | all: xml |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 19 | |
Fred Drake | 997eec7 | 1999-02-18 16:31:05 +0000 | [diff] [blame] | 20 | esis: $(ESISTARGETS) |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 21 | sgml: $(SGMLTARGETS) |
| 22 | xml: $(XMLTARGETS) |
| 23 | |
| 24 | ESISTOOLS= $(TOOLSDIR)/sgmlconv/esistools.py |
| 25 | |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 26 | $(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS) $(CONVERSION) |
| 27 | # This variant is easier to work with while debugging the conversion spec: |
| 28 | #$(ESISTARGETS): $(LATEX2ESIS) $(DOCFIXER) $(ESISTOOLS) |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 29 | $(SGMLTARGETS): $(ESIS2ML) $(FIXGES) |
| 30 | $(XMLTARGETS): $(ESIS2ML) $(FIXGES) |
| 31 | |
| 32 | |
| 33 | .SUFFIXES: .esis .sgml .tex .xml |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 34 | |
Fred Drake | f954b65 | 1998-11-30 22:31:45 +0000 | [diff] [blame] | 35 | .tex.esis: |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 36 | $(LATEX2ESIS) $(L2EFLAGS) $< temp.esis |
Fred Drake | 7dbde51 | 1999-07-22 13:56:51 +0000 | [diff] [blame] | 37 | $(DOCFIXER) temp.esis $@ |
| 38 | rm temp.esis |
Fred Drake | 3695b12 | 1998-12-01 19:05:56 +0000 | [diff] [blame] | 39 | |
| 40 | .esis.sgml: |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 41 | $(ESIS2ML) --sgml --autoclose para $< | $(FIXGES) >$@ |
Fred Drake | d8faf85 | 1998-11-24 17:40:33 +0000 | [diff] [blame] | 42 | |
Fred Drake | f954b65 | 1998-11-30 22:31:45 +0000 | [diff] [blame] | 43 | .esis.xml: |
Fred Drake | 2394c98 | 1999-07-29 22:14:09 +0000 | [diff] [blame] | 44 | $(ESIS2ML) --xml $< | $(FIXGES) >$@ |
Fred Drake | a50a1df | 1999-01-14 18:26:23 +0000 | [diff] [blame] | 45 | |
| 46 | |
| 47 | clean: |
| 48 | rm -f *.esis |
| 49 | |
| 50 | clobber: clean |
| 51 | rm -f *.sgml *.xml |