-BUILD_BDB2 = @BUILD_BDB2@
-
-test-bdb2: FORCE
- @-$(LN_S) $(srcdir)/data .
- @if test "$(BUILD_BDB2)" = "yes" ; then \
- echo "Initiating LDAP tests..." ; \
- $(MKDIR) test-db test-repl ; \
- $(srcdir)/scripts/all $(srcdir) bdb2 ; \
- else \
- echo "run configure with --enable-bdb2" ; \
- fi
-
-tests: test-ldbm
-test: test-ldbm
-test-ldbm: FORCE
- @-$(LN_S) $(srcdir)/data .
- @echo "Initiating LDAP tests..."; \
- $(MKDIR) test-db test-repl ; \
- $(srcdir)/scripts/all $(srcdir) ldbm
+BUILD_BDB=@BUILD_BDB@
+BUILD_HDB=@BUILD_HDB@
+BUILD_LDBM=@BUILD_LDBM@
+
+test tests:
+ @$(MAKE) bdb
+ @$(MAKE) hdb
+ @$(MAKE) ldbm
+
+bdb test-bdb: bdb-$(BUILD_BDB)
+bdb-no:
+ @echo "run configure with --enable-bdb"
+
+bdb-yes bdb-mod: FORCE
+ @echo "Initiating LDAP tests for BDB..."
+ @$(RUN) -b bdb all
+
+hdb test-hdb: hdb-$(BUILD_HDB)
+hdb-no:
+ @echo "run configure with --enable-hdb"
+
+hdb-yes hdb-mod: FORCE
+ @echo "Initiating LDAP tests for HDB..."
+ @$(RUN) -b hdb all
+
+ldbm test-ldbm: ldbm-$(BUILD_LDBM)
+ldbm-no:
+ @echo "run configure with --enable-ldbm"
+
+ldbm-yes ldbm-mod: FORCE
+ @echo "Initiating LDAP tests for LDBM..."
+ @$(RUN) -b ldbm all