-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (21 loc) · 709 Bytes
/
Makefile
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
DRAFT := draft-dekok-radext-request-authenticator
VERSION := $(shell sed -n -e'/docname/s,.*[^0-9]*-\([0-9]*\).*,\1,p' ${DRAFT}.md )
EXAMPLES =
${DRAFT}-${VERSION}.txt: ${DRAFT}.txt
@cp ${DRAFT}.txt ${DRAFT}-${VERSION}.txt
# : git add ${DRAFT}-${VERSION}.txt ${DRAFT}.txt
%.xml: %.md ${EXAMPLES}
@kramdown-rfc2629 -3 ${DRAFT}.md > ${DRAFT}.xml
@xml2rfc --v2v3 ${DRAFT}.xml
@mv ${DRAFT}.v2v3.xml ${DRAFT}.xml
%.txt: %.xml
@xml2rfc --text -o $@ $?
%.html: %.xml
@xml2rfc --html -o $@ $?
submit: ${DRAFT}.xml
@curl -S -F "[email protected]" -F "xml=@${DRAFT}.xml" https://datatracker.ietf.org/api/submit
version:
@echo Version: ${VERSION}
clean:
@rm -f *.xml *~
.PRECIOUS: ${DRAFT}.xml