source: draft-ietf-httpbis/latest/Makefile

Last change on this file was 2748, checked in by julian.reschke@…, 4 years ago

Update XSLTs, fix Makefile wrt sorting of ABNF, regen HTML

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1xml2rfc = "../../xml2rfc/xml2rfc.tcl"
2saxpath = "$(HOME)/java/saxon-9-6-j/saxon9he.jar"
3saxon = java -classpath $(saxpath) net.sf.saxon.Transform -l -versionmsg:off
4
5stylesheet = ../myxml2rfc.xslt
6reduction  = ../../rfc2629xslt/clean-for-DTD.xslt
7bap  = ../../abnfparser/bap
8
9TARGETS_XML= p1-messaging.xml \
10          p2-semantics.xml \
11          p4-conditional.xml \
12          p5-range.xml \
13          p6-cache.xml \
14          p7-auth.xml
15
16TARGETS_ABNF= p1-messaging.abnf \
17          p2-semantics.abnf \
18          p4-conditional.abnf \
19          p5-range.abnf \
20          p6-cache.abnf \
21          p7-auth.abnf
22
23TARGETS_ABNFAPPENDIX= $(TARGETS_ABNF:.abnf=.abnf-appendix)
24TARGETS_HTML= $(TARGETS_XML:.xml=.html)
25TARGETS_XHTML= $(TARGETS_XML:.xml=.xhtml)
26TARGETS_PARSEDABNF= $(TARGETS_ABNF:.abnf=.parsed-abnf)
27TARGETS_REDXML= $(TARGETS_XML:.xml=.redxml)
28TARGETS_TXT= $(TARGETS_XML:.xml=.txt)
29
30TARGETS = $(TARGETS_HTML) \
31          $(TARGETS_REDXML) \
32          $(TARGETS_TXT) \
33          $(TARGETS_ABNF) \
34          $(TARGETS_PARSEDABNF) \
35          $(TARGETS_ABNFAPPENDIX) \
36          p1-messaging.iana-headers \
37          p2-semantics.iana-headers \
38          p2-semantics.iana-methods     \
39          p2-semantics.iana-status-codes \
40          p4-conditional.iana-headers \
41          p4-conditional.iana-status-codes \
42          p5-range.iana-headers \
43          p5-range.iana-status-codes \
44          p6-cache.iana-headers \
45          p6-cache.iana-warn-codes \
46          p6-cache.cache-directives \
47          p7-auth.iana-headers \
48          p7-auth.iana-status-codes \
49          httpbis.abnf
50
51all: $(TARGETS)
52
53clean:
54        rm -f $(TARGETS)
55
56%.html: %.xml $(stylesheet)
57        $(saxon) $< $(stylesheet) > $@
58
59%.redxml: %.xml $(reduction)
60        $(saxon) $< $(reduction) > $@
61
62%.txt: %.redxml
63        $(xml2rfc) $< $@
64
65%.abnf: %.xml ../../rfc2629xslt/extract-artwork.xslt
66        $(saxon) $< ../../rfc2629xslt/extract-artwork.xslt type="abnf2616" >$@
67
68%.parsed-abnf: %.abnf
69        $(bap)/bap -i $(bap)/core.abnf < $< | LC_ALL=C sort | $(bap)/bap -k -i $(bap)/core.abnf -l 69 >$@
70
71%.abnf-appendix: %.parsed-abnf
72        $(saxon) $(basename $<).xml abnf2xml2rfc.xslt abnf="$<" >$@
73
74%.xhtml: %.xml ../../rfc2629xslt/rfc2629toXHTML.xslt
75        $(saxon) $< ../../rfc2629xslt/rfc2629toXHTML.xslt > $@
76
77%.iana-headers: %.xml extract-header-defs.xslt
78        $(saxon) $< extract-header-defs.xslt > $@
79
80%.iana-methods: %.xml extract-method-defs.xslt
81        $(saxon) $< extract-method-defs.xslt > $@
82
83%.iana-status-codes: %.xml extract-status-code-defs.xslt
84        $(saxon) $< extract-status-code-defs.xslt > $@
85
86%.iana-warn-codes: %.xml extract-warn-code-defs.xslt
87        $(saxon) $< extract-warn-code-defs.xslt > $@
88
89%.cache-directives: %.xml extract-cache-directives.xslt
90        $(saxon) $< extract-cache-directives.xslt > $@
91
92outlineALL.html:        $(TARGETS_XHTML) \
93        extractOutline.xslt
94        $(saxon) extractOutline.xslt extractOutline.xslt > $@
95        rm p*.xhtml
96
97httpbis.abnf:   $(TARGETS_ABNF)
98        ./common-abnf.sh $^ > $@
99
100consistency.txt:        $(TARGETS_XML)
101        rm -f $@
102        echo P1 >> $@
103        echo >> $@
104        saxon p1-messaging.xml consistency-check.xslt >> $@
105        echo >> $@
106        echo P2 >> $@
107        echo >> $@
108        saxon p2-semantics.xml consistency-check.xslt >> $@
109        echo >> $@
110        echo P4 >> $@
111        echo >> $@
112        saxon p4-conditional.xml consistency-check.xslt >> $@
113        echo >> $@
114        echo P5 >> $@
115        echo >> $@
116        saxon p5-range.xml consistency-check.xslt >> $@
117        echo >> $@
118        echo P6 >> $@
119        echo >> $@
120        saxon p6-cache.xml consistency-check.xslt >> $@
121        echo >> $@
122        echo P7 >> $@
123        echo >> $@
124        saxon p7-auth.xml consistency-check.xslt >> $@
125        echo >> $@
Note: See TracBrowser for help on using the repository browser.