Sun, 07 Jun 2020 14:42:06 +0200
implement optional (feature) dependencies
test/config.mk | file | annotate | diff | comparison | revisions | |
test/configure | file | annotate | diff | comparison | revisions | |
test/make/configure.vm | file | annotate | diff | comparison | revisions |
--- a/test/config.mk Tue Aug 13 22:15:36 2019 +0200 +++ b/test/config.mk Sun Jun 07 14:42:06 2020 +0200 @@ -29,6 +29,6 @@ -CFLAGS += -I/usr/include/libxml2 -LDFLAGS += -lxml2 -lssl -lcrypto +CFLAGS += -I/usr/include/libxml2 +LDFLAGS += -lxml2 -lssl -lcrypto -lpq
--- a/test/configure Tue Aug 13 22:15:36 2019 +0200 +++ b/test/configure Sun Jun 07 14:42:06 2020 +0200 @@ -373,6 +373,19 @@ ERROR=1 fi +# Features +if [ ! -z "$FEATURE_PG" ]; then + # check dependency + dependency_libpq + if [ $? -ne 0 ]; then + # "auto" features can fail and are just disabled in this case + if [ $FEATURE_PG != "auto" ]; then + DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " + ERROR=1 + fi + fi +fi + echo >> $TEMP_DIR/config.mk if [ ! -z "${CFLAGS}" ]; then
--- a/test/make/configure.vm Tue Aug 13 22:15:36 2019 +0200 +++ b/test/make/configure.vm Sun Jun 07 14:42:06 2020 +0200 @@ -534,6 +534,23 @@ fi #end +# Features +#foreach( $feature in $target.features ) +if [ ! -z "$${feature.getVarName()}" ]; then +#foreach( $dependency in $feature.dependencies ) + # check dependency + dependency_$dependency + if [ $? -ne 0 ]; then + # "auto" features can fail and are just disabled in this case + if [ $${feature.getVarName()} != "auto" ]; then + DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} " + ERROR=1 + fi + fi +#end +fi +#end + #foreach( $opt in $target.options ) # Option: --${opt.argument} if [ -z ${D}${opt.getVarName()} ]; then