# includes append to these:
SUFFIXES =
+PHONY =
TESTS =
+CLEANFILES =
bin_PROGRAMS =
noinst_HEADERS =
lib_LTLIBRARIES =
BUILT_SOURCES=
EXTRA_DIST = README.FIRST
-SUBDIRS = . docs support tests example
+SUBDIRS = docs
include libmemcached/include.am
include clients/include.am
+include tests/include.am
+include example/include.am
+include support/include.am
check-local: test-no-outputdiff
clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set
clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking
-valgrind:
+client-valgrind:
libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost
libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10
libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000
AC_CONFIG_FILES([
Makefile
- tests/Makefile
docs/Makefile
- example/Makefile
libmemcached/memcached_configure.h
- support/Makefile
support/libmemcached.pc
support/libmemcached.spec
support/libmemcached-fc.spec
+++ /dev/null
-noinst_PROGRAMS = memcached_light
-
-memcached_light_SOURCES= memcached_light.c \
- memcached_light.h \
- storage.h \
- interface_v0.c \
- interface_v1.c
-memcached_light_LDADD= $(top_builddir)/libmemcached/libmemcachedprotocol.la $(LIBINNODB)
-memcached_light_DEPENDENCIES= $(top_builddir)/libmemcached/libmemcachedprotocol.la
-
-if BUILD_BYTEORDER
-memcached_light_LDADD+= $(top_builddir)/libmemcached/libbyteorder.la
-memcached_light_DEPENDENCIES+= $(top_builddir)/libmemcached/libbyteorder.la
-endif
-
-if HAVE_LIBINNODB
-memcached_light_SOURCES+= storage_innodb.c
-else
-memcached_light_SOURCES+= storage.c
-endif
--- /dev/null
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+noinst_PROGRAMS += example/memcached_light
+
+example_memcached_light_SOURCES= \
+ example/interface_v0.c \
+ example/interface_v1.c \
+ example/memcached_light.c \
+ example/memcached_light.h \
+ example/storage.h
+
+example_memcached_light_LDADD= libmemcached/libmemcachedprotocol.la $(LIBINNODB)
+
+if BUILD_BYTEORDER
+example_memcached_light_LDADD+= libmemcached/libbyteorder.la
+endif
+
+if HAVE_LIBINNODB
+example_memcached_light_SOURCES+= example/storage_innodb.c
+else
+example_memcached_light_SOURCES+= example/storage.c
+endif
+++ /dev/null
-EXTRA_DIST = libmemcached.spec set_benchmark.sh libmemcached-fc.spec.in
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libmemcached.pc
--- /dev/null
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+EXTRA_DIST += \
+ support/libmemcached.spec \
+ support/libmemcached-fc.spec.in \
+ support/set_benchmark.sh
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = support/libmemcached.pc
+++ /dev/null
-LDADDS = $(top_builddir)/libmemcached/libmemcached.la
-
-if BUILD_LIBMEMCACHEDUTIL
-LDADDS+= $(top_builddir)/libmemcached/libmemcachedutil.la
-endif
-
-EXTRA_DIST = \
- r/memcat.res\
- r/memcp.res\
- r/memrm.res\
- r/memslap.res\
- r/memstat.res\
- t/memcat.test\
- t/memcp.test\
- t/memrm.test\
- t/memslap.test\
- t/memstat.test
-
-LIBS =
-
-noinst_HEADERS = test.h server.h ketama_test_cases.h ketama_test_cases_spy.h hash_results.h libmemcached_world.h
-noinst_PROGRAMS = testapp testplus udptest atomsmasher startservers
-noinst_LTLIBRARIES= libserver.la libtest.la
-
-libserver_la_SOURCES= server.c
-libtest_la_SOURCES= test.c
-
-testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-testapp_SOURCES = function.c
-testapp_LDADD = $(top_builddir)/clients/libgenexec.la libtest.la libserver.la $(LDADDS)
-
-testplus_SOURCES = plus.cpp
-testplus_LDADD = libtest.la libserver.la $(LDADDS)
-
-udptest_SOURCES = udp.c
-udptest_LDADD = libtest.la libserver.la $(LDADDS)
-
-atomsmasher_SOURCES = atomsmasher.c
-atomsmasher_LDADD = $(top_builddir)/clients/libgenexec.la libtest.la libserver.la $(LDADDS)
-
-startservers_SOURCES = start.c
-startservers_LDADD = libserver.la $(LDADDS)
-
-client-record:
- sh t/memcat.test > r/memcat.res
- sh t/memcp.test > r/memcp.res
- sh t/memrm.test > r/memrm.res
- sh t/memslap.test > r/memslap.res
- sh t/memstat.test > r/memstat.res
-
-test: testapp testplus library_test memcapable
- echo "Tests completed"
-
-library_test:
- ./testapp
-# ./testplus
-
-memcapable:
- @MEMC_BINARY@ -d -P /tmp/Xumemc.pid -p 12555
- @$(top_builddir)/clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
- @cat /tmp/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
- @rm /tmp/Xumemc.pid
-
-clients:
- @MEMC_BINARY@ -d -P /tmp/Xumemc.pid -p 12555
- export MEMCACHED_SERVERS="localhost:12555"
- sh t/memcat.test > r/memcat.cmp
- diff r/memcat.res r/memcat.cmp
- sh t/memcp.test > r/memcp.cmp
- diff r/memcp.res r/memcp.cmp
- sh t/memrm.test > r/memrm.cmp
- diff r/memrm.res r/memrm.cmp
- sh t/memslap.test > r/memslap.cmp
- diff r/memslap.res r/memslap.cmp
- sh t/memstat.test > r/memstat.cmp
- diff r/memstat.res r/memstat.cmp
- cat /tmp/Xumemc.pid | xargs kill
- rm /tmp/Xumemc.pid
-
-valgrind:
- $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes testapp
-
-cachegrind:
- rm -f cachegrind.out.*
- $(LIBTOOL) --mode=execute valgrind --tool=cachegrind --branch-sim=yes testapp
- cg_annotate cachegrind.out.* --auto=yes > /tmp/cachegrind.out
-
-callgrind:
- rm -f callgrind.out.*
- $(LIBTOOL) --mode=execute valgrind --tool=callgrind testapp
- callgrind_annotate callgrind.out.* --auto=yes > /tmp/callgrind.out
-
-helgrind:
- rm -f helgrind.out.*
- $(LIBTOOL) --mode=execute valgrind --tool=helgrind testapp
-
-helgrind-slap:
- $(LIBTOOL) --mode=execute valgrind --tool=helgrind ${top_builddir}/clients/memslap --server=localhost --concurrency=30
-
-test-no-outputdiff: test
-
-hudson-valgrind:
- $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --log-file=/tmp/valgrind.out testapp
--- /dev/null
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+TESTS_LDADDS = libmemcached/libmemcached.la
+
+if BUILD_LIBMEMCACHEDUTIL
+TESTS_LDADDS+= libmemcached/libmemcachedutil.la
+endif
+
+EXTRA_DIST+= \
+ tests/r/memcat.res \
+ tests/r/memcp.res \
+ tests/r/memrm.res \
+ tests/r/memslap.res \
+ tests/r/memstat.res \
+ tests/t/memcat.test \
+ tests/t/memcp.test \
+ tests/t/memrm.test \
+ tests/t/memslap.test \
+ tests/t/memstat.test
+
+noinst_HEADERS+= \
+ tests/hash_results.h \
+ tests/ketama_test_cases.h \
+ tests/ketama_test_cases_spy.h \
+ tests/libmemcached_world.h \
+ tests/server.h \
+ tests/test.h
+
+noinst_PROGRAMS+= \
+ tests/atomsmasher \
+ tests/startservers \
+ tests/testapp \
+ tests/testplus \
+ tests/udptest
+
+noinst_LTLIBRARIES+= tests/libserver.la
+tests_libserver_la_SOURCES= tests/server.c
+
+noinst_LTLIBRARIES+= tests/libtest.la
+tests_libtest_la_SOURCES= tests/test.c
+
+tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
+tests_testapp_SOURCES= tests/function.c
+tests_testapp_LDADD= \
+ clients/libgenexec.la \
+ tests/libserver.la \
+ tests/libtest.la \
+ $(TESTS_LDADDS)
+
+tests_testplus_SOURCES= tests/plus.cpp
+tests_testplus_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+
+tests_udptest_SOURCES= tests/udp.c
+tests_udptest_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+
+tests_atomsmasher_SOURCES= tests/atomsmasher.c
+tests_atomsmasher_LDADD= \
+ clients/libgenexec.la \
+ tests/libserver.la \
+ tests/libtest.la \
+ $(TESTS_LDADDS)
+
+tests_startservers_SOURCES= tests/start.c
+tests_startservers_LDADD= tests/libserver.la $(TESTS_LDADDS)
+
+client-record:
+ sh tests/t/memcat.test > tests/r/memcat.res
+ sh tests/t/memcp.test > tests/r/memcp.res
+ sh tests/t/memrm.test > tests/r/memrm.res
+ sh tests/t/memslap.test > tests/r/memslap.res
+ sh tests/t/memstat.test > tests/r/memstat.res
+
+test: tests/testapp tests/testplus library_test memcapable
+ echo "Tests completed"
+
+library_test:
+ tests/testapp
+# tests/testplus
+
+memcapable: clients/memcapable
+ @MEMC_BINARY@ -d -P tests/Xumemc.pid -p 12555
+ @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
+ @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+ @rm tests/Xumemc.pid
+
+PHONY += clients
+clients:
+ @MEMC_BINARY@ -d -P tests/Xumemc.pid -p 12555
+ export MEMCACHED_SERVERS="localhost:12555"
+ sh tests/t/memcat.test > tests/r/memcat.cmp
+ diff tests/r/memcat.res tests/r/memcat.cmp
+ sh tests/t/memcp.test > tests/r/memcp.cmp
+ diff tests/r/memcp.res tests/r/memcp.cmp
+ sh tests/t/memrm.test > tests/r/memrm.cmp
+ diff tests/r/memrm.res tests/r/memrm.cmp
+ sh tests/t/memslap.test > tests/r/memslap.cmp
+ diff tests/r/memslap.res tests/r/memslap.cmp
+ sh tests/t/memstat.test > tests/r/memstat.cmp
+ diff tests/r/memstat.res tests/r/memstat.cmp
+ cat tests/Xumemc.pid | xargs kill
+ rm tests/Xumemc.pid
+
+PHONY += valgrind
+valgrind:
+ $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/testapp
+
+PHONY += cachegrind
+CLEANFILES += tests/cachegrind.out
+cachegrind:
+ rm -f tests/cachegrind.out.*
+ $(LIBTOOL) --mode=execute valgrind --tool=cachegrind --cachegrind-out-file=tests/cachegrind.out.%p --branch-sim=yes tests/testapp
+ cg_annotate tests/cachegrind.out.* --auto=yes > tests/cachegrind.out
+
+PHONY += callgrind
+CLEANFILES += tests/callgrind.out
+callgrind:
+ rm -f tests/callgrind.out.*
+ $(LIBTOOL) --mode=execute valgrind --tool=callgrind --callgrind-out-file=tests/callgrind.out.%p tests/testapp
+ callgrind_annotate tests/callgrind.out.* --auto=yes > tests/callgrind.out
+
+PHONY += helgrind
+CLEANFILES+= helgrind.out.*
+helgrind:
+ rm -f helgrind.out.*
+ $(LIBTOOL) --mode=execute valgrind --tool=helgrind tests/testapp
+
+PHONY += helgrind-slap
+helgrind-slap:
+ $(LIBTOOL) --mode=execute valgrind --tool=helgrind clients/memslap --server=localhost --concurrency=30
+
+test-no-outputdiff: test
+
+hudson-valgrind:
+ $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --log-file=tests/valgrind.out tests/testapp