-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (22 loc) · 771 Bytes
/
Makefile
File metadata and controls
34 lines (22 loc) · 771 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
TARGETS=plan
COMMONFORM=node_modules/.bin/commonform
CFTEMPLATE=node_modules/.bin/cftemplate
all: markdown word pdf
markdown: $(TARGETS:=.md)
word: $(TARGETS:=.docx)
pdf: $(TARGETS:=.pdf)
$(COMMONFORM) $(CFTEMPLATE):
npm install
%.pdf: %.docx
doc2pdf $<
%.docx: %.cform %.options styles.json | $(COMMONFORM)
$(COMMONFORM) render -f docx -y styles.json -l -i $(shell cat $*.options) < $*.cform > $@
%.md: %.cform %.options | $(COMMONFORM)
$(COMMONFORM) render -f markdown $(shell cat $*.options) < $*.cform > $@
%.cform: %.cftemplate %.context | $(CFTEMPLATE)
$(CFTEMPLATE) $*.cftemplate $*.context > $@
%.cform: %.cftemplate | $(CFTEMPLATE)
$(CFTEMPLATE) $*.cftemplate > $@
.PHONY: clean
clean:
rm -f $(TARGETS:=.md) $(TARGETS:=.docx) $(TARGETS:=.pdf)