Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: ninja.bat

Issue 9967020: Wrap ninja invocation to include python in path, and set up compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ninja.exe » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ CRLF
OLDNEW
(Empty)
1 @echo off
2
3 :: Copyright (c) 2012 Google Inc. All rights reserved.
4 :: Use of this source code is governed by a BSD-style license that can be
5 :: found in the LICENSE file.
6
7 setlocal enabledelayedexpansion
8
9 :: Parse args to see if a -C argument (to change working directory) is being
10 :: supplied. We expect project generation to output a set_environment.bat that
11 :: will set up the environment (variables and path). This script generally
12 :: just calls the correct VS vars batch file, but only gyp has the knowledge
13 :: to determine which version of the IDE/toolchain it wants to use, so we have
14 :: to defer to it to make that decision.
15 set found_dash_c=0
16 set cd_path=.
17 for %%A in (%*) do (
18 if "!found_dash_c!"=="1" (
19 set cd_path=%%A
20 goto done_dash_c
21 )
22 if "%%A"=="-C" (
23 set found_dash_c=1
24 )
25 )
26 :done_dash_c
27
28 if not exist "%cd_path%\set_environment.bat" (
29 echo ninja.bat: set_environment.bat not found in '%cd_path%'. Is -C arg correc t?
30 goto :EOF
31 )
32 call "%cd_path%\set_environment.bat"
33
34 :: Add python to the path, many gyp rules assume it's there.
35 :: Add ninja directory to the path (to find ninja and ninja-deplist-helper).
36 :: Then, export only the path changes out of the script so that next time we
37 :: just run ninja directly (otherwise, this script adds about 500-800ms to
38 :: ninja invocations).
39 endlocal & set PATH=%~dp0python_bin;%~dp0ninja-win;%PATH% & set INCLUDE=%INCLUDE % & set LIBPATH=%LIBPATH% & set LIB=%LIB%
40
41 :: Now run the actual build.
42 ninja.exe %*
OLDNEW
« no previous file with comments | « no previous file | ninja.exe » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698