Makefile.in revision 251876
1srcdir = @srcdir@
2VPATH = @srcdir@
3
4# PROGRAMS includes all test programs built on this platform.
5# STDTEST_PORTABLE
6#   test programs invoked via standard user interface, run on all platforms
7# ALL_TESTS
8#   test modules invoked through the abts suite (./testall)
9# OTHER_PROGRAMS
10#   programs such as sockperf, that have to be invoked in a special sequence
11#   or with special parameters
12
13INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
14
15STDTEST_PORTABLE = dbd testall
16
17TESTS = teststrmatch.lo testuri.lo testuuid.lo testbuckets.lo testpass.lo \
18	testmd4.lo testmd5.lo testldap.lo testdate.lo testdbm.lo testdbd.lo \
19	testxml.lo testrmm.lo testreslist.lo testqueue.lo testxlate.lo \
20	testmemcache.lo testcrypto.lo
21
22PROGRAMS = $(STDTEST_PORTABLE)
23
24TARGETS = $(PROGRAMS)
25
26LOCAL_LIBS = ../lib@APRUTIL_LIBNAME@@APRUTIL_MAJOR_VERSION@.la
27
28CLEAN_TARGETS = manyfile.bin testfile.txt data/sqlite*.db
29
30# bring in rules.mk for standard functionality
31@INCLUDE_RULES@
32APRUTIL_LIBS = @APRUTIL_LIBS@
33APRUTIL_LDFLAGS = $(ALL_LDFLAGS) @LT_NO_INSTALL@ @APRUTIL_LDFLAGS@
34
35# link programs using -no-install to get real executables not
36# libtool wrapper scripts which link an executable when first run.
37LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
38	    $(APRUTIL_LDFLAGS) -o $@
39
40# STDTEST_PORTABLE;
41
42abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
43	 $(srcdir)/testutil.h
44
45testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
46	     $(srcdir)/testutil.h
47
48OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
49testall: $(OBJECTS_testall)
50	$(LINK_PROG) $(OBJECTS_testall) $(APRUTIL_LIBS) @LDADD_ldap@
51# For VPATH builds; where we have no ./data, copy us some data
52# if we wait until 'make check', then 'make; ./testall' fails;
53	if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
54
55OBJECTS_dbd = dbd.lo $(LOCAL_LIBS)
56dbd: $(OBJECTS_dbd)
57	$(LINK_PROG) $(OBJECTS_dbd) $(APRUTIL_LIBS)
58
59check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
60	teststatus=0; \
61	progfailed=""; \
62	for prog in $(STDTEST_NONPORTABLE) $(STDTEST_PORTABLE); do \
63	        if test "$$prog" = 'dbd'; then \
64			for driver in none @apu_dbd_tests@; do \
65				if test "$$driver" != 'none'; then \
66					@apr_shlibpath_var@="`echo "../crypto/.libs:../dbm/.libs:../dbd/.libs:../ldap/.libs:$$@apr_shlibpath_var@" | sed -e 's/::*$$//'`" \
67					./$$prog $$driver; \
68					status=$$?; \
69					if test $$status != 0; then \
70						teststatus=$$status; \
71						progfailed="$$progfailed '$$prog $$driver'"; \
72					fi; \
73				fi; \
74			done; \
75	        else \
76			@apr_shlibpath_var@="`echo "../crypto/.libs:../dbm/.libs:../dbd/.libs:../ldap/.libs:$$@apr_shlibpath_var@" | sed -e 's/::*$$//'`" \
77			./$$prog; \
78			status=$$?; \
79			if test $$status != 0; then \
80				teststatus=$$status; \
81				progfailed="$$progfailed $$prog"; \
82			fi; \
83		fi; \
84	done; \
85	if test $$teststatus != 0; then \
86		echo "Programs failed:$$progfailed"; \
87	fi; \
88	exit $$teststatus
89
90# DO NOT REMOVE
91