Merged from build.
authorMonty Taylor <mordred@inaugust.com>
Fri, 18 Dec 2009 01:25:43 +0000 (17:25 -0800)
committerMonty Taylor <mordred@inaugust.com>
Fri, 18 Dec 2009 01:25:43 +0000 (17:25 -0800)
1  2 
Makefile.am
configure.ac
libmemcached/include.am
tests/include.am

diff --cc Makefile.am
index 0bfe7ccd453ebf58d314185d90daa70a7d2ce3e9,868ea873977101976fae4ec81abf5a63e8a87f9a..09db5e9445f931a76bad70f497a04fcdc2875d2b
@@@ -1,28 -1,7 +1,28 @@@
  ACLOCAL_AMFLAGS = -I m4
  
 -SUBDIRS = docs libmemcached libhashkit support clients tests example
 -EXTRA_dist = README.FIRST
 +# includes append to these:
 +SUFFIXES =
 +PHONY =
 +TESTS =
 +CLEANFILES = 
 +bin_PROGRAMS =
 +noinst_HEADERS =
 +lib_LTLIBRARIES =
 +noinst_LTLIBRARIES =
 +noinst_PROGRAMS =
 +pkginclude_HEADERS =
 +nobase_pkginclude_HEADERS =
 +EXTRA_HEADERS =
 +BUILT_SOURCES=
 +EXTRA_DIST = README.FIRST
 +
- SUBDIRS = docs
++SUBDIRS = docs libhashkit
 +
 +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
  
diff --cc configure.ac
index de62e1ea4bdfe13766a58ab00d5996d3767f5128,f5e1e57406999ffcd7f9d01c21034d07c4432848..342f92de0f1839cb8c96ad6891acdf5baf4ea1f6
@@@ -46,8 -49,14 +49,9 @@@ AS_IF([test "x$ac_cv_header_atomic_h" 
  
  AC_CONFIG_FILES([
    Makefile
 -  clients/Makefile
 -  tests/Makefile
    docs/Makefile
 -  example/Makefile
 -  libmemcached/Makefile
    libmemcached/memcached_configure.h
 -  support/Makefile
+   libhashkit/Makefile
    support/libmemcached.pc
    support/libmemcached.spec
    support/libmemcached-fc.spec
index 12e6be3541eaf6d65c8920b1a73f3bba29061a32,0000000000000000000000000000000000000000..dc70562fc0e16cb4057b3c4a9b0583eae18e954e
mode 100644,000000..100644
--- /dev/null
@@@ -1,140 -1,0 +1,141 @@@
 +# vim:ft=automake
 +# included from Top Level Makefile.am
 +# All paths should be given relative to the root
 +
 +EXTRA_DIST+= \
 +      libmemcached/libmemcached_probes.d \
 +      libmemcached/memcached/README.txt \
 +      libmemcached/memcached_configure.h.in
 +
 +
 +noinst_HEADERS+= \
 +      libmemcached/byteorder.h \
 +      libmemcached/libmemcached_probes.h \
 +      libmemcached/io.h \
 +      libmemcached/internal.h \
 +      libmemcached/common.h \
 +      libmemcached/memcached/protocol_binary.h \
 +      libmemcached/protocol/common.h \
 +      libmemcached/protocol/ascii_handler.h \
 +      libmemcached/protocol/binary_handler.h
 +
 +nobase_pkginclude_HEADERS+= \
 +      libmemcached/behavior.h \
 +      libmemcached/callback.h \
 +      libmemcached/constants.h \
++      libmemcached/dump.h \
 +      libmemcached/exception.hpp \
 +      libmemcached/get.h \
 +      libmemcached/memcached.h \
 +      libmemcached/memcached.hpp \
 +      libmemcached/memcached_configure.h \
 +      libmemcached/protocol/cache.h \
 +      libmemcached/protocol/callback.h \
 +      libmemcached/protocol_handler.h \
 +      libmemcached/result.h \
 +      libmemcached/server.h \
 +      libmemcached/storage.h \
 +      libmemcached/string.h \
 +      libmemcached/types.h \
 +      libmemcached/visibility.h \
 +      libmemcached/watchpoint.h
 +
 +
 +
 +lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la
 +libmemcached_libmemcachedprotocol_la_SOURCES =  \
 +      libmemcached/protocol/ascii_handler.c \
 +      libmemcached/protocol/binary_handler.c \
 +      libmemcached/protocol/cache.c \
 +      libmemcached/protocol/pedantic.c \
 +      libmemcached/protocol/protocol_handler.c
 +
 +libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0 
 +
 +noinst_LTLIBRARIES+= libmemcached/libmemcachedcallbacks.la
 +libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING}
 +libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
 +
 +lib_LTLIBRARIES+= libmemcached/libmemcached.la
 +libmemcached_libmemcached_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION}
 +libmemcached_libmemcached_la_SOURCES = \
 +      libmemcached/allocators.c \
 +      libmemcached/analyze.c \
 +      libmemcached/auto.c \
 +      libmemcached/behavior.c \
 +      libmemcached/connect.c \
 +      libmemcached/crc.c \
 +      libmemcached/delete.c \
 +      libmemcached/do.c \
 +      libmemcached/dump.c \
 +      libmemcached/fetch.c \
 +      libmemcached/flush.c \
 +      libmemcached/flush_buffers.c \
 +      libmemcached/get.c \
 +      libmemcached/hash.c \
 +      libmemcached/hosts.c \
 +      libmemcached/io.c \
 +      libmemcached/jenkins_hash.c \
 +      libmemcached/key.c \
 +      libmemcached/md5.c \
 +      libmemcached/memcached.c \
 +      libmemcached/murmur_hash.c \
 +      libmemcached/parse.c \
 +      libmemcached/purge.c \
 +      libmemcached/quit.c \
 +      libmemcached/response.c \
 +      libmemcached/result.c \
 +      libmemcached/server.c \
 +      libmemcached/stats.c \
 +      libmemcached/storage.c \
 +      libmemcached/strerror.c \
 +      libmemcached/string.c \
 +      libmemcached/verbosity.c \
 +      libmemcached/version.c
 +
 +
 +if INCLUDE_HSIEH_SRC
 +libmemcached_libmemcached_la_SOURCES += libmemcached/hsieh_hash.c
 +endif
 +
 +libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la
 +libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la
 +libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0
 +
 +if BUILD_LIBMEMCACHEDUTIL
 +pkginclude_HEADERS+= libmemcached/memcached_util.h libmemcached/pool.h
 +lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la
 +endif
 +
 +libmemcached_libmemcachedutil_la_SOURCES= libmemcached/util/pool.c
 +libmemcached_libmemcachedutil_la_LIBADD= libmemcached/libmemcached.la
 +libmemcached_libmemcachedutil_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0
 +libmemcached_libmemcachedutil_la_DEPENDENCIES= libmemcached/libmemcached.la
 +
 +if BUILD_BYTEORDER
 +noinst_LTLIBRARIES += libmemcached/libbyteorder.la
 +libmemcached_libbyteorder_la_SOURCES= libmemcached/byteorder.c
 +libmemcached_libmemcached_la_LIBADD += libmemcached/libbyteorder.la
 +libmemcached_libmemcached_la_DEPENDENCIES+= libmemcached/libbyteorder.la
 +libmemcached_libmemcachedprotocol_la_LIBADD=libmemcached/libbyteorder.la
 +libmemcached_libmemcachedprotocol_la_DEPENDENCIES=libmemcached/libbyteorder.la
 +endif
 +
 +if HAVE_DTRACE
 +BUILT_SOURCES+= libmemcached/dtrace_probes.h
 +libmemcached_libmemcached_la_SOURCES += libmemcached/libmemcached_probes.d
 +endif
 +
 +if DTRACE_NEEDS_OBJECTS
 +libmemcached_libmemcached_la_DEPENDENCIES += libmemcached/libmemcached_probes.o
 +endif
 +
 +SUFFIXES+= .d
 +
 +libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d
 +      $(DTRACE) $(DTRACEFLAGS) -h -o libmemcached/dtrace_probes.h -s libmemcached/libmemcached_probes.d
 +
 +libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d $(libmemcached_libmemcached_la_OBJECTS)
 +      $(DTRACE) $(DTRACEFLAGS) -o libmemcached/.libs/libmemcached_probes.o -G -s libmemcached/libmemcached_probes.d `grep '^pic_object' *.lo | cut -f 2 -d\'`
 +      $(DTRACE) $(DTRACEFLAGS) -o libmemcached/libmemcached_probes.o -G -s libmemcached/libmemcached_probes.d `grep non_pic_object *.lo | cut -f 2 -d\' `
 +
index 32f044c9c828e6f53131156b2577a68a5228f9ff,0000000000000000000000000000000000000000..ddc2678bcb709e7998e84aebe59d159249809227
mode 100644,000000..100644
--- /dev/null
@@@ -1,136 -1,0 +1,151 @@@
- test: tests/testapp tests/testplus library_test memcapable
 +# 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/testhashkit \
 +      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)
 +
++tests_testhashkit_SOURCES = tests/hashkit_functions.c 
++tests_testhashkit_LDADD = tests/libtest.la libhashkit/libhashkit.la
++tests_testhashkit_DEPENDENCIES = libhashkit
++
 +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 libmhashkit_test
 +      echo "Tests completed"
 +
 +library_test:
 +      tests/testapp
 +#     tests/testplus
 +
++libmhashkit_test: libhashkit
++      tests/testhashkit
++
 +memcapable: clients/memcapable
 +      @MEMC_BINARY@ -d -P `pwd`/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 `pwd`/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
 +
++gdb-mem:
++      $(LIBTOOL) --mode=execute gdb tests/testapp
++
++gdb-hash:
++      $(LIBTOOL) --mode=execute gdb tests/testhashkit
++
++
 +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