-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (33 loc) · 1.06 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
SLUG=draft-muffett-end-to-end-secure-messaging
THIS=04
PREV=03
DIR=text
SLUGTHIS=$(SLUG)-$(THIS)
SLUGPREV=$(SLUG)-$(PREV)
SLUGDIFF=$(SLUGTHIS)-vs-$(PREV)
XML2RFC=xml2rfc -v
#--v3
REPO=https://github.com/alecmuffett/draft-muffett-end-to-end-secure-messaging
OPEN=open
all: $(DIR)/$(SLUGTHIS).txt $(DIR)/$(SLUGTHIS).html
-diff -bc $(DIR)/$(SLUGPREV).txt $(DIR)/$(SLUGTHIS).txt > $(DIR)/$(SLUGDIFF).diff
diff: all
cat $(DIR)/$(SLUGDIFF).diff
push: all
git add . && git commit -m "make on `datestamp`" && git push
$(OPEN) $(REPO)
open: all
$(OPEN) $(DIR)/$(SLUGTHIS).html
$(DIR)/$(SLUGTHIS).html: $(DIR)/$(SLUGTHIS).xml
( cd $(DIR) && $(XML2RFC) --html $(SLUGTHIS).xml )
$(DIR)/$(SLUGTHIS).txt: $(DIR)/$(SLUGTHIS).xml
( cd $(DIR) && $(XML2RFC) --text $(SLUGTHIS).xml )
# was: mmark -markdown
$(DIR)/$(SLUGTHIS).xml: $(SLUGTHIS).md
unicode-invariant <$(SLUGTHIS).md >/dev/null
mmark $(SLUGTHIS).md >$(DIR)/$(SLUGTHIS).basic.md
mmark -html $(SLUGTHIS).md >$(DIR)/$(SLUGTHIS).basic.html
mmark $(SLUGTHIS).md >$(DIR)/$(SLUGTHIS).xml
clean:
-rm -f *~
-rm $(DIR)/$(SLUGTHIS).*