Skip to content

Commit

Permalink
Hey, look at that. A strawman IANA registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewest committed Oct 6, 2015
1 parent a5e2d3b commit 224f8e6
Show file tree
Hide file tree
Showing 4 changed files with 1,146 additions and 0 deletions.
41 changes: 41 additions & 0 deletions iana/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
id_base = ..
xml2rfc ?= xml2rfc
kramdown-rfc2629 ?= kramdown-rfc2629
idnits ?= idnits

title = west-webappsec-csp-reg
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

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) $< $@

update:
cp $(id_base)/Tools/skel/Makefile .
Loading

0 comments on commit 224f8e6

Please sign in to comment.