Skip to content

Commit 86bc17e

Browse files
sylvestreChrisDryden
authored andcommitted
build-gnu.sh: adjust the PATH for each run
Interesting with several uutils/coreutils clones
1 parent 9f28bf0 commit 86bc17e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

util/build-gnu.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,17 @@ for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs); do
130130
}
131131
done
132132

133+
# Always update the PATH to test the uutils coreutils instead of the GNU coreutils
134+
# This ensures the correct path is used even if the repository was moved or rebuilt in a different location
135+
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" tests/local.mk
136+
133137
if test -f gnu-built; then
134138
echo "GNU build already found. Skip"
135139
echo "'rm -f $(pwd)/gnu-built' to force the build"
136140
echo "Note: the customization of the tests will still happen"
137141
else
138142
# Disable useless checks
139143
sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
140-
# Change the PATH to test the uutils coreutils instead of the GNU coreutils
141-
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" tests/local.mk
142144
./bootstrap --skip-po
143145
./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
144146
"$([ "${SELINUX_ENABLED}" = 1 ] && echo --with-selinux || echo --without-selinux)"

0 commit comments

Comments
 (0)