Skip to content

Commit 86bb51c

Browse files
oech3oech3
authored andcommitted
build-gnu.sh: Use multicall to reduce build time (no selinux)
1 parent 58ebeaf commit 86bb51c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

util/build-gnu.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,19 @@ else
104104
fi
105105
cd -
106106

107+
[ "${SELINUX_ENABLED}" != 1 ] && export MULTICALL=y # Reduce time to build
107108
# Pass the feature flags to make, which will pass them to cargo
108109
"${MAKE}" PROFILE="${UU_MAKE_PROFILE}" CARGOFLAGS="${CARGO_FEATURE_FLAGS}"
109110
# min test for SELinux
110111
[ "${SELINUX_ENABLED}" = 1 ] && touch g && "${UU_MAKE_PROFILE}"/stat -c%C g && rm g
111-
112+
[ "${MULTICALL}" = y ] && (cd "${UU_BUILD_DIR}" && for b in $(./coreutils --list); do cp -vf coreutils "$b"; done)
112113
cp "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target
113114
# Create *sum binaries
114115
for sum in b2sum b3sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum; do
115116
sum_path="${UU_BUILD_DIR}/${sum}"
116-
test -f "${sum_path}" || (cd ${UU_BUILD_DIR} && ln -s "hashsum" "${sum}")
117+
test -f "${sum_path}" || (cd ${UU_BUILD_DIR} && ln -sf "hashsum" "${sum}")
117118
done
118-
test -f "${UU_BUILD_DIR}/[" || (cd ${UU_BUILD_DIR} && ln -s "test" "[")
119+
test -f "${UU_BUILD_DIR}/[" || (cd ${UU_BUILD_DIR} && ln -sf "test" "[")
119120

120121
##
121122

0 commit comments

Comments
 (0)