forked from tlswg/tls13-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 740 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 740 Bytes
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
32
33
34
35
36
37
38
xml2rfc ?= xml2rfc
kramdown-rfc2629 ?= kramdown-rfc2629
idnits ?= idnits
draft := draft-ietf-tls-tls13
current_ver := $(shell git tag | grep "$(draft)" | tail -1 | sed -e"s/.*-//")
ifeq "${current_ver}" ""
next_ver ?= 00
else
next_ver ?= $(shell printf "%.2d" $$((1$(current_ver)-99)))
endif
next := $(draft)-$(next_ver)
.PHONY: latest submit clean
latest: $(draft).txt $(draft).html
submit: $(next).txt
idnits: $(next).txt
$(idnits) $<
clean:
-rm -f $(draft).txt $(draft).html
-rm -f $(next).txt $(next).html
-rm -f $(draft)-[0-9][0-9].xml
$(next).md: $(draft).md
sed -e"s/$(basename $<)-latest/$(basename $@)/" $< > $@
%.xml: %.md
$(kramdown-rfc2629) $< > $@
%.txt: %.xml
$(xml2rfc) $< $@
%.html: %.xml
$(xml2rfc) $< $@