Commit 9de351b2581f41ee049326ddbfb7deddd3710561

Vicent Marti 2010-12-09T23:06:02

Move documentation generation to the Waf system The new command is './waf doxygen' Signed-off-by: Vicent Marti <tanoku@gmail.com>

diff --git a/Rakefile b/Rakefile
deleted file mode 100644
index c702a82..0000000
--- a/Rakefile
+++ /dev/null
@@ -1,21 +0,0 @@
-desc "Build and Run Tests"
-task :build do
-  `./waf clean`
-  `./waf clean-tests`
-  `./waf configure`
-  `./waf build`
-  `./waf test`
-end
-
-desc "Build docs"
-task :docs do
-  puts "Generating Doxygen docs"
-  `doxygen api.doxygen`
-  `git stash`
-  `git checkout gh-pages`
-  `cp -Rf apidocs/html/* .`
-  `git add .`
-  `git commit -am 'generated docs'`
-  `git push origin gh-pages`
-  `git checkout master`
-end
diff --git a/wscript b/wscript
index 6e0c8e6..97aae84 100644
--- a/wscript
+++ b/wscript
@@ -181,6 +181,19 @@ def test(bld):
 	from waflib import Options
 	Options.commands = ['build-tests', 'run-tests'] + Options.commands
 
+class _build_doc(Context):
+    cmd = 'doxygen'
+    fun = 'build_docs'
+
+def build_docs(ctx):
+    ctx.exec_command("doxygen api.doxygen")
+    ctx.exec_command("git stash")
+    ctx.exec_command("git checkout gh-pages")
+    ctx.exec_command("cp -Rf apidocs/html/* .")
+    ctx.exec_command("git add .")
+    ctx.exec_command("git commit -am 'generated docs'")
+    ctx.exec_command("git push origin gh-pages")
+    ctx.exec_command("git checkout master")
 
 class _run_tests(Context):
 	cmd = 'run-tests'