diff -r 5f9e07d3dd6c -r b0c4750cecd8 make/configure.vm --- a/make/configure.vm Wed Jan 17 21:01:50 2024 +0100 +++ b/make/configure.vm Sat Jan 20 16:02:04 2024 +0100 @@ -93,11 +93,7 @@ #if( $features.size() > 0 ) Optional Features: #foreach( $feature in $features ) -#if( $feature.auto ) - --disable-${feature.arg} -#else - --enable-${feature.arg} -#end +${feature.helpText} #end #end @@ -190,17 +186,17 @@ printf "detect platform... " if [ "$OS" = "SunOS" ]; then PLATFORM="solaris sunos unix svr4" -fi -if [ "$OS" = "Linux" ]; then +elif [ "$OS" = "Linux" ]; then PLATFORM="linux unix" -fi -if [ "$OS" = "FreeBSD" ]; then +elif [ "$OS" = "FreeBSD" ]; then PLATFORM="freebsd bsd unix" -fi -if [ "$OS" = "Darwin" ]; then +elif [ "$OS" = "OpenBSD" ]; then + PLATFORM="openbsd bsd unix" +elif [ "$OS" = "NetBSD" ]; then + PLATFORM="netbsd bsd unix" +elif [ "$OS" = "Darwin" ]; then PLATFORM="macos osx bsd unix" -fi -if echo "$OS" | grep -i "MINGW" > /dev/null; then +elif echo "$OS" | grep -i "MINGW" > /dev/null; then PLATFORM="windows mingw" fi : ${PLATFORM:="unix"} @@ -228,6 +224,26 @@ done return 0 } +istoolchain() +{ + for t in $TOOLCHAIN + do + if [ "$t" = "$1" ]; then + return 0 + fi + done + return 1 +} +notistoolchain() +{ + for t in $TOOLCHAIN + do + if [ "$t" = "$1" ]; then + return 1 + fi + done + return 0 +} ]]# ## End of unparsed content ** @@ -307,8 +323,13 @@ break fi #end + #if( $sub.toolchain ) + if notistoolchain "${sub.toolchain}"; then + break + fi + #end #foreach( $np in $sub.notList ) - if isplatform "${np}"; then + if isplatform "${np}" || istoolchain "${np}"; then break fi #end @@ -384,8 +405,13 @@ break fi #end + #if( $dependency.toolchain ) + if notistoolchain "${dependency.toolchain}"; then + break + fi + #end #foreach( $np in $dependency.notList ) - if isplatform "${np}"; then + if isplatform "${np}" || istoolchain "${np}"; then break fi #end @@ -444,10 +470,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 +604,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 @@ -645,6 +671,3 @@ write_toolchain_defaults "$TEMP_DIR/toolchain.mk" cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk rm -Rf "$TEMP_DIR" - - -