Skip to content

Commit dcfe218

Browse files
author
MarcoFalke
committed
Merge #12308: contrib: Add support for out-of-tree builds in gen-manpages.sh
526e282 contrib: Add support for out-of-tree builds in gen-manpages.sh (Wladimir J. van der Laan) Pull request description: This adds support for setting the environment variable `BUILDDIR` to point to executables that are outside the source directory. E.g. to invoke the tool when the build is in $PWD/build: ```bash BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh ``` This avoids having to manually copy the generated manpages after they end up in the build instead of source path, when setting TOPDIR instead. Tree-SHA512: 8dc6dd7a47a0c014ae7d27f0ac9d86f69238ec6bac8a3007b975bb88c9f37014755c716c5e62604dd91baad2f8a41fd1544cdca3ba4b59bc76602e6593f4a4a7
2 parents 8a98dfe + 526e282 commit dcfe218

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

contrib/devtools/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ gen-manpages.sh
8585
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
8686
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
8787

88+
With in-tree builds this tool can be run from any directory within the
89+
repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
90+
example:
91+
92+
```bash
93+
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
94+
```
95+
8896
git-subtree-check.sh
8997
====================
9098

contrib/devtools/gen-manpages.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/bash
22

33
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
4-
SRCDIR=${SRCDIR:-$TOPDIR/src}
4+
BUILDDIR=${BUILDDIR:-$TOPDIR}
5+
6+
BINDIR=${BINDIR:-$BUILDDIR/src}
57
MANDIR=${MANDIR:-$TOPDIR/doc/man}
68

7-
BITCOIND=${BITCOIND:-$SRCDIR/bitcoind}
8-
BITCOINCLI=${BITCOINCLI:-$SRCDIR/bitcoin-cli}
9-
BITCOINTX=${BITCOINTX:-$SRCDIR/bitcoin-tx}
10-
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/bitcoin-qt}
9+
BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
10+
BITCOINCLI=${BITCOINCLI:-$BINDIR/bitcoin-cli}
11+
BITCOINTX=${BITCOINTX:-$BINDIR/bitcoin-tx}
12+
BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
1113

1214
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
1315

0 commit comments

Comments
 (0)