diff --git a/Gemfile.lock b/Gemfile.lock index cc1c34e..8972e7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,4 +10,4 @@ DEPENDENCIES asciidoctor (= 2.0.10) BUNDLED WITH - 2.0.1 + 2.0.2 diff --git a/README.adoc b/README.adoc index 02e9866..6796e79 100644 --- a/README.adoc +++ b/README.adoc @@ -15228,13 +15228,18 @@ but note that this does not include script specific options. === Build the documentation -You don't need to depend on GitHub: +You don't need to depend on GitHub. To build the first time use: .... -sudo apt-get install rubygems -sudo gem install asciidoctor -v 2.0.10 -./build-doc -xdg-open out/README.html +./build --download-dependencies docs +.... + +which also downloads build dependencies. + +Then the following times just to the faster: + +.... +./build-docs .... Source: link:build-doc[] diff --git a/build b/build index bb87e3d..f1106af 100755 --- a/build +++ b/build @@ -35,6 +35,7 @@ class _Component: submodules_shallow=None, python2_pkgs=None, python3_pkgs=None, + ruby_pkgs=None, ): self.build_callback = build_callback self.supported_archs = supported_archs @@ -45,6 +46,7 @@ class _Component: self.submodules_shallow = submodules_shallow or set() self.python2_pkgs = python2_pkgs or set() self.python3_pkgs = python3_pkgs or set() + self.ruby_pkgs = ruby_pkgs or set() def build(self, arch): if ( @@ -233,6 +235,9 @@ so looping over all of them would waste time. ), 'doc': _Component( self._build_file('build-doc'), + ruby_pkgs={ + 'asciidoctor', + }, ), 'gem5': _Component( self._build_file('build-gem5'), @@ -457,6 +462,7 @@ Which components to build. Default: qemu-buildroot python3_pkgs = { 'pexpect==4.6.0', } + ruby_pkgs = set() for component in selected_components: apt_get_pkgs.update(component.apt_get_pkgs) apt_build_deps.update(component.apt_build_deps) @@ -464,6 +470,10 @@ Which components to build. Default: qemu-buildroot submodules_shallow.update(component.submodules_shallow) python2_pkgs.update(component.python2_pkgs) python3_pkgs.update(component.python3_pkgs) + python3_pkgs.update(component.python3_pkgs) + ruby_pkgs.update(component.ruby_pkgs) + if ruby_pkgs: + apt_get_pkgs.add('ruby') if apt_get_pkgs or apt_build_deps: if self.env['travis']: interacive_pkgs = { @@ -514,6 +524,10 @@ Which components to build. Default: qemu-buildroot ['python3', '-m', 'pip', 'install', '--user', LF] + self.sh.add_newlines(sorted(python3_pkgs)) ) + if ruby_pkgs: + # TODO fails without sudo and with --local on Ubuntu 18.04. + self.sh.run_cmd(['sudo', 'gem', 'install', 'bundler', LF]) + self.sh.run_cmd(['bundle', 'install', LF]) git_cmd_common = [ 'git', LF, 'submodule', LF,