@@ -14,23 +14,17 @@ NPROC=$(command -v gnproc||command -v nproc)
1414READLINK=$( command -v greadlink|| command -v readlink)
1515SED=$( command -v gsed|| command -v sed)
1616
17+ SYSTEM_TIMEOUT=$( command -v timeout)
18+ SYSTEM_YES=$( command -v yes)
19+
1720ME=" ${0} "
1821ME_dir=" $( dirname -- " $( " ${READLINK} " -fm -- " ${ME} " ) " ) "
1922REPO_main_dir=" $( dirname -- " ${ME_dir} " ) "
2023
21- # Default profile is 'debug'
22- UU_MAKE_PROFILE=' debug'
23- CARGO_FEATURE_FLAGS=" "
2424
25- for arg in " $@ "
26- do
27- if [ " $arg " == " --release-build" ]; then
28- UU_MAKE_PROFILE=' release'
29- break
30- fi
31- done
32-
33- echo " UU_MAKE_PROFILE='${UU_MAKE_PROFILE} '"
25+ : ${PROFILE:= debug} # default profile
26+ export PROFILE
27+ CARGO_FEATURE_FLAGS=" "
3428
3529# ## * config (from environment with fallback defaults); note: GNU is expected to be a sibling repo directory
3630
@@ -39,11 +33,6 @@ path_GNU="$("${READLINK}" -fm -- "${path_GNU:-${path_UUTILS}/../gnu}")"
3933
4034# ##
4135
42- SYSTEM_TIMEOUT=$( command -v timeout)
43- SYSTEM_YES=$( command -v yes)
44-
45- # ##
46-
4736release_tag_GNU=" v9.9"
4837
4938# check if the GNU coreutils has been cloned, if not print instructions
@@ -71,9 +60,9 @@ echo "path_GNU='${path_GNU}'"
7160# ##
7261
7362if [[ ! -z " $CARGO_TARGET_DIR " ]]; then
74- UU_BUILD_DIR=" ${CARGO_TARGET_DIR} /${UU_MAKE_PROFILE } "
63+ UU_BUILD_DIR=" ${CARGO_TARGET_DIR} /${PROFILE } "
7564else
76- UU_BUILD_DIR=" ${path_UUTILS} /target/${UU_MAKE_PROFILE } "
65+ UU_BUILD_DIR=" ${path_UUTILS} /target/${PROFILE } "
7766fi
7867echo " UU_BUILD_DIR='${UU_BUILD_DIR} '"
7968
10594cd -
10695
10796# Pass the feature flags to make, which will pass them to cargo
108- " ${MAKE} " PROFILE=" ${UU_MAKE_PROFILE } " CARGOFLAGS=" ${CARGO_FEATURE_FLAGS} "
97+ " ${MAKE} " PROFILE=" ${PROFILE } " CARGOFLAGS=" ${CARGO_FEATURE_FLAGS} "
10998# min test for SELinux
110- [ " ${SELINUX_ENABLED} " = 1 ] && touch g && " ${UU_MAKE_PROFILE } " /stat -c%C g && rm g
99+ [ " ${SELINUX_ENABLED} " = 1 ] && touch g && " ${PROFILE } " /stat -c%C g && rm g
111100
112101cp " ${UU_BUILD_DIR} /install" " ${UU_BUILD_DIR} /ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target
113102# Create *sum binaries
134123 sed -i ' s|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
135124 ./bootstrap --skip-po
136125 ./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
126+ --enable-install-program=" arch" \
137127 " $( [ " ${SELINUX_ENABLED} " = 1 ] && echo --with-selinux || echo --without-selinux) "
138128 # Add timeout to to protect against hangs
139129 sed -i ' s|^"\$@|' " ${SYSTEM_TIMEOUT} " ' 600 "\$@|' build-aux/test-driver
@@ -239,9 +229,6 @@ sed -i "s/\$prog: invalid input/\$prog: error: invalid input/g" tests/basenc/bas
239229sed -i " s/ {ERR=>\"\$ prog: foobar\\\\ n\" \. \$ try_help }/ {ERR=>\" error: unexpected argument '--foobar' found\n\n tip: to pass '--foobar' as a value, use '-- --foobar'\n\nUsage: basenc [OPTION]... [FILE]\n\nFor more information, try '--help'.\n\" }]/" tests/basenc/basenc.pl
240230sed -i " s/ {ERR_SUBST=>\" s\/(unrecognized|unknown) option \[-' \]\*foobar\[' \]\*\/foobar\/\" }],//" tests/basenc/basenc.pl
241231
242- # Remove the check whether a util was built. Otherwise tests against utils like "arch" are not run.
243- sed -i " s|require_built_ |# require_built_ |g" init.cfg
244-
245232# exit early for the selinux check. The first is enough for us.
246233sed -i " s|# Independent of whether SELinux|return 0\n #|g" init.cfg
247234
0 commit comments