-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 862 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
31
32
33
34
35
36
DRAFTS = draft-ietf-rmcat-gcc-02.txt \
draft-ietf-rmcat-gcc-02.html \
draft-ietf-rmcat-gcc-02.pdf
CMDSEP = ;
#VERSION = 00
all: $(DRAFTS)
%.txt: %.xml
@echo "generate $< -> $@"
@echo xml2rfc $< -f $@ --text
@xml2rfc $< -f $@ --text
@egrep -ns --colour "\\bmust|required|shall|should|recommended|may|optional\\b" $< || true
%.html: %.xml
@echo "generate $< -> $@"
@echo xml2rfc $< -f $@ --html
@xml2rfc $< -f $@ --html
%.pdf: %.txt
@echo "enscript $< -> $@"
@enscript -q -lc -f Courier11 -M A4 -p - $< | ps2pdf - $@
%.2up.pdf: %.txt
@echo "enscript $< -> $@"
@enscript -q -2lrc -M A4 -p - $< | ps2pdf - $@
clean:
-rm -f $(DRAFTS)
copy:
@version=$(shell if [ -z $(VERSION) ] ; then read -p "version: " REPLY ; echo $$REPLY ; fi ); \
$(foreach var,$(DRAFTS), cp $(var) $(subst .,-$${version}., $(var))$(CMDSEP))
deploy: all copy clean