* dbtest.c: Include btree.h if we're compiled with -DSTATISTICS
authorTom Yu <tlyu@mit.edu>
Fri, 23 Aug 2002 17:58:41 +0000 (17:58 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 23 Aug 2002 17:58:41 +0000 (17:58 +0000)
* Makefile.in: Add rules for bttest; also add a clean rule.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14754 dc483132-0cff-0310-8789-dd5450dbe970

src/util/db2/test/ChangeLog
src/util/db2/test/Makefile.in
src/util/db2/test/dbtest.c

index 8794fb2bf54ba825055d7921996c62832c8fce4c..c0caa5374bf96213a938bd0cc40cf75b9eb7f8b2 100644 (file)
@@ -1,4 +1,11 @@
+2002-08-23  Tom Yu  <tlyu@mit.edu>
 
+       * dbtest.c: Include btree.h if we're compiled with -DSTATISTICS.
+
+       * Makefile.in: Add rules for bttest; also add a clean rule.
+
+2002-05-08  Ken Raeburn  <raeburn@mit.edu>
+       
        * dbtest.c: Test for __STDC__ defined, not nonzero, to decide
        whether to use stdarg.h or varargs.h.
        (err): Similarly for function signature.
index 0b9c2907b257b204563d4269f9c8de03df4f5584..443097f1c6e47a7e214d11f382365c791c02fa7d 100644 (file)
@@ -7,7 +7,7 @@ FCTSH = @FCTSH@
 TMPDIR=.
 
 LOCALINCLUDES= -I. -I$(srcdir)/../include -I../include -I$(srcdir)/../mpool \
-               -I$(srcdir)/../db
+               -I$(srcdir)/../btree -I$(srcdir)/../hash -I$(srcdir)/../db
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
@@ -21,3 +21,13 @@ dbtest: dbtest.o $(DB_DEPLIB)
 
 check:: dbtest
        $(KRB5_RUN_ENV) srcdir=$(srcdir) TMPDIR=$(TMPDIR) $(FCTSH) $(srcdir)/run.test
+
+bttest.o: $(srcdir)/btree.tests/main.c
+       $(CC) $(ALL_CFLAGS) -c $(srcdir)/btree.tests/main.c -o $@
+
+bttest: bttest.o $(DB_DEPLIB)
+       $(CC_LINK) -o $@ bttest.o $(STRERROR_OBJ) $(DB_LIB)
+
+clean-unix::
+       $(RM) dbtest.o dbtest __dbtest
+       $(RM) bttest.o bttest
index ca18378ee036df18f95aeecf2482c963eef54de8..10a89a6fad1fe90e94b68d1c25d6975fdc46e52c 100644 (file)
@@ -54,6 +54,9 @@ static char sccsid[] = "@(#)dbtest.c  8.17 (Berkeley) 9/1/94";
 #include <unistd.h>
 
 #include "db-int.h"
+#ifdef STATISTICS
+#include "btree.h"
+#endif
 
 enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA };