Skip to content

build the tutorial if node.js is available #1549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ else
endif
endif

ifeq ($(CFG_NODE),)
$(info cfg: no node found, omitting doc/tutorial/web)
else
DOCS += doc/tutorial/web/index.html
endif

ifeq ($(CFG_NATURALDOCS),)
$(info cfg: no naturaldocs found, omitting library doc build)
else
Expand Down
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ probe CFG_NATURALDOCS naturaldocs
probe CFG_LLNEXTGEN LLnextgen
probe CFG_PANDOC pandoc
probe CFG_PDFLATEX pdflatex
probe CFG_NODE node

if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
then
Expand Down
20 changes: 20 additions & 0 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ doc/rust.pdf: doc/rust.tex

endif

ifdef CFG_NODE

doc/tutorial/web/index.html: doc/tutorial/args.md \
doc/tutorial/control.md \
doc/tutorial/data.md \
doc/tutorial/ffi.md \
doc/tutorial/func.md \
doc/tutorial/generic.md \
doc/tutorial/iface.md \
doc/tutorial/index.md \
doc/tutorial/intro.md \
doc/tutorial/mod.md \
doc/tutorial/setup.md \
doc/tutorial/syntax.md \
doc/tutorial/task.md \
doc/tutorial/test.md
$(Q)cd doc/tutorial && $(CFG_NODE) build.js

endif

endif

ifdef CFG_LLNEXTGEN
Expand Down