Update recipe for new build generation location
Change-Id: I8993b5d4b7551b9e65686e70c0d62eafabf4ec10
Reviewed-on: https://gn-review.googlesource.com/1280
Reviewed-by: Petr Hosek <phosek@google.com>
diff --git a/README.md b/README.md
index c7e1ad3..486b14d 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Get started with:
- git clone https://gn.googlesource.com/gn
- cd gn
- build/gen.py
- ninja -C out
+ git clone https://gn.googlesource.com/gn
+ cd gn
+ build/gen.py
+ ninja -C out
diff --git a/infra/recipes/gn.expected/ci_linux.json b/infra/recipes/gn.expected/ci_linux.json
index 4e5c5ff..8fec41e 100644
--- a/infra/recipes/gn.expected/ci_linux.json
+++ b/infra/recipes/gn.expected/ci_linux.json
@@ -70,18 +70,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]/gn/tools/gn/bootstrap/bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]/gn/build/gen.py"
+ ],
+ "cwd": "[START_DIR]/gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]/cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]/gn/out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]/cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.expected/ci_mac.json b/infra/recipes/gn.expected/ci_mac.json
index 4e5c5ff..8fec41e 100644
--- a/infra/recipes/gn.expected/ci_mac.json
+++ b/infra/recipes/gn.expected/ci_mac.json
@@ -70,18 +70,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]/gn/tools/gn/bootstrap/bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]/gn/build/gen.py"
+ ],
+ "cwd": "[START_DIR]/gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]/cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]/gn/out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]/cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.expected/ci_win.json b/infra/recipes/gn.expected/ci_win.json
index 08a77d3..28b0330 100644
--- a/infra/recipes/gn.expected/ci_win.json
+++ b/infra/recipes/gn.expected/ci_win.json
@@ -70,18 +70,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]\\gn\\tools\\gn\\bootstrap\\bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]\\gn\\build\\gen.py"
+ ],
+ "cwd": "[START_DIR]\\gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]\\cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]\\gn\\out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]\\cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.expected/cq_linux.json b/infra/recipes/gn.expected/cq_linux.json
index 306e218..013a468 100644
--- a/infra/recipes/gn.expected/cq_linux.json
+++ b/infra/recipes/gn.expected/cq_linux.json
@@ -97,18 +97,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]/gn/tools/gn/bootstrap/bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]/gn/build/gen.py"
+ ],
+ "cwd": "[START_DIR]/gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]/cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]/gn/out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]/cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.expected/cq_mac.json b/infra/recipes/gn.expected/cq_mac.json
index 306e218..013a468 100644
--- a/infra/recipes/gn.expected/cq_mac.json
+++ b/infra/recipes/gn.expected/cq_mac.json
@@ -97,18 +97,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]/gn/tools/gn/bootstrap/bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]/gn/build/gen.py"
+ ],
+ "cwd": "[START_DIR]/gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]/cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]/gn/out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]/cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.expected/cq_win.json b/infra/recipes/gn.expected/cq_win.json
index 124a4a7..83394bd 100644
--- a/infra/recipes/gn.expected/cq_win.json
+++ b/infra/recipes/gn.expected/cq_win.json
@@ -97,18 +97,41 @@
]
},
{
+ "cmd": [],
+ "name": "build"
+ },
+ {
"cmd": [
"python",
"-u",
- "[START_DIR]\\gn\\tools\\gn\\bootstrap\\bootstrap.py",
- "--no-rebuild"
+ "[START_DIR]\\gn\\build\\gen.py"
+ ],
+ "cwd": "[START_DIR]\\gn",
+ "env_prefixes": {
+ "PATH": [
+ "[START_DIR]\\cipd"
+ ]
+ },
+ "name": "build.generate",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]\\gn\\out"
],
"env_prefixes": {
"PATH": [
"[START_DIR]\\cipd"
]
},
- "name": "bootstrap"
+ "name": "build.ninja",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"name": "$result",
diff --git a/infra/recipes/gn.py b/infra/recipes/gn.py
index 33012fb..d89466a 100644
--- a/infra/recipes/gn.py
+++ b/infra/recipes/gn.py
@@ -45,11 +45,15 @@
}
api.cipd.ensure(cipd_dir, packages)
- with api.context(env_prefixes={'PATH': [cipd_dir]}):
- api.python(
- 'bootstrap',
- src_dir.join('tools', 'gn', 'bootstrap', 'bootstrap.py'),
- args=['--no-rebuild'])
+ with api.step.nest('build'):
+ with api.context(env_prefixes={'PATH': [cipd_dir]}, cwd=src_dir):
+ api.python(
+ 'generate',
+ src_dir.join('build', 'gen.py'))
+
+ with api.context(env_prefixes={'PATH': [cipd_dir]}):
+ api.step('ninja',
+ ['ninja', '-C', src_dir.join('out')])
def GenTests(api):