You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/28 23:04:10 UTC

svn commit: r589428 - /apr/apr-util/branches/1.2.x/test/Makefile.in

Author: wrowe
Date: Sun Oct 28 15:04:09 2007
New Revision: 589428

URL: http://svn.apache.org/viewvc?rev=589428&view=rev
Log:
Finally, toss this old cruft and pick up trunk's makefile
structure, allowing developers to jump more easily between
apr and apr-util test environments and test authoring.

Modified:
    apr/apr-util/branches/1.2.x/test/Makefile.in

Modified: apr/apr-util/branches/1.2.x/test/Makefile.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/Makefile.in?rev=589428&r1=589427&r2=589428&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/Makefile.in (original)
+++ apr/apr-util/branches/1.2.x/test/Makefile.in Sun Oct 28 15:04:09 2007
@@ -1,25 +1,62 @@
+srcdir = @srcdir@
 VPATH = @srcdir@
 
+# PROGRAMS includes all test programs built on this platform.
+# STDTEST_PORTABLE
+#   test programs invoked via standard user interface, run on all platforms
+# ALL_TESTS
+#   test modules invoked through the abts suite (./testall)
+# OTHER_PROGRAMS
+#   programs such as sockperf, that have to be invoked in a special sequence
+#   or with special parameters
+
 INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
 
-PROGRAMS = testall dbd
+STDTEST_PORTABLE = testall dbd
+
+TESTS = teststrmatch.lo testuri.lo testuuid.lo testbuckets.lo testpass.lo \
+	testmd4.lo testmd5.lo testldap.lo testdate.lo testdbm.lo testdbd.lo \
+	testxml.lo testrmm.lo testreslist.lo testqueue.lo testxlate.lo
+
+OTHER_PROGRAMS = 
+
+PROGRAMS = $(STDTEST_PORTABLE) $(OTHER_PROGRAMS)
+
 TARGETS = $(PROGRAMS)
 
-APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
-APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@
-TARGET_LIB_PATH = ../lib@APRUTIL_LIBNAME@.la
+LOCAL_LIBS = ../lib@APRUTIL_LIBNAME@@APRUTIL_MAJOR_VERSION@.la
 
 CLEAN_TARGETS = manyfile.bin testfile.txt data/sqlite*.db
 
 # bring in rules.mk for standard functionality
 @INCLUDE_RULES@
-PROGRAM_DEPENDENCIES = @APRUTIL_LIBS@
-APRUTIL_LDFLAGS = -no-install @APRUTIL_LDFLAGS@
+APRUTIL_LIBS = @APRUTIL_LIBS@
+APRUTIL_LDFLAGS = $(ALL_LDFLAGS) @LT_NO_INSTALL@ @APRUTIL_LDFLAGS@
+
+# link programs using -no-install to get real executables not
+# libtool wrapper scripts which link an executable when first run.
+LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
+	    $(APRUTIL_LDFLAGS) -o $@
 
-all: $(PROGRAMS)
+# STDTEST_PORTABLE;
 
-check: $(PROGRAMS)
-	for prog in $(PROGRAMS); do \
+abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+	 $(srcdir)/testutil.h
+
+testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+	     $(srcdir)/testutil.h
+
+testall: $(TESTS) abts.lo testutil.lo $(LOCAL_LIBS)
+	$(LINK_PROG) $+ $(APRUTIL_LIBS)
+# For VPATH builds; where we have no ./data, copy us some data
+# if we wait until 'make check', then 'make; ./testall' fails;
+	if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
+
+dbd: dbd.lo $(LOCAL_LIBS)
+	$(LINK_PROG) $+ $(APRUTIL_LIBS)
+
+check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
+	for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
 	        if test "$$prog" = 'dbd'; then \
 			for driver in sqlite2 sqlite3; do \
 				./$$prog $$driver; \
@@ -37,21 +74,4 @@
 		fi; \
 	done
 
-testdbm_OBJECTS = testdbm.lo
-testdbm_LDADD =  $(TARGET_LIB_PATH)
-testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD)
-	$(LINK) $(APRUTIL_LDFLAGS) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES)
-
-dbd_OBJECTS = dbd.lo
-dbd_LDADD =  $(TARGET_LIB_PATH)
-dbd: $(dbd_OBJECTS) $(dbd_LDADD)
-	$(LINK) $(APRUTIL_LDFLAGS) $(dbd_OBJECTS) $(dbd_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testall_OBJECTS = teststrmatch.lo testuri.lo testuuid.lo abts.lo testutil.lo \
-	testbuckets.lo testpass.lo testmd4.lo testmd5.lo testldap.lo testdbd.lo \
-	testdbm.lo testdate.lo testxml.lo testrmm.lo testreslist.lo testqueue.lo \
-	testxlate.lo
-testall_LDADD =  $(TARGET_LIB_PATH)
-testall: $(testall_OBJECTS) $(testall_LDADD)
-	$(LINK) $(APRUTIL_LDFLAGS) $(testall_OBJECTS) $(testall_LDADD) $(PROGRAM_DEPENDENCIES)
-
+# DO NOT REMOVE