Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (30 sloc) 950 Bytes
xml2rfc ?= xml2rfc
kramdown-rfc2629 ?= kramdown-rfc2629
idnits ?= idnits
title = inadarei-prefer-transclude
latest = $(shell (ls draft-${title}-*.xml || echo "draft-${title}-00.xml") | sort | tail -1)
version = $(shell basename ${latest} .xml | awk -F- '{print $$NF}')
target = draft-$(title)-$(version)
prev = draft-$(title)-$(shell printf "%.2d" `echo ${version}-1 | bc`)
next = draft-$(title)-$(shell printf "%.2d" `echo ${version}+1 | bc`)
.PHONY: latest clean next diff idnits update
latest: $(target).html $(target).txt index.html index.txt
clean:
rm -f $(target).html $(target).txt
next:
cp $(target).xml $(next).xml
sed -i '' -e"s/$(target)/$(next)/" draft.md
diff:
rfcdiff $(prev).txt $(target).txt
idnits: $(target).txt
$(idnits) $<
%.xml: draft.md
$(kramdown-rfc2629) $< > $@
%.html: %.xml
$(xml2rfc) --html $< $@
%.txt: %.xml
$(xml2rfc) $< $@
index.html: $(target).html
cp $< $@
index.txt: $(target).txt
cp $< $@
You can’t perform that action at this time.