diff --git a/util/build-gnu.sh b/util/build-gnu.sh index d693466c718..d16dd75ad29 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -164,6 +164,11 @@ fi # automake or config.status and undo our edits. touch Makefile.in Makefile +# Patch the Makefile PATH to point to uutils build dir instead of GNU src/ +sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile +# Prevent make check from rebuilding the GNU binaries over the uutils ones +sed -i 's/^check-am: all-am/check-am:/' Makefile + grep -rl 'path_prepend_' tests/* | xargs -r "${SED}" -i 's| path_prepend_ ./src||' # path_prepend_ sets $abs_path_dir_: set it manually instead. grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r "${SED}" -i "s|\$abs_path_dir_|${UU_BUILD_DIR//\//\\/}|g"