[pacman-dev] doc: set rootdir correctly in man pages

Message ID 20190221122231.3999-1-jelle@vdwaa.nl
State Accepted, archived
Headers show
Series [pacman-dev] doc: set rootdir correctly in man pages | expand

Commit Message

Jelle van der Waa Feb. 21, 2019, 12:22 p.m. UTC
If an alternative rootdir is specified in either meson or configure it's
not respected in the generated man pages.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
---
 doc/Makefile.am       | 3 ++-
 doc/meson.build       | 1 +
 doc/pacman.8.asciidoc | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

Comments

Allan McRae March 7, 2019, 1:10 a.m. UTC | #1
On 21/2/19 10:22 pm, Jelle van der Waa wrote:
> If an alternative rootdir is specified in either meson or configure it's
> not respected in the generated man pages.
> 
> Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
> ---

Thanks.

A

Patch

diff --git a/doc/Makefile.am b/doc/Makefile.am
index de87c409..e03d6ab8 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -112,7 +112,8 @@  ASCIIDOC_OPTS = \
 	-a pkgdatadir=$(pkgdatadir) \
 	-a localstatedir=$(localstatedir) \
 	-a sysconfdir=$(sysconfdir) \
-	-a datarootdir=$(datarootdir)
+	-a datarootdir=$(datarootdir) \
+	-a rootdir=$(ROOTDIR)
 
 A2X_OPTS = \
 	--no-xmllint \
diff --git a/doc/meson.build b/doc/meson.build
index b7514ef7..d6403bae 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -31,6 +31,7 @@  asciidoc_opts = [
  '-a', 'localstatedir=@0@'.format(LOCALSTATEDIR),
  '-a', 'sysconfdir=@0@'.format(SYSCONFDIR),
  '-a', 'datarootdir=@0@'.format(DATAROOTDIR),
+ '-a', 'rootdir=@0@'.format(ROOTDIR),
 ]
 
 html_targets = []
diff --git a/doc/pacman.8.asciidoc b/doc/pacman.8.asciidoc
index 6b2d9172..fe95178d 100644
--- a/doc/pacman.8.asciidoc
+++ b/doc/pacman.8.asciidoc
@@ -131,7 +131,7 @@  Options
 	not automatically prepended.
 
 *-r, \--root* <path>::
-	Specify an alternative installation root (default is `/`). This should
+	Specify an alternative installation root (default is +{rootdir}+). This should
 	not be used as a way to install software into `/usr/local` instead of
 	`/usr`.
 	*NOTE*: If database path or log file are not specified on either the