aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/devtools')
-rw-r--r--contrib/devtools/README.md8
-rwxr-xr-xcontrib/devtools/gen-manpages.sh12
2 files changed, 15 insertions, 5 deletions
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
index 67c5e15a15..8ca8fa9066 100644
--- a/contrib/devtools/README.md
+++ b/contrib/devtools/README.md
@@ -85,6 +85,14 @@ gen-manpages.sh
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
+With in-tree builds this tool can be run from any directory within the
+repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
+example:
+
+```bash
+BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
+```
+
git-subtree-check.sh
====================
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
index 925d6a6252..27c80548c1 100755
--- a/contrib/devtools/gen-manpages.sh
+++ b/contrib/devtools/gen-manpages.sh
@@ -1,13 +1,15 @@
#!/bin/bash
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
-SRCDIR=${SRCDIR:-$TOPDIR/src}
+BUILDDIR=${BUILDDIR:-$TOPDIR}
+
+BINDIR=${BINDIR:-$BUILDDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
-BITCOIND=${BITCOIND:-$SRCDIR/bitcoind}
-BITCOINCLI=${BITCOINCLI:-$SRCDIR/bitcoin-cli}
-BITCOINTX=${BITCOINTX:-$SRCDIR/bitcoin-tx}
-BITCOINQT=${BITCOINQT:-$SRCDIR/qt/bitcoin-qt}
+BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
+BITCOINCLI=${BITCOINCLI:-$BINDIR/bitcoin-cli}
+BITCOINTX=${BITCOINTX:-$BINDIR/bitcoin-tx}
+BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1