Skip to content

Commit 3812cbc

Browse files
authored
Merge pull request #7136 from sylvestre/gnu-build
Improve gnu build script
2 parents 7673969 + 09ee3dc commit 3812cbc

File tree

1 file changed

+44
-42
lines changed

1 file changed

+44
-42
lines changed

util/build-gnu.sh

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# `build-gnu.bash` ~ builds GNU coreutils (from supplied sources)
33
#
44

5-
# 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
5+
# 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
66

77
set -e
88

@@ -122,6 +122,8 @@ if test -f gnu-built; then
122122
echo "'rm -f $(pwd)/gnu-built' to force the build"
123123
echo "Note: the customization of the tests will still happen"
124124
else
125+
# Disable useless checks
126+
sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
125127
./bootstrap --skip-po
126128
./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references
127129
#Add timeout to to protect against hangs
@@ -132,51 +134,51 @@ else
132134
# Use a better diff
133135
sed -i 's|diff -c|diff -u|g' tests/Coreutils.pm
134136
"${MAKE}" -j "$("${NPROC}")"
135-
touch gnu-built
136-
fi
137137

138-
# Handle generated factor tests
139-
t_first=00
140-
t_max=36
141-
# t_max_release=20
142-
# if test "${UU_MAKE_PROFILE}" != "debug"; then
143-
# # Generate the factor tests, so they can be fixed
144-
# # * reduced to 20 to decrease log size (down from 36 expected by GNU)
145-
# # * only for 'release', skipped for 'debug' as redundant and too time consuming (causing timeout errors)
146-
# seq=$(
147-
# i=${t_first}
148-
# while test "${i}" -le "${t_max_release}"; do
149-
# printf '%02d ' $i
150-
# i=$((i + 1))
151-
# done
152-
# )
153-
# for i in ${seq}; do
154-
# "${MAKE}" "tests/factor/t${i}.sh"
155-
# done
156-
# cat
157-
# sed -i -e 's|^seq |/usr/bin/seq |' -e 's|sha1sum |/usr/bin/sha1sum |' tests/factor/t*.sh
158-
# t_first=$((t_max_release + 1))
159-
# fi
160-
# strip all (debug) or just the longer (release) factor tests from Makefile
161-
seq=$(
162-
i=${t_first}
163-
while test "${i}" -le "${t_max}"; do
164-
printf '%02d ' ${i}
165-
i=$((i + 1))
138+
# Handle generated factor tests
139+
t_first=00
140+
t_max=36
141+
# t_max_release=20
142+
# if test "${UU_MAKE_PROFILE}" != "debug"; then
143+
# # Generate the factor tests, so they can be fixed
144+
# # * reduced to 20 to decrease log size (down from 36 expected by GNU)
145+
# # * only for 'release', skipped for 'debug' as redundant and too time consuming (causing timeout errors)
146+
# seq=$(
147+
# i=${t_first}
148+
# while test "${i}" -le "${t_max_release}"; do
149+
# printf '%02d ' $i
150+
# i=$((i + 1))
151+
# done
152+
# )
153+
# for i in ${seq}; do
154+
# "${MAKE}" "tests/factor/t${i}.sh"
155+
# done
156+
# cat
157+
# sed -i -e 's|^seq |/usr/bin/seq |' -e 's|sha1sum |/usr/bin/sha1sum |' tests/factor/t*.sh
158+
# t_first=$((t_max_release + 1))
159+
# fi
160+
# strip all (debug) or just the longer (release) factor tests from Makefile
161+
seq=$(
162+
i=${t_first}
163+
while test "${i}" -le "${t_max}"; do
164+
printf '%02d ' ${i}
165+
i=$((i + 1))
166+
done
167+
)
168+
for i in ${seq}; do
169+
echo "strip t${i}.sh from Makefile"
170+
sed -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
166171
done
167-
)
168-
for i in ${seq}; do
169-
echo "strip t${i}.sh from Makefile"
170-
sed -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
171-
done
172172

173-
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
173+
# Remove tests checking for --version & --help
174+
# Not really interesting for us and logs are too big
175+
sed -i -e '/tests\/help\/help-version.sh/ D' \
176+
-e '/tests\/help\/help-version-getopt.sh/ D' \
177+
Makefile
178+
touch gnu-built
179+
fi
174180

175-
# Remove tests checking for --version & --help
176-
# Not really interesting for us and logs are too big
177-
sed -i -e '/tests\/help\/help-version.sh/ D' \
178-
-e '/tests\/help\/help-version-getopt.sh/ D' \
179-
Makefile
181+
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
180182

181183
# printf doesn't limit the values used in its arg, so this produced ~2GB of output
182184
sed -i '/INT_OFLOW/ D' tests/printf/printf.sh

0 commit comments

Comments
 (0)