mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
docs: automate installation of asciidcotor ruby dependency with ./build
This commit is contained in:
@@ -10,4 +10,4 @@ DEPENDENCIES
|
|||||||
asciidoctor (= 2.0.10)
|
asciidoctor (= 2.0.10)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.0.1
|
2.0.2
|
||||||
|
|||||||
15
README.adoc
15
README.adoc
@@ -15228,13 +15228,18 @@ but note that this does not include script specific options.
|
|||||||
|
|
||||||
=== Build the documentation
|
=== 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
|
./build --download-dependencies docs
|
||||||
sudo gem install asciidoctor -v 2.0.10
|
....
|
||||||
./build-doc
|
|
||||||
xdg-open out/README.html
|
which also downloads build dependencies.
|
||||||
|
|
||||||
|
Then the following times just to the faster:
|
||||||
|
|
||||||
|
....
|
||||||
|
./build-docs
|
||||||
....
|
....
|
||||||
|
|
||||||
Source: link:build-doc[]
|
Source: link:build-doc[]
|
||||||
|
|||||||
14
build
14
build
@@ -35,6 +35,7 @@ class _Component:
|
|||||||
submodules_shallow=None,
|
submodules_shallow=None,
|
||||||
python2_pkgs=None,
|
python2_pkgs=None,
|
||||||
python3_pkgs=None,
|
python3_pkgs=None,
|
||||||
|
ruby_pkgs=None,
|
||||||
):
|
):
|
||||||
self.build_callback = build_callback
|
self.build_callback = build_callback
|
||||||
self.supported_archs = supported_archs
|
self.supported_archs = supported_archs
|
||||||
@@ -45,6 +46,7 @@ class _Component:
|
|||||||
self.submodules_shallow = submodules_shallow or set()
|
self.submodules_shallow = submodules_shallow or set()
|
||||||
self.python2_pkgs = python2_pkgs or set()
|
self.python2_pkgs = python2_pkgs or set()
|
||||||
self.python3_pkgs = python3_pkgs or set()
|
self.python3_pkgs = python3_pkgs or set()
|
||||||
|
self.ruby_pkgs = ruby_pkgs or set()
|
||||||
|
|
||||||
def build(self, arch):
|
def build(self, arch):
|
||||||
if (
|
if (
|
||||||
@@ -233,6 +235,9 @@ so looping over all of them would waste time.
|
|||||||
),
|
),
|
||||||
'doc': _Component(
|
'doc': _Component(
|
||||||
self._build_file('build-doc'),
|
self._build_file('build-doc'),
|
||||||
|
ruby_pkgs={
|
||||||
|
'asciidoctor',
|
||||||
|
},
|
||||||
),
|
),
|
||||||
'gem5': _Component(
|
'gem5': _Component(
|
||||||
self._build_file('build-gem5'),
|
self._build_file('build-gem5'),
|
||||||
@@ -457,6 +462,7 @@ Which components to build. Default: qemu-buildroot
|
|||||||
python3_pkgs = {
|
python3_pkgs = {
|
||||||
'pexpect==4.6.0',
|
'pexpect==4.6.0',
|
||||||
}
|
}
|
||||||
|
ruby_pkgs = set()
|
||||||
for component in selected_components:
|
for component in selected_components:
|
||||||
apt_get_pkgs.update(component.apt_get_pkgs)
|
apt_get_pkgs.update(component.apt_get_pkgs)
|
||||||
apt_build_deps.update(component.apt_build_deps)
|
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)
|
submodules_shallow.update(component.submodules_shallow)
|
||||||
python2_pkgs.update(component.python2_pkgs)
|
python2_pkgs.update(component.python2_pkgs)
|
||||||
python3_pkgs.update(component.python3_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 apt_get_pkgs or apt_build_deps:
|
||||||
if self.env['travis']:
|
if self.env['travis']:
|
||||||
interacive_pkgs = {
|
interacive_pkgs = {
|
||||||
@@ -514,6 +524,10 @@ Which components to build. Default: qemu-buildroot
|
|||||||
['python3', '-m', 'pip', 'install', '--user', LF] +
|
['python3', '-m', 'pip', 'install', '--user', LF] +
|
||||||
self.sh.add_newlines(sorted(python3_pkgs))
|
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_cmd_common = [
|
||||||
'git', LF,
|
'git', LF,
|
||||||
'submodule', LF,
|
'submodule', LF,
|
||||||
|
|||||||
Reference in New Issue
Block a user