blob: 3e0c90f74fee9b66f9198134193625db7a43fcb3 (
plain) (
blame)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
MD_SOURCES := 01-title.md \
02-preface.md 03-lexical-syntax.md \
04-identifiers-names-and-scopes.md \
05-types.md \
06-basic-declarations-and-definitions.md \
07-classes-and-objects.md \
08-expressions.md \
09-implicit-parameters-and-views.md \
10-pattern-matching.md \
11-top-level-definitions.md \
12-xml-expressions-and-patterns.md \
13-user-defined-annotations.md \
14-the-scala-standard-library.md \
15-scala-syntax-summary.md \
16-references.md
BUILD_DIR := build
.PHONY: dirs all html mathml pdf tex epub2 epub3 md clean
all: html mathml pdf tex epub2 epub3 md
clean:
rm -rf $(BUILD_DIR)
html: $(BUILD_DIR)/ScalaReference.html
mathml: $(BUILD_DIR)/ScalaReference-mathml.html
pdf: $(BUILD_DIR)/ScalaReference.pdf
tex: $(BUILD_DIR)/ScalaReference.tex
epub2: $(BUILD_DIR)/ScalaReference.epub2
epub3: $(BUILD_DIR)/ScalaReference.epub3
md: $(BUILD_DIR)/ScalaReference.md
$(BUILD_DIR)/ScalaReference.epub2: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building EPUB2 spec to $(BUILD_DIR)/ScalaReference.epub2"
@pandoc -f markdown \
-t epub \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--self-contained \
-o build/ScalaReference.epub2 \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference.epub3: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building EPUB3 spec to $(BUILD_DIR)/ScalaReference.epub3"
@pandoc -f markdown \
-t epub3 \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--self-contained \
-o build/ScalaReference.epub3 \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference.pdf: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building PDF spec to $(BUILD_DIR)/ScalaReference.pdf"
@pandoc -f markdown \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--self-contained \
--latex-engine=xelatex \
--template=resources/scala-ref-template.latex \
-o build/ScalaReference.pdf \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference.tex: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building LaTeX source to $(BUILD_DIR)/ScalaReference.tex"
@pandoc -f markdown \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--self-contained \
--latex-engine=xelatex \
--template=resources/scala-ref-template.latex \
-o build/ScalaReference.tex \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference.html: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building HTML spec to $(BUILD_DIR)/ScalaReference.html"
@pandoc -f markdown \
-t html5 \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--template=resources/scala-ref-template.html5 \
--mathjax='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' \
-o build/ScalaReference.html \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference-mathml.html: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building HTML spec to $(BUILD_DIR)/ScalaReference-mathml.html"
@pandoc -f markdown \
-t html5 \
--standalone \
--toc \
--chapters \
--number-sections \
--bibliography=Scala.bib \
--template=resources/scala-ref-template.html5 \
--mathml \
-o build/ScalaReference-mathml.html \
build/ScalaReference.md
$(BUILD_DIR)/ScalaReference.md: dirs $(MD_SOURCES)
@echo "building Markdown source to $(BUILD_DIR)/ScalaReference.md"
@cat $(MD_SOURCES) > $(BUILD_DIR)/ScalaReference.md
dirs: $(BUILD_DIR)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
cp -R resources $(BUILD_DIR)/resources
|