summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/project_templates/scons.bat
diff options
context:
space:
mode:
authorbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 20:06:08 +0000
committerbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 20:06:08 +0000
commita962a9c04cfcec1806a2b4dbcd3d44b83d7366d0 (patch)
tree413f46ef98e3ebd64dde1d59f6122b5562dc1e55 /native_client_sdk/src/project_templates/scons.bat
parent7e2514c563fb4bec5e991567a816ba9e41c6c917 (diff)
downloadchromium_src-a962a9c04cfcec1806a2b4dbcd3d44b83d7366d0.zip
chromium_src-a962a9c04cfcec1806a2b4dbcd3d44b83d7366d0.tar.gz
chromium_src-a962a9c04cfcec1806a2b4dbcd3d44b83d7366d0.tar.bz2
Restructuring SDK so that it builds inside a normal chrome checkout.
Adding the glibc toolchain to chromebots. BUG=None TEST=None R=noelallen@google.com Review URL: http://codereview.chromium.org/8676030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src/project_templates/scons.bat')
-rwxr-xr-xnative_client_sdk/src/project_templates/scons.bat35
1 files changed, 27 insertions, 8 deletions
diff --git a/native_client_sdk/src/project_templates/scons.bat b/native_client_sdk/src/project_templates/scons.bat
index f487e28..d3c6c06 100755
--- a/native_client_sdk/src/project_templates/scons.bat
+++ b/native_client_sdk/src/project_templates/scons.bat
@@ -6,26 +6,45 @@
setlocal
-set NACL_SDK_ROOT=<NACL_SDK_ROOT>
+:: NACL_SDK_ROOT must be set.
+if not defined NACL_SDK_ROOT (
+ echo Error: NACL_SDK_ROOT is not set.
+ echo Please set NACL_SDK_ROOT to the full path of the Native Client SDK.
+ echo For example:
+ echo set NACL_SDK_ROOT=D:\nacl_sdk
+ goto end
+)
+
:: NACL_TARGET_PLATFORM is really the name of a folder with the base dir -
:: usually NACL_SDK_ROOT - within which the toolchain for the target platform
:: are found.
:: Replace the platform with the name of your target platform. For example, to
:: build applications that target the pepper_17 API, set
:: NACL_TARGET_PLATFORM=pepper_17
-set NACL_TARGET_PLATFORM=<NACL_PLATFORM>
+if not defined NACL_TARGET_PLATFORM (
+ set NACL_TARGET_PLATFORM=pepper_17
+)
set NACL_PLATFORM_DIR=%NACL_SDK_ROOT%\%NACL_TARGET_PLATFORM%
-:: Set the PYTHONPATH and SCONS_LIB_DIR so we can import SCons modules
-set SCONS_LIB_DIR=%NACL_PLATFORM_DIR%\third_party\scons-2.0.1\engine
-set PYTHONPATH=%NACL_PLATFORM_DIR%\third_party\scons-2.0.1\engine
+set SCONS_DIR=%NACL_PLATFORM_DIR%\third_party\scons-2.0.1
+if exist %SCONS_DIR% goto gotscons
+set SCONS_DIR=%~dp0..\..\..\third_party\scons-2.0.1
+:gotscons
+
+set SCONS_LIB_DIR=%SCONS_DIR%\engine
+set PYTHONPATH=%SCONS_LIB_DIR%;%NACL_PLATFORM_DIR%\build_tools
:: We have to do this because scons overrides PYTHONPATH and does not preserve
:: what is provided by the OS. The custom variable name won't be overwritten.
-set PYMOX=%NACL_PLATFORM_DIR%\third_party\pymox
+set PYMOX=%NACL_PLATFORM_DIR%\third_party\pymox\src
+
+set BASE_SCRIPT=%SCONS_DIR%\script\scons
:: Run the included copy of scons.
-python -O -OO "%NACL_PLATFORM_DIR%\third_party\scons-2.0.1\script\scons" ^
+python -O -OO %BASE_SCRIPT% ^
+--warn no-visual-c-missing ^
--file=build.scons ^
---site-dir="%NACL_PLATFORM_DIR%\build_tools\nacl_sdk_scons" %*
+--site-dir="%~dp0..\build_tools\nacl_sdk_scons" %*
+
+:end