Generate apis.html in ./mach doc

This commit is contained in:
Simon Sapin 2018-12-07 19:49:43 +01:00
parent 98c5710135
commit 00a1e9391c
2 changed files with 5 additions and 8 deletions

View file

@ -19,14 +19,6 @@ cd "$(dirname ${0})/../.."
env CC=gcc-5 CXX=g++-5 ./mach doc env CC=gcc-5 CXX=g++-5 ./mach doc
cd components/script
cmake .
cmake --build . --target supported-apis
echo "Copying apis.html."
cp apis.html ../../target/doc/servo/
echo "Copied apis.html."
cd ../..
echo "Starting ghp-import." echo "Starting ghp-import."
ghp-import -n target/doc ghp-import -n target/doc
echo "Finished ghp-import." echo "Finished ghp-import."

View file

@ -277,6 +277,11 @@ class PostBuildCommands(CommandBase):
build = path.join(self.context.topdir, "components", "style", "properties", "build.py") build = path.join(self.context.topdir, "components", "style", "properties", "build.py")
subprocess.check_call([sys.executable, build, "servo", "html"]) subprocess.check_call([sys.executable, build, "servo", "html"])
script = path.join(self.context.topdir, "components", "script")
subprocess.check_call(["cmake", "."], cwd=script)
subprocess.check_call(["cmake", "--build", ".", "--target", "supported-apis"], cwd=script)
copy2(path.join(script, "apis.html"), path.join(docs, "servo", "apis.html"))
@Command('browse-doc', @Command('browse-doc',
description='Generate documentation and open it in a web browser', description='Generate documentation and open it in a web browser',
category='post-build') category='post-build')