-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
61 lines (43 loc) · 1.01 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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Makefile to build requirements standard plan
# author: Sébastien Mosser
# /!\ Run make check_env to check that your setup is correct
.DEFAULT_GOAL := pdf
INDEX = index.adoc # Root file for the requirement plan
THEME = _style/mcmaster.yml # Location of the PDF stylesheet
####
# Building PlantUML models
####
MODELS := $(shell find * -type f -name "*.puml")
GRAPHS := $(shell find * -type f -name "*.dot")
SVGs = $(MODELS:.puml=.svg) $(GRAPHS:.dot=.svg)
# transform a puml file into it's svg representation
%.svg: %.puml
plantuml -tsvg ./$<
%.svg: %.dot
dot -Tsvg ./$< > $@
####
# Building the HTML version
####
html: $(INDEX) $(SVGs)
asciidoctor $(INDEX)
####
# Building the PDF version
####
pdf: $(INDEX) $(SVGs)
asciidoctor-pdf --theme $(THEME) $(INDEX)
####
# Cleaning (and clobbering)
####
clean:
rm -rf *.html *.pdf
clobber: clean
rm -rf $(SVGs)
####
# Checking environment
####
check_env:
@which asciidoctor
@which asciidoctor-pdf
@which plantuml
@which dot
@plantuml -testdot