Fri, 06 Oct 2023 20:22:19 +0200
fix missing error reporting when all option defaults fail - fixes #299
--- a/src/test/resources/golden-sample/configure Fri Oct 06 19:44:05 2023 +0200 +++ b/src/test/resources/golden-sample/configure Fri Oct 06 20:22:19 2023 +0200 @@ -387,7 +387,7 @@ # echo >> "$TEMP_DIR/flags.mk" -# Target +echo "configuring global target" echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" TEMP_CFLAGS= TEMP_CXXFLAGS=
--- a/src/test/resources/golden-sample/configure2 Fri Oct 06 19:44:05 2023 +0200 +++ b/src/test/resources/golden-sample/configure2 Fri Oct 06 20:22:19 2023 +0200 @@ -536,7 +536,7 @@ # echo >> "$TEMP_DIR/flags.mk" -# Target: dav +echo "configuring target: dav" echo "# flags for target dav" >> "$TEMP_DIR/flags.mk" TEMP_CFLAGS= TEMP_CXXFLAGS= @@ -588,7 +588,8 @@ fi # Option: --toolkit -if [ -z $OPT_TOOLKIT ]; then +if [ -z "$OPT_TOOLKIT" ]; then + echo "auto-detecting option 'toolkit'" SAVED_ERROR="$ERROR" SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" ERROR=1 @@ -615,10 +616,12 @@ done if [ $ERROR -ne 0 ]; then SAVED_ERROR=1 + SAVED_DEPENDENCIES_FAILED="option 'toolkit' $SAVED_DEPENDENCIES_FAILED" fi ERROR="$SAVED_ERROR" DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" else + echo "checking option toolkit = $OPT_TOOLKIT" if false; then false elif [ "$OPT_TOOLKIT" = "gtk3" ]; then @@ -627,6 +630,7 @@ : else ERROR=1 + DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" fi elif [ "$OPT_TOOLKIT" = "cli" ]; then echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options @@ -634,6 +638,7 @@ : else ERROR=1 + DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" fi elif [ "$OPT_TOOLKIT" = "gtk2" ]; then echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options @@ -641,6 +646,7 @@ : else ERROR=1 + DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" fi elif [ "$OPT_TOOLKIT" = "wpf" ]; then echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options @@ -648,6 +654,7 @@ : else ERROR=1 + DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" fi fi fi @@ -679,7 +686,7 @@ fi echo >> "$TEMP_DIR/flags.mk" -# Target +echo "configuring global target" echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" TEMP_CFLAGS= TEMP_CXXFLAGS=
--- a/test/configure Fri Oct 06 19:44:05 2023 +0200 +++ b/test/configure Fri Oct 06 20:22:19 2023 +0200 @@ -387,7 +387,7 @@ # echo >> "$TEMP_DIR/flags.mk" -# Target +echo "configuring global target" echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" TEMP_CFLAGS= TEMP_CXXFLAGS=
--- a/test/make/configure.vm Fri Oct 06 19:44:05 2023 +0200 +++ b/test/make/configure.vm Fri Oct 06 20:22:19 2023 +0200 @@ -452,10 +452,10 @@ #foreach( $target in $targets ) echo >> "$TEMP_DIR/flags.mk" #if ( $target.name ) -# Target: $target.name +echo "configuring target: $target.name" echo "# flags for target $target.name" >> "$TEMP_DIR/flags.mk" #else -# Target +echo "configuring global target" echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" #end TEMP_CFLAGS= @@ -492,7 +492,8 @@ #foreach( $opt in $target.options ) # Option: --${opt.argument} -if [ -z ${D}${opt.varName} ]; then +if [ -z "${D}${opt.varName}" ]; then + echo "auto-detecting option '${opt.argument}'" SAVED_ERROR="$ERROR" SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" ERROR=1 @@ -515,10 +516,12 @@ done if [ $ERROR -ne 0 ]; then SAVED_ERROR=1 + SAVED_DEPENDENCIES_FAILED="option '${opt.argument}' $SAVED_DEPENDENCIES_FAILED" fi ERROR="$SAVED_ERROR" DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" else + echo "checking option ${opt.argument} = ${D}${opt.varName}" if false; then false #foreach( $optval in $opt.values ) @@ -528,6 +531,7 @@ : else ERROR=1 + DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED" fi #end fi