# HG changeset patch # User Olaf Wintermann # Date 1565725750 -7200 # Node ID 215b495636798cbdcfc54b582a7c24fdd4fa1b8b # Parent 135c0599f8839db067ed30a79f6416cf9d993136 more configure template fixes diff -r 135c0599f883 -r 215b49563679 test/configure --- a/test/configure Tue Aug 13 21:37:01 2019 +0200 +++ b/test/configure Tue Aug 13 21:49:10 2019 +0200 @@ -186,6 +186,16 @@ done return 1 } +isnotplatform() +{ + for p in $PLATFORM + do + if [ $p = $1 ]; then + return 1 + fi + done + return 0 +} # generate config.mk and config.h cat > $TEMP_DIR/config.mk << __EOF__ @@ -252,8 +262,8 @@ if ! $PKG_CONFIG libpq ; then break fi - CFLAGS+=" `$PKG_CONFIG --cflags libpq`" - LDFLAGS+=" `$PKG_CONFIG --libs libpq`" + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags libpq`" + LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs libpq`" echo yes return 0 done @@ -273,8 +283,8 @@ if ! $PKG_CONFIG openssl ; then break fi - CFLAGS+=" `$PKG_CONFIG --cflags openssl`" - LDFLAGS+=" `$PKG_CONFIG --libs openssl`" + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags openssl`" + LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs openssl`" echo yes return 0 done @@ -294,8 +304,8 @@ if ! $PKG_CONFIG libxml-2.0 ; then break fi - CFLAGS+=" `$PKG_CONFIG --cflags libxml-2.0`" - LDFLAGS+=" `$PKG_CONFIG --libs libxml-2.0`" + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags libxml-2.0`" + LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs libxml-2.0`" echo yes return 0 done @@ -351,12 +361,12 @@ dependency_libxml2 if [ $? -ne 0 ]; then - DEPENDENCIES_FAILED+="libxml2 " + DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " ERROR=1 fi dependency_openssl if [ $? -ne 0 ]; then - DEPENDENCIES_FAILED+="openssl " + DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " ERROR=1 fi diff -r 135c0599f883 -r 215b49563679 test/make/configure.vm --- a/test/make/configure.vm Tue Aug 13 21:37:01 2019 +0200 +++ b/test/make/configure.vm Tue Aug 13 21:49:10 2019 +0200 @@ -244,6 +244,16 @@ done return 1 } +isnotplatform() +{ + for p in $PLATFORM + do + if [ $p = $1 ]; then + return 1 + fi + done + return 0 +} # generate config.mk and config.h cat > $TEMP_DIR/config.mk << __EOF__ @@ -334,7 +344,7 @@ while true do #if( $sub.platform ) - if ! isplatform "${sub.platform}"; then + if isnotplatform "${sub.platform}"; then break fi #end @@ -352,19 +362,19 @@ if ! $PKG_CONFIG $pkg.getPkgConfigParam() ; then break fi - CFLAGS+=" `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" - LDFLAGS+=" `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" + LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" #end #foreach( $flags in $sub.flags ) #if( $flags.exec ) $flags.value > /dev/null if [ $? -eq 0 ]; then - $flags.varName+=" `$flags.value`" + $flags.varName="$flags.varName `$flags.value`" else break fi #else - $flags.varName+="$flags.value" + $flags.varName="$flags.varName $flags.value" #end #end #foreach( $test in $sub.tests ) @@ -399,7 +409,7 @@ while true do #if( $dependency.platform ) - if ! isplatform "${dependency.platform}"; then + if isnotplatform "${dependency.platform}"; then break fi #end @@ -424,21 +434,21 @@ break fi echo yes - CFLAGS+=" `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" - LDFLAGS+=" `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" + LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" #end #foreach( $flags in $dependency.flags ) #if( $flags.exec ) $flags.value > /dev/null if [ $? -ne 0 ]; then - $flags.varName+=" `$flags.value`" + $flags.varName="$flags.varName `$flags.value`" else ERROR=1 break fi #else - $flags.varName+="$flags.value" + $flags.varName="$flags.varName $flags.value" #end #end #if ( $dependency.make.length() > 0 ) @@ -485,7 +495,7 @@ return 1 fi #foreach( $def in $val.defines ) - CFLAGS+=" ${def.toFlags()}" + CFLAGS="$CFLAGS ${def.toFlags()}" #end #if( $val.hasMake() ) cat >> $TEMP_DIR/make.mk << __EOF__ @@ -517,7 +527,7 @@ #foreach( $dependency in $target.dependencies ) dependency_$dependency if [ $? -ne 0 ]; then - DEPENDENCIES_FAILED+="${dependency} " + DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} " ERROR=1 fi #end