Skip to content

Commit f14ee0b

Browse files
committed
Merge pull request #1549 from grahame/build-tutorial
build the tutorial if node.js is available
2 parents 4ac4449 + 9be247b commit f14ee0b

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

Makefile.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ else
148148
endif
149149
endif
150150

151+
ifeq ($(CFG_NODE),)
152+
$(info cfg: no node found, omitting doc/tutorial/web)
153+
else
154+
DOCS += doc/tutorial/web/index.html
155+
endif
156+
151157
ifeq ($(CFG_NATURALDOCS),)
152158
$(info cfg: no naturaldocs found, omitting library doc build)
153159
else

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ probe CFG_NATURALDOCS naturaldocs
289289
probe CFG_LLNEXTGEN LLnextgen
290290
probe CFG_PANDOC pandoc
291291
probe CFG_PDFLATEX pdflatex
292+
probe CFG_NODE node
292293

293294
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
294295
then

mk/docs.mk

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,26 @@ doc/rust.pdf: doc/rust.tex
4242

4343
endif
4444

45+
ifdef CFG_NODE
46+
47+
doc/tutorial/web/index.html: doc/tutorial/args.md \
48+
doc/tutorial/control.md \
49+
doc/tutorial/data.md \
50+
doc/tutorial/ffi.md \
51+
doc/tutorial/func.md \
52+
doc/tutorial/generic.md \
53+
doc/tutorial/iface.md \
54+
doc/tutorial/index.md \
55+
doc/tutorial/intro.md \
56+
doc/tutorial/mod.md \
57+
doc/tutorial/setup.md \
58+
doc/tutorial/syntax.md \
59+
doc/tutorial/task.md \
60+
doc/tutorial/test.md
61+
$(Q)cd doc/tutorial && $(CFG_NODE) build.js
62+
63+
endif
64+
4565
endif
4666

4767
ifdef CFG_LLNEXTGEN

0 commit comments

Comments
 (0)