summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/documentation/build.scons
diff options
context:
space:
mode:
Diffstat (limited to 'native_client_sdk/src/documentation/build.scons')
-rw-r--r--native_client_sdk/src/documentation/build.scons28
1 files changed, 28 insertions, 0 deletions
diff --git a/native_client_sdk/src/documentation/build.scons b/native_client_sdk/src/documentation/build.scons
new file mode 100644
index 0000000..1b6dd43
--- /dev/null
+++ b/native_client_sdk/src/documentation/build.scons
@@ -0,0 +1,28 @@
+#! -*- python -*-
+#
+# Copyright (c) 2010 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""scons script for building the Doxygen-based documentation for c_salt"""
+
+Import('env')
+
+env.SetDefault(DOXYGEN=ARGUMENTS.get('DOXYGEN', 'doxygen'))
+
+# Gate on host platform rather than target, since all are supported.
+if env['PLATFORM'] in ['win32', 'cygwin']:
+ env['ENV']['NACL_SDK_PLATFORM'] = 'windows'
+elif env['PLATFORM'] in ['darwin']:
+ env['ENV']['NACL_SDK_PLATFORM'] = 'mac'
+else:
+ env['ENV']['NACL_SDK_PLATFORM'] = 'linux'
+
+# The output is generated into scons-out/doc (c.f. Doxyfile).
+# Point your browser at scons-out/doc/html/index.html
+node = env.Command(
+ target='doxygen.log',
+ source='Doxyfile',
+ action='${DOXYGEN} documentation/Doxyfile 2>&1 > ${TARGET}')
+AlwaysBuild(node)
+env.AddNodeAliases(node, [], 'docs')