Sat, 03 Aug 2019 10:22:14 +0200
add option for excluding dependencies on specific platforms
test/config.mk | file | annotate | diff | comparison | revisions | |
test/configure | file | annotate | diff | comparison | revisions | |
test/make/configure.vm | file | annotate | diff | comparison | revisions | |
test/make/project.xml | file | annotate | diff | comparison | revisions |
--- a/test/config.mk Sat Aug 03 09:45:30 2019 +0200 +++ b/test/config.mk Sat Aug 03 10:22:14 2019 +0200 @@ -10,9 +10,6 @@ DAV_CFLAGS += -I/usr/include/libxml2 -DTEST DAV_LDFLAGS += -lcurl -lxml2 -MVAR = 123 -MVAR += 123 +# Dependency: libxml2 +xml = libxml2 - - -
--- a/test/configure Sat Aug 03 09:45:30 2019 +0200 +++ b/test/configure Sat Aug 03 10:22:14 2019 +0200 @@ -238,10 +238,7 @@ if [ $? -ne 0 ]; then break fi - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -259,10 +256,7 @@ fi CFLAGS+="-I/mingw/include" LDFLAGS+="-lcurl" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -284,10 +278,7 @@ else break fi - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -302,10 +293,35 @@ fi CFLAGS+=" `pkg-config --cflags libcurl`" LDFLAGS+=" `pkg-config --libs libcurl`" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes + return 0 + done + + echo no + return 1 +} +dependency_test() +{ + printf "checking for test... " + # dependency test platform="bsd" + while true + do + if ! isplatform "bsd"; then + break + fi + if isplatform "macos"; then + break + fi + CFLAGS+="-DBSD" + echo yes + return 0 + done + + # dependency test + while true + do + CFLAGS+="-DTEST" + echo yes return 0 done @@ -326,27 +342,7 @@ fi CFLAGS+=" `pkg-config --cflags sqlite3`" LDFLAGS+=" `pkg-config --libs sqlite3`" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes - return 0 - done - - echo no - return 1 -} -dependency_test() -{ - printf "checking for test... " - # dependency test - while true - do - CFLAGS+="-DTEST" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -367,10 +363,7 @@ fi CFLAGS+=" `pkg-config --cflags gtk+-2.0`" LDFLAGS+=" `pkg-config --libs gtk+-2.0`" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -391,10 +384,7 @@ fi CFLAGS+=" `pkg-config --cflags gtk+-5.0`" LDFLAGS+=" `pkg-config --libs gtk+-5.0`" - cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make -__EOF__ - echo yes + echo yes return 0 done @@ -416,9 +406,11 @@ CFLAGS+=" `pkg-config --cflags libxml-2.0`" LDFLAGS+=" `pkg-config --libs libxml-2.0`" cat >> $TEMP_DIR/make.mk << __EOF__ -$sub.make +# Dependency: libxml2 +xml = libxml2 + __EOF__ - echo yes + echo yes return 0 done @@ -436,9 +428,6 @@ while true do - cat >> $TEMP_DIR/make.mk << __EOF__ -$dependency.make -__EOF__ break done
--- a/test/make/configure.vm Sat Aug 03 09:45:30 2019 +0200 +++ b/test/make/configure.vm Sat Aug 03 10:22:14 2019 +0200 @@ -257,6 +257,11 @@ break fi #end + #foreach( $not in $sub.getNotList() ) + if isplatform "${not}"; then + break + fi + #end #if( $sub.pkgconfig.size() > 0 ) if [ -z "PKG_CONFIG" ]; then break @@ -287,10 +292,13 @@ break fi #end + #if ( $sub.make.length() > 0 ) cat >> $TEMP_DIR/make.mk << __EOF__ +# Dependency: $dependency.name $sub.make __EOF__ - echo yes + #end + echo yes return 0 done @@ -314,6 +322,11 @@ break fi #end + #foreach( $not in $dependency.getNotList() ) + if isplatform "${not}"; then + break + fi + #end while true do #if( $dependency.pkgconfig.size() > 0 ) @@ -347,9 +360,11 @@ $flags.varName+="$flags.value" #end #end + #if ( $sub.make.length() > 0 ) cat >> $TEMP_DIR/make.mk << __EOF__ -$dependency.make +$sub.make __EOF__ + #end break done
--- a/test/make/project.xml Sat Aug 03 09:45:30 2019 +0200 +++ b/test/make/project.xml Sat Aug 03 10:22:14 2019 +0200 @@ -8,11 +8,15 @@ <cflags type="exec">curl-config --cflags</cflags> <ldflags type="exec">curl-config --ldflags</ldflags> </dependency> + <dependency name="test" platform="bsd" not="macos"> + <cflags>-DBSD</cflags> + </dependency> <dependency name="curl"> <pkgconfig>libcurl</pkgconfig> </dependency> <dependency name="libxml2"> <pkgconfig>libxml-2.0</pkgconfig> + <make>xml = libxml2</make> </dependency> <dependency name="sqlite"> <pkgconfig>sqlite3</pkgconfig>