diff --git a/util/build-gnu.sh b/util/build-gnu.sh index f3596c411ea..f7a6a983c28 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -130,6 +130,10 @@ for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs); do } done +# Always update the PATH to test the uutils coreutils instead of the GNU coreutils +# This ensures the correct path is used even if the repository was moved or rebuilt in a different location +sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" tests/local.mk + if test -f gnu-built; then echo "GNU build already found. Skip" echo "'rm -f $(pwd)/gnu-built' to force the build" @@ -137,8 +141,6 @@ if test -f gnu-built; then else # Disable useless checks sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk - # Change the PATH to test the uutils coreutils instead of the GNU coreutils - sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" tests/local.mk ./bootstrap --skip-po ./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \ "$([ "${SELINUX_ENABLED}" = 1 ] && echo --with-selinux || echo --without-selinux)"