Skip to content

Commit 63a8791

Browse files
committed
contrib: fix BUILDDIR in gen-bitcoin-conf script and gen-manpages.py
the cmake build steps suggest a build/ directory, which breaks these scripts. Additionally, in-tree builds are no longer allowed, so it makes sense to update the code and the README accordingly.
1 parent 0a931a9 commit 63a8791

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
@@ -82,12 +82,12 @@ gen-manpages.py
8282
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
8383
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
8484

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

8989
```bash
90-
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
90+
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-manpages.py
9191
```
9292

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

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

114114
```bash
115-
BUILDDIR=$PWD/build contrib/devtools/gen-bitcoin-conf.sh
115+
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh
116116
```
117117

118118
security-check.py and test-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)