1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #7136 from sylvestre/gnu-build

Improve gnu build script
This commit is contained in:
Daniel Hofstetter 2025-01-15 10:10:56 +01:00 committed by GitHub
commit 3812cbce8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
# `build-gnu.bash` ~ builds GNU coreutils (from supplied sources)
#
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW baddecode submodules xstrtol ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW baddecode submodules xstrtol ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink texinfo
set -e
@ -122,6 +122,8 @@ if test -f gnu-built; then
echo "'rm -f $(pwd)/gnu-built' to force the build"
echo "Note: the customization of the tests will still happen"
else
# Disable useless checks
sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
./bootstrap --skip-po
./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references
#Add timeout to to protect against hangs
@ -132,8 +134,6 @@ else
# Use a better diff
sed -i 's|diff -c|diff -u|g' tests/Coreutils.pm
"${MAKE}" -j "$("${NPROC}")"
touch gnu-built
fi
# Handle generated factor tests
t_first=00
@ -170,13 +170,15 @@ for i in ${seq}; do
sed -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
done
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
# Remove tests checking for --version & --help
# Not really interesting for us and logs are too big
sed -i -e '/tests\/help\/help-version.sh/ D' \
-e '/tests\/help\/help-version-getopt.sh/ D' \
Makefile
touch gnu-built
fi
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
# printf doesn't limit the values used in its arg, so this produced ~2GB of output
sed -i '/INT_OFLOW/ D' tests/printf/printf.sh