[446] | 1 | xml2rfc = "../../xml2rfc/xml2rfc.tcl" |
---|
[26] | 2 | saxpath = "$(HOME)/java/saxon-8-9-j/saxon8.jar" |
---|
[230] | 3 | saxon = java -classpath $(saxpath) net.sf.saxon.Transform -novw -l |
---|
[26] | 4 | |
---|
| 5 | stylesheet = ../myxml2rfc.xslt |
---|
| 6 | reduction = ../../rfc2629xslt/clean-for-DTD.xslt |
---|
[418] | 7 | bap = ../../abnfparser/bap |
---|
[26] | 8 | |
---|
[813] | 9 | TARGETS_XML= p1-messaging.xml \ |
---|
| 10 | p2-semantics.xml \ |
---|
| 11 | p3-payload.xml \ |
---|
| 12 | p4-conditional.xml \ |
---|
| 13 | p5-range.xml \ |
---|
| 14 | p6-cache.xml \ |
---|
| 15 | p7-auth.xml |
---|
| 16 | |
---|
[1643] | 17 | TARGETS_ABNF= p1-messaging.abnf \ |
---|
| 18 | p2-semantics.abnf \ |
---|
| 19 | p4-conditional.abnf \ |
---|
| 20 | p5-range.abnf \ |
---|
| 21 | p6-cache.abnf \ |
---|
| 22 | p7-auth.abnf |
---|
| 23 | |
---|
| 24 | TARGETS_ABNFAPPENDIX= $(TARGETS_abnf:.xml=.abnf-appendix) |
---|
[813] | 25 | TARGETS_HTML= $(TARGETS_XML:.xml=.html) |
---|
| 26 | TARGETS_XHTML= $(TARGETS_XML:.xml=.xhtml) |
---|
[1643] | 27 | TARGETS_PARSEDABNF= $(TARGETS_ABNF:.abnf=.parsed-abnf) |
---|
[813] | 28 | TARGETS_REDXML= $(TARGETS_XML:.xml=.redxml) |
---|
| 29 | TARGETS_TXT= $(TARGETS_XML:.xml=.txt) |
---|
| 30 | |
---|
| 31 | TARGETS = $(TARGETS_HTML) \ |
---|
| 32 | $(TARGETS_REDXML) \ |
---|
| 33 | $(TARGETS_TXT) \ |
---|
| 34 | $(TARGETS_ABNF) \ |
---|
| 35 | $(TARGETS_PARSEDABNF) \ |
---|
| 36 | $(TARGETS_ABNFAPPENDIX) \ |
---|
[308] | 37 | p1-messaging.iana-headers \ |
---|
| 38 | p2-semantics.iana-headers \ |
---|
| 39 | p2-semantics.iana-methods \ |
---|
| 40 | p2-semantics.iana-status-codes \ |
---|
| 41 | p4-conditional.iana-headers \ |
---|
[700] | 42 | p4-conditional.iana-status-codes \ |
---|
[308] | 43 | p5-range.iana-headers \ |
---|
[700] | 44 | p5-range.iana-status-codes \ |
---|
[308] | 45 | p6-cache.iana-headers \ |
---|
[1487] | 46 | p6-cache.iana-warn-codes \ |
---|
[817] | 47 | p6-cache.cache-directives \ |
---|
[700] | 48 | p7-auth.iana-headers \ |
---|
[1123] | 49 | p7-auth.iana-status-codes \ |
---|
| 50 | httpbis.abnf |
---|
[26] | 51 | |
---|
| 52 | all: $(TARGETS) |
---|
| 53 | |
---|
| 54 | clean: |
---|
| 55 | rm -f $(TARGETS) |
---|
| 56 | |
---|
| 57 | %.html: %.xml $(stylesheet) |
---|
| 58 | $(saxon) $< $(stylesheet) > $@ |
---|
| 59 | |
---|
| 60 | %.redxml: %.xml $(reduction) |
---|
| 61 | $(saxon) $< $(reduction) > $@ |
---|
| 62 | |
---|
| 63 | %.txt: %.redxml |
---|
| 64 | $(xml2rfc) $< $@ |
---|
| 65 | |
---|
[406] | 66 | %.abnf: %.xml ../../rfc2629xslt/extract-artwork.xslt |
---|
| 67 | $(saxon) $< ../../rfc2629xslt/extract-artwork.xslt type="abnf2616" >$@ |
---|
| 68 | |
---|
[417] | 69 | %.parsed-abnf: %.abnf |
---|
[581] | 70 | $(bap)/bap -i $(bap)/core.abnf < $< | sort | $(bap)/bap -k -i $(bap)/core.abnf -l 69 >$@ |
---|
[417] | 71 | |
---|
[421] | 72 | %.abnf-appendix: %.parsed-abnf |
---|
[420] | 73 | $(saxon) $(basename $<).xml abnf2xml2rfc.xslt abnf="$<" >$@ |
---|
| 74 | |
---|
[202] | 75 | %.xhtml: %.xml ../../rfc2629xslt/rfc2629toXHTML.xslt |
---|
| 76 | $(saxon) $< ../../rfc2629xslt/rfc2629toXHTML.xslt > $@ |
---|
| 77 | |
---|
[308] | 78 | %.iana-headers: %.xml extract-header-defs.xslt |
---|
[290] | 79 | $(saxon) $< extract-header-defs.xslt > $@ |
---|
| 80 | |
---|
[308] | 81 | %.iana-methods: %.xml extract-method-defs.xslt |
---|
[288] | 82 | $(saxon) $< extract-method-defs.xslt > $@ |
---|
| 83 | |
---|
[308] | 84 | %.iana-status-codes: %.xml extract-status-code-defs.xslt |
---|
[288] | 85 | $(saxon) $< extract-status-code-defs.xslt > $@ |
---|
| 86 | |
---|
[1487] | 87 | %.iana-warn-codes: %.xml extract-warn-code-defs.xslt |
---|
| 88 | $(saxon) $< extract-warn-code-defs.xslt > $@ |
---|
| 89 | |
---|
[817] | 90 | %.cache-directives: %.xml extract-cache-directives.xslt |
---|
| 91 | $(saxon) $< extract-cache-directives.xslt > $@ |
---|
| 92 | |
---|
[813] | 93 | outlineALL.html: $(TARGETS_XHTML) \ |
---|
[202] | 94 | extractOutline.xslt |
---|
| 95 | $(saxon) extractOutline.xslt extractOutline.xslt > $@ |
---|
[217] | 96 | rm p*.xhtml |
---|
[202] | 97 | |
---|
[1123] | 98 | httpbis.abnf: $(TARGETS_ABNF) |
---|
[1147] | 99 | ./common-abnf.sh $^ > $@ |
---|