-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 1.01 KB
/
Makefile
File metadata and controls
38 lines (30 loc) · 1.01 KB
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
DRAFT=draft-iab-html-rfc-bis
BRANCH := $(shell git symbolic-ref --short HEAD)
DNAME := $(shell xmllint --xpath "string(/rfc/@docName)" $(DRAFT).xml)
.PHONY: clean publish
%.txt: %.xml
xml2rfc -N --text --html $<
%.html: %.xml
xml2rfc -N --text --html $<
all: $(DRAFT).txt
clean:
$(RM) $(DRAFT).html $(DRAFT).3.html $(DRAFT).3.xml $(DRAFT).n.xml $(DRAFT).txt
@$(MAKE) -C example clean
publish: $(DRAFT).txt
git co gh-pages
git co $(BRANCH) -- example/xml2rfc.css
git co $(BRANCH) -- example/test.x.xml
git co $(BRANCH) -- example/test.n.xml
git co $(BRANCH) -- example/test.3.xml
git co $(BRANCH) -- example/test.3.html
git co $(BRANCH) -- $(DRAFT).txt
git co $(BRANCH) -- $(DRAFT).xml
git co $(BRANCH) -- $(DRAFT).html
git ci -m "Publish to GitHub pages"
git push origin gh-pages
git co $(BRANCH)
submit: $(DRAFT).txt $(DRAFT).xml
cp $(DRAFT).txt $(DNAME).txt
cp $(DRAFT).xml $(DNAME).xml
watch: start
watchman-make -p '*.xml' Makefile -t $(DRAFT).txt -p 'example/**/*.xml' 'example/**/*.svg' -t example