1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/usr/bin/make -f
# dependencies:
# apt install weasyprint xml2rfc ruby-kramdown-rfc2629
draft = draft-sequoia-git
OUTPUT = $(draft).txt $(draft).html $(draft).xml $(draft).pdf
all: $(OUTPUT)
%.xmlv2: sequoia-git.md
kramdown-rfc2629 < $< > $@.tmp
mv $@.tmp $@
%.xml: %.xmlv2
xml2rfc --v2v3 $< -o $@
%.html: %.xml
xml2rfc $< --html -o $@
%.txt: %.xml
xml2rfc $< --text -o $@
%.pdf: %.xml
xml2rfc $< --pdf -o $@
clean:
-rm -rf $(OUTPUT) $(draft).xmlv2
.PRECIOUS: $(draft).xmlv2
.PHONY: clean all
|