contrib: Add support for out-of-tree builds in gen-manpages.sh
Summary:
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
Test Plan:
BUILDDIR=$PWD/build-cmake contrib/devtools/gen-manpages.sh
New manpages should be generated.
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: deadalnix, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2271