Skip to content

Commit 9d7672b

Browse files
committed
Merge bitcoin/bitcoin#31742: contrib: fix BUILDDIR in gen-bitcoin-conf script and gen-manpages.py
63a8791 contrib: fix BUILDDIR in gen-bitcoin-conf script and gen-manpages.py (jurraca) Pull request description: The `gen-bitcoin-conf.sh` and `gen-manpages.py` scripts assume a top level `src/` build dir, but in-tree builds are no longer allowed, nor recommended in the build steps. If a user builds `bitcoind` as recommended, these scripts fail. To fix it, we update the `BUILDDIR` env var and update the README accordingly. Follows up on initial work and discussion in #31332 . ACKs for top commit: fjahr: Code review ACK 63a8791 achow101: ACK 63a8791 Tree-SHA512: cf4d5b0d2e8b1f5db759bec01e131d8a0c511a2fd183389d2a0488d5fe4a906db2579d944f408b5c966f619edc6b2534023c3521f1fa5f8edd0216d29f3e48db
2 parents 77bf990 + 63a8791 commit 9d7672b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

contrib/devtools/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ gen-manpages.py
102102
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
103103
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
104104

105-
With in-tree builds this tool can be run from any directory within the
106-
repository. To use this tool with out-of-tree builds set `BUILDDIR`. For
107-
example:
105+
This script assumes a build directory named `build` as suggested by example build documentation.
106+
To use it with a different build directory, set `BUILDDIR`.
107+
For example:
108108

109109
```bash
110-
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
110+
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-manpages.py
111111
```
112112

113113
headerssync-params.py
@@ -127,12 +127,12 @@ Generates a bitcoin.conf file in `share/examples/` by parsing the output from `b
127127
release process to include a bitcoin.conf with the release binaries and can also be run by users to generate a file locally.
128128
When generating a file as part of the release process, make sure to commit the changes after running the script.
129129

130-
With in-tree builds this tool can be run from any directory within the
131-
repository. To use this tool with out-of-tree builds set `BUILDDIR`. For
132-
example:
130+
This script assumes a build directory named `build` as suggested by example build documentation.
131+
To use it with a different build directory, set `BUILDDIR`.
132+
For example:
133133

134134
```bash
135-
BUILDDIR=$PWD/build contrib/devtools/gen-bitcoin-conf.sh
135+
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh
136136
```
137137

138138
security-check.py

contrib/devtools/gen-bitcoin-conf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
export LC_ALL=C
77
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
8-
BUILDDIR=${BUILDDIR:-$TOPDIR}
8+
BUILDDIR=${BUILDDIR:-$TOPDIR/build}
99
BINDIR=${BINDIR:-$BUILDDIR/src}
1010
BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
1111
SHARE_EXAMPLES_DIR=${SHARE_EXAMPLES_DIR:-$TOPDIR/share/examples}

contrib/devtools/gen-manpages.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
topdir = r.stdout.rstrip()
4141

4242
# Get input and output directories.
43-
builddir = os.getenv('BUILDDIR', topdir)
43+
builddir = os.getenv('BUILDDIR', os.path.join(topdir, 'build'))
4444
mandir = os.getenv('MANDIR', os.path.join(topdir, 'doc/man'))
4545

4646
# Verify that all the required binaries are usable, and extract copyright

0 commit comments

Comments
 (0)