From 5079ccb45537fe8de4b9579e274523734a3f634e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 20 Jun 2003 10:53:04 +0000 Subject: [PATCH] * Move most of Nix into a library (libnix.a). * Run `test' on `make check'. --- configure.ac | 1 + src/Makefile.am | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 1aa1a6656..9b36f90a9 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,7 @@ AC_CANONICAL_HOST AC_PROG_CC AC_PROG_CXX +AC_PROG_RANLIB # Unix shell scripting should die a slow and painful death. AC_DEFINE_UNQUOTED(NIX_VALUES_DIR, "$(eval echo $prefix/values)", Nix values directory.) diff --git a/src/Makefile.am b/src/Makefile.am index 20f172819..afe34ba5f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,16 +1,22 @@ bin_PROGRAMS = nix # fix -noinst_PROGRAMS = test +check_PROGRAMS = test AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I.. -nix_SOURCES = nix.cc util.cc hash.cc archive.cc md5.c eval.cc values.cc globals.cc db.cc -nix_LDADD = -ldb_cxx-4 -lATerm +nix_SOURCES = nix.cc +nix_LDADD = libnix.a -ldb_cxx-4 -lATerm #fix_SOURCES = fix.cc util.cc hash.cc md5.c #fix_LDADD = -lATerm -test_SOURCES = test.cc util.cc hash.cc archive.cc md5.c eval.cc values.cc globals.cc db.cc -test_LDADD = -ldb_cxx-4 -lATerm +TESTS = test + +test_SOURCES = test.cc +test_LDADD = libnix.a -ldb_cxx-4 -lATerm + +noinst_LIBRARIES = libnix.a + +libnix_a_SOURCES = util.cc hash.cc archive.cc md5.c eval.cc values.cc globals.cc db.cc install-data-local: $(INSTALL) -d $(localstatedir)/nix