Fri, 05 Jan 2024 21:04:57 +0100
replace -a with && in configure
--- a/src/main/resources/make/configure.vm Fri Jan 05 21:02:37 2024 +0100 +++ b/src/main/resources/make/configure.vm Fri Jan 05 21:04:57 2024 +0100 @@ -444,10 +444,10 @@ # add general dependency flags to flags.mk echo "# general flags" >> "$TEMP_DIR/flags.mk" -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ -n "${TEMP_LDFLAGS}" ]; then @@ -578,10 +578,10 @@ fi #end -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ "$BUILD_TYPE" = "debug" ]; then
--- a/test/configure Fri Jan 05 21:02:37 2024 +0100 +++ b/test/configure Fri Jan 05 21:04:57 2024 +0100 @@ -254,25 +254,35 @@ return 0 } +print_check_msg() +{ + if [ -z "$1" ]; then + shift + printf "$@" + fi +} + dependency_error_cpp() { - printf "checking for cpp... " + print_check_msg "$dep_checked_cpp" "checking for cpp... " # dependency cpp while true do if [ -z "$lang_cpp" ] ; then break fi - echo yes + print_check_msg "$dep_checked_cpp" "yes\n" + dep_checked_cpp=1 return 1 done - echo no + print_check_msg "$dep_checked_cpp" "no\n" + dep_checked_cpp=1 return 0 } dependency_error_libpq() { - printf "checking for libpq... " + print_check_msg "$dep_checked_libpq" "checking for libpq... " # dependency libpq while true do @@ -285,16 +295,18 @@ else break fi - echo yes + print_check_msg "$dep_checked_libpq" "yes\n" + dep_checked_libpq=1 return 1 done - echo no + print_check_msg "$dep_checked_libpq" "no\n" + dep_checked_libpq=1 return 0 } dependency_error_openssl() { - printf "checking for openssl... " + print_check_msg "$dep_checked_openssl" "checking for openssl... " # dependency openssl while true do @@ -310,7 +322,8 @@ else break fi - echo yes + print_check_msg "$dep_checked_openssl" "yes\n" + dep_checked_openssl=1 return 1 done @@ -321,16 +334,18 @@ break fi TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" - echo yes + print_check_msg "$dep_checked_openssl" "yes\n" + dep_checked_openssl=1 return 1 done - echo no + print_check_msg "$dep_checked_openssl" "no\n" + dep_checked_openssl=1 return 0 } dependency_error_libxml2() { - printf "checking for libxml2... " + print_check_msg "$dep_checked_libxml2" "checking for libxml2... " # dependency libxml2 platform="macos" while true do @@ -347,7 +362,8 @@ else break fi - echo yes + print_check_msg "$dep_checked_libxml2" "yes\n" + dep_checked_libxml2=1 return 1 done @@ -363,17 +379,16 @@ else break fi - echo yes + print_check_msg "$dep_checked_libxml2" "yes\n" + dep_checked_libxml2=1 return 1 done - echo no + print_check_msg "$dep_checked_libxml2" "no\n" + dep_checked_libxml2=1 return 0 } - - - # start collecting dependency information echo > "$TEMP_DIR/flags.mk" @@ -399,10 +414,10 @@ # add general dependency flags to flags.mk echo "# general flags" >> "$TEMP_DIR/flags.mk" -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ -n "${TEMP_LDFLAGS}" ]; then @@ -461,10 +476,10 @@ fi -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ "$BUILD_TYPE" = "debug" ]; then
--- a/test/make/configure.vm Fri Jan 05 21:02:37 2024 +0100 +++ b/test/make/configure.vm Fri Jan 05 21:04:57 2024 +0100 @@ -444,10 +444,10 @@ # add general dependency flags to flags.mk echo "# general flags" >> "$TEMP_DIR/flags.mk" -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ -n "${TEMP_LDFLAGS}" ]; then @@ -578,10 +578,10 @@ fi #end -if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then +if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then +if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ "$BUILD_TYPE" = "debug" ]; then