@@ -120,21 +120,24 @@ done
120120
121121if test -f gnu-built; then
122122 echo " GNU build already found. Skip"
123- echo " 'rm -f $( pwd) /gnu-built' to force the build"
123+ echo " 'rm -f $( pwd) /{ gnu-built,src/getlimits} ' to force the build"
124124 echo " Note: the customization of the tests will still happen"
125125else
126126 # Disable useless checks
127127 " ${SED} " -i ' s|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
128128 # Use CFLAGS for best build time since we discard GNU coreutils
129- CFLAGS=" ${CFLAGS} -pipe -O0 -s" ./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
129+ CFLAGS=" ${CFLAGS} -pipe -O0 -s" ./configure -C - -quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
130130 --enable-single-binary=symlinks \
131131 " $( [ " ${SELINUX_ENABLED} " = 1 ] && echo --with-selinux || echo --without-selinux) "
132132 # Add timeout to to protect against hangs
133133 " ${SED} " -i ' s|^"\$@|' " ${SYSTEM_TIMEOUT} " ' 600 "\$@|' build-aux/test-driver
134134 # Use a better diff
135135 " ${SED} " -i ' s|diff -c|diff -u|g' tests/Coreutils.pm
136+
137+ # Skip make if possible
136138 # Use our nproc for *BSD and macOS
137- " ${MAKE} " -j " $( " ${UU_BUILD_DIR} /nproc" ) "
139+ test -f src/getlimits || " ${MAKE} " -j " $( " ${UU_BUILD_DIR} /nproc" ) "
140+ cp -f src/getlimits " ${UU_BUILD_DIR} "
138141
139142 # Handle generated factor tests
140143 t_first=00
@@ -219,8 +222,6 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
219222 -e " s|strace -e inotify_add_watch|strace -f -e inotify_add_watch|" \
220223 tests/tail/inotify-dir-recreate.sh
221224
222- test -f " ${UU_BUILD_DIR} /getlimits" || cp src/getlimits " ${UU_BUILD_DIR} "
223-
224225# pr produces very long log and this command isn't super interesting
225226# SKIP for now
226227" ${SED} " -i -e " s|my \$ prog = 'pr';$|my \$ prog = 'pr';CuSkip::skip \"\$ prog: SKIP for producing too long logs\" ;|" tests/pr/pr-tests.pl
0 commit comments