mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
Merge #20359: depends: Various config.site.in improvements and linting
46756a6987
depends: Fix PYTHONPATH setting in config.site.in (Carl Dong)618cbd2c1a
lint: Also lint files with shellcheck directive (Carl Dong)6c7e8f067d
depends: Allow relative CONFIG_SITE path env var (Carl Dong) Pull request description: This changeset: 1. Allows the `CONFIG_SITE` env var to be a relative path rather than requiring an absolute one 2. Enables linting of the `config.site.in` file with `shellcheck` in our linting scripts 3. Sets the `PYTHONPATH` var sensibly in `config.site.in` Please see commit messages for more details ACKs for top commit: laanwj: ACK46756a6987
Tree-SHA512: 744089b9f6e5604e56466d9a3e64563f9183a70f7e300ac9ae6248f0f17c0b53fe28a2c41d43c5ffe5da825f53c2ca21f21aacba0579442da3056fb0c4b81454
This commit is contained in:
commit
888c22e0dd
2 changed files with 15 additions and 4 deletions
|
@ -1,4 +1,14 @@
|
||||||
depends_prefix="`dirname ${ac_site_file}`/.."
|
# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
|
||||||
|
# ./configure but shellcheck doesn't know
|
||||||
|
# that, hence: disable=SC2034
|
||||||
|
|
||||||
|
true # Dummy command because shellcheck treats all directives before first
|
||||||
|
# command as file-wide, and we only want to disable for one line.
|
||||||
|
#
|
||||||
|
# See: https://github.com/koalaman/shellcheck/wiki/Directive
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"
|
||||||
|
|
||||||
cross_compiling=maybe
|
cross_compiling=maybe
|
||||||
host_alias=@HOST@
|
host_alias=@HOST@
|
||||||
|
@ -50,7 +60,7 @@ if test x@host_os@ = xdarwin; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH=$depends_prefix/native/bin:$PATH
|
PATH=$depends_prefix/native/bin:$PATH
|
||||||
PKG_CONFIG="`which pkg-config` --static"
|
PKG_CONFIG="$(which pkg-config) --static"
|
||||||
|
|
||||||
# These two need to remain exported because pkg-config does not see them
|
# These two need to remain exported because pkg-config does not see them
|
||||||
# otherwise. That means they must be unexported at the end of configure.ac to
|
# otherwise. That means they must be unexported at the end of configure.ac to
|
||||||
|
@ -69,7 +79,7 @@ fi
|
||||||
if test -n "@CXX@" -a -z "${CXX}"; then
|
if test -n "@CXX@" -a -z "${CXX}"; then
|
||||||
CXX="@CXX@"
|
CXX="@CXX@"
|
||||||
fi
|
fi
|
||||||
PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH
|
PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}"
|
||||||
|
|
||||||
if test -n "@AR@"; then
|
if test -n "@AR@"; then
|
||||||
AR=@AR@
|
AR=@AR@
|
||||||
|
|
|
@ -36,7 +36,8 @@ fi
|
||||||
|
|
||||||
SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced)
|
SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced)
|
||||||
EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
|
EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
|
||||||
if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
|
SOURCED_FILES=$(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') # Check shellcheck directive used for sourced files
|
||||||
|
if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
|
||||||
EXIT_CODE=1
|
EXIT_CODE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue