]> git.lizzy.rs Git - rust.git/commitdiff
build the tutorial if node.js is available
authorGrahame Bowland <grahame@angrygoats.net>
Tue, 17 Jan 2012 15:56:20 +0000 (23:56 +0800)
committerGrahame Bowland <grahame@angrygoats.net>
Tue, 17 Jan 2012 15:56:20 +0000 (23:56 +0800)
Makefile.in
configure
mk/docs.mk

index 5c5191e079d51f8ce5f53e87110cfb1e86f35a20..abe2359b315fcfe22c8ec7f0b8fff790f7146e61 100644 (file)
@@ -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
index 3563f0b8826c88ac6e10f2103caaa6b9dc803741..5dbfeadc6185e9d323a258c0a2304496fd3c62e8 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
index 866d5f20a1931d0c0cd58f40b7eeb48ebad9c267..faf51d88885da6d5b11642af9c806b8d06380b1d 100644 (file)
@@ -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