forked from protocols-comnet/rmcat-eval-criteria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (34 loc) · 1.12 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
42
43
44
45
# borrowed Colin's makefile, added html
# @status=$$(git status --porcelain); \
# if test "x$${status}" = x; then \
# echo Working directory is okay >&2; \
# else \
# echo Working directory is dirty >&2; \
# fi
DRAFTS = draft-ietf-rmcat-eval-criteria.txt \
draft-ietf-rmcat-eval-criteria.html \
draft-ietf-rmcat-eval-criteria.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