From e971149ac8a41b54fe330b72f6cb9641caf18485 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 6 Sep 2006 02:44:13 +0000 Subject: [PATCH] automake foo from Robin H. Johnson: build two targets, and test on the debug one with asserts git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@375 b0b603af-a30f-0410-a34e-baf09ae79d0b --- Makefile.am | 16 ++++++++-------- doc/CONTRIBUTORS.txt | 5 +++++ t/lib/MemcachedTest.pm | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index befb4dadd3..d3c6e689ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,19 +1,19 @@ -bin_PROGRAMS = memcached +bin_PROGRAMS = memcached memcached-debug -memcached_SOURCES = memcached.c slabs.c items.c memcached.h assoc.c +memcached_SOURCES = memcached.c slabs.c items.c assoc.c +memcached_debug_SOURCES = $(memcached_SOURCES) +memcached_CPPFLAGS = -DNDEBUG memcached_LDADD = @LIBOBJS@ +memcached_debug_LDADD = $(memcached_LDADD) SUBDIRS = doc DIST_DIRS = scripts EXTRA_DIST = doc scripts TODO t -test: memcached - prove t +memcached.c: memcached.h -# Uncomment the following to save some CPU (by disabling assertions), at the risk of silent data -# structure corruption. After all, this is a new branch of memcached, so you probably want -# assertions enabled. -#AM_CFLAGS=-DNDEBUG +test: memcached-debug + prove t dist-hook: rm -rf $(distdir)/doc/.svn/ diff --git a/doc/CONTRIBUTORS.txt b/doc/CONTRIBUTORS.txt index 13650a2f77..4a1b354e52 100644 --- a/doc/CONTRIBUTORS.txt +++ b/doc/CONTRIBUTORS.txt @@ -17,3 +17,8 @@ Bug reports, patches, testing, help: Michael Johnson Paul Querna Jamie McCarthy + Philip Neustrom + Andrew O'Brien + Josh Rotenberg + Robin H. Johnson -- automake foo + diff --git a/t/lib/MemcachedTest.pm b/t/lib/MemcachedTest.pm index 61f668aa2e..069542a8db 100644 --- a/t/lib/MemcachedTest.pm +++ b/t/lib/MemcachedTest.pm @@ -79,7 +79,7 @@ sub new_memcached { } my $childpid = fork(); - my $exe = "$Bin/../memcached"; + my $exe = "$Bin/../memcached-debug"; croak("memcached binary doesn't exist. Haven't run 'make' ?\n") unless -e $exe; croak("memcached binary not executable\n") unless -x _;