aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2019-07-25 19:39:32 +0200
committerSimon Sapin <simon.sapin@exyr.org>2019-07-29 17:37:03 +0200
commitddb4e369ddb8d9bb20142d34e320370cd3be196f (patch)
treed7b022fcae6bc1530cc9c499cf985f3207ffeae0 /python/servo/post_build_commands.py
parentf1300bb98b0267b552a3f12e64e30f2f414213a3 (diff)
downloadservo-ddb4e369ddb8d9bb20142d34e320370cd3be196f.tar.gz
servo-ddb4e369ddb8d9bb20142d34e320370cd3be196f.zip
Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}
Renaming the variable helped make sure I looked at every use.
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r--python/servo/post_build_commands.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index b9dc9b080ef..2e3a2aff8e2 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -237,7 +237,7 @@ class PostBuildCommands(CommandBase):
'params', nargs='...',
help="Command-line arguments to be passed through to cargo doc")
@CommandBase.build_like_command_arguments
- def doc(self, params, **kwargs):
+ def doc(self, params, features, **kwargs):
env = os.environ.copy()
env["RUSTUP_TOOLCHAIN"] = self.toolchain()
rustc_path = check_output(["rustup" + BIN_SUFFIX, "which", "rustc"], env=env)
@@ -265,7 +265,8 @@ class PostBuildCommands(CommandBase):
else:
copy2(full_name, destination)
- returncode = self.run_cargo_build_like_command("doc", params, **kwargs)
+ features = features or []
+ returncode = self.run_cargo_build_like_command("doc", params, features=features, **kwargs)
if returncode:
return returncode
@@ -274,7 +275,11 @@ class PostBuildCommands(CommandBase):
copy2(path.join(static, name), path.join(docs, name))
build = path.join(self.context.topdir, "components", "style", "properties", "build.py")
- subprocess.check_call([sys.executable, build, "servo", "html"])
+ if "layout-2020" in features:
+ engine = "servo-2020"
+ if "layout-2013" in features:
+ engine = "servo-2013"
+ subprocess.check_call([sys.executable, build, engine, "html"])
script = path.join(self.context.topdir, "components", "script")
subprocess.check_call(["cmake", "."], cwd=script)