@@ -16,15 +16,8 @@ DOCS :=
16
16
17
17
18
18
# #####################################################################
19
- # Pandoc (reference-manual related)
19
+ # Docs, from pandoc, rustdoc (which runs pandoc), and node
20
20
# #####################################################################
21
- ifeq ($(CFG_PANDOC ) ,)
22
- $(info cfg : no pandoc found, omitting doc/rust.pdf)
23
- else
24
-
25
- ifeq ($(CFG_NODE),)
26
- $(info cfg : no node found, omitting doc/tutorial.html)
27
- else
28
21
29
22
doc/rust.css : rust.css
30
23
@$(call E, cp: $@ )
@@ -34,6 +27,18 @@ doc/manual.css: manual.css
34
27
@$(call E, cp: $@ )
35
28
$(Q ) cp -a $< $@ 2> /dev/null
36
29
30
+ ifeq ($(CFG_PANDOC ) ,)
31
+ $(info cfg : no pandoc found, omitting docs)
32
+ NO_DOCS = 1
33
+ endif
34
+
35
+ ifeq ($(CFG_NODE ) ,)
36
+ $(info cfg : no node found, omitting docs)
37
+ NO_DOCS = 1
38
+ endif
39
+
40
+ ifneq ($(NO_DOCS ) ,1)
41
+
37
42
DOCS += doc/rust.html
38
43
doc/rust.html : rust.md doc/version_info.html doc/rust.css doc/manual.css
39
44
@$(call E, pandoc: $@ )
@@ -47,17 +52,6 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
47
52
--css=manual.css \
48
53
--include-before-body=doc/version_info.html \
49
54
--output=$@
50
- endif
51
-
52
- ifeq ($(CFG_PDFLATEX),)
53
- $(info cfg : no pdflatex found, omitting doc/rust.pdf)
54
- else
55
- ifeq ($(CFG_XETEX),)
56
- $(info cfg : no xetex found, disabling doc/rust.pdf)
57
- else
58
- ifeq ($(CFG_LUATEX),)
59
- $(info cfg : lacking luatex, disabling pdflatex)
60
- else
61
55
62
56
DOCS += doc/rust.pdf
63
57
doc/rust.tex : rust.md doc/version.md
@@ -70,17 +64,6 @@ doc/rust.tex: rust.md doc/version.md
70
64
--from =markdown --to=latex \
71
65
--output=$@
72
66
73
- doc/rust.pdf : doc/rust.tex
74
- @$(call E, pdflatex: $@ )
75
- $(Q )$(CFG_PDFLATEX ) \
76
- -interaction =batchmode \
77
- -output-directory=doc \
78
- $<
79
-
80
- endif
81
- endif
82
- endif
83
-
84
67
DOCS += doc/rustpkg.html
85
68
doc/rustpkg.html : rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
86
69
@$(call E, pandoc: $@ )
@@ -95,13 +78,6 @@ doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
95
78
--include-before-body=doc/version_info.html \
96
79
--output=$@
97
80
98
- # #####################################################################
99
- # Node (tutorial related)
100
- # #####################################################################
101
- ifeq ($(CFG_NODE),)
102
- $(info cfg : no node found, omitting doc/tutorial.html)
103
- else
104
-
105
81
DOCS += doc/tutorial.html
106
82
doc/tutorial.html : tutorial.md doc/version_info.html doc/rust.css
107
83
@$(call E, pandoc: $@ )
@@ -153,9 +129,28 @@ doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css
153
129
--include-before-body=doc/version_info.html \
154
130
--output=$@
155
131
132
+ ifeq ($(CFG_PDFLATEX),)
133
+ $(info cfg : no pdflatex found, omitting doc/rust.pdf)
134
+ else
135
+ ifeq ($(CFG_XETEX),)
136
+ $(info cfg : no xetex found, disabling doc/rust.pdf)
137
+ else
138
+ ifeq ($(CFG_LUATEX),)
139
+ $(info cfg : lacking luatex, disabling pdflatex)
140
+ else
141
+
142
+ doc/rust.pdf : doc/rust.tex
143
+ @$(call E, pdflatex: $@ )
144
+ $(Q )$(CFG_PDFLATEX ) \
145
+ -interaction =batchmode \
146
+ -output-directory=doc \
147
+ $<
148
+
149
+ endif
150
+ endif
156
151
endif
157
- endif
158
152
153
+ endif # No pandoc / node
159
154
160
155
# #####################################################################
161
156
# LLnextgen (grammar analysis from refman)
0 commit comments