about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-01T15·41+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-01T15·41+0100
commit2f9bb5c7e744ddca3fbe5576e520a3e80c106c55 (patch)
tree7a3d5d57a460aa87a8f8b58d46102ca339e97770 /src/libstore
parentc5ba08133370f98de722c978bda3b446721985de (diff)
parent6dca72006aa9b1cf2f226bb5b538e744fcab976f (diff)
Merge branch 'make'
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/Makefile.am33
-rw-r--r--src/libstore/build.cc5
-rw-r--r--src/libstore/gc.cc2
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/libstore/local.mk28
5 files changed, 30 insertions, 40 deletions
diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am
deleted file mode 100644
index 3dfb1e0c3a24..000000000000
--- a/src/libstore/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-pkglib_LTLIBRARIES = libstore.la
-
-libstore_la_SOURCES = \
-  store-api.cc local-store.cc remote-store.cc derivations.cc build.cc misc.cc \
-  globals.cc references.cc pathlocks.cc gc.cc \
-  optimise-store.cc
-
-pkginclude_HEADERS = \
-  store-api.hh local-store.hh remote-store.hh derivations.hh misc.hh \
-  globals.hh references.hh pathlocks.hh \
-  worker-protocol.hh
-
-libstore_la_LIBADD = ../libutil/libutil.la ../boost/format/libformat.la @SQLITE3_LIBS@ -lbz2
-
-EXTRA_DIST = schema.sql
-
-AM_CXXFLAGS = -Wall \
- -I$(srcdir)/.. -I$(srcdir)/../libutil \
- -DNIX_STORE_DIR=\"$(storedir)\" \
- -DNIX_DATA_DIR=\"$(datadir)\" \
- -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
- -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
- -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
- -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
- -DNIX_BIN_DIR=\"$(bindir)\" \
- -DNIX_VERSION=\"$(VERSION)\" \
- -I$(srcdir)/.. -I$(srcdir)/../libutil \
- -I$(srcdir)/../libstore
-
-local-store.lo: schema.sql.hh
-
-%.sql.hh: %.sql
-	sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1)
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 4329d9a22b95..1b379752fa0e 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -75,12 +75,9 @@ using std::map;
 static string pathNullDevice = "/dev/null";
 
 
-static const uid_t rootUserId = 0;
-
-
 /* Forward definition. */
 class Worker;
-class HookInstance;
+struct HookInstance;
 
 
 /* A pointer to a goal. */
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index d212259f3b66..79bd7d56b3fe 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -22,8 +22,6 @@ static string gcLockName = "gc.lock";
 static string tempRootsDir = "temproots";
 static string gcRootsDir = "gcroots";
 
-static const int defaultGcLevel = 1000;
-
 
 /* Acquire the global GC lock.  This is used to prevent new Nix
    processes from starting after the temporary root files have been
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 1ecc629cb55f..68add1982f43 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -212,7 +212,7 @@ Settings::SettingsMap Settings::getOverrides()
 }
 
 
-const string nixVersion = NIX_VERSION;
+const string nixVersion = PACKAGE_VERSION;
 
 
 }
diff --git a/src/libstore/local.mk b/src/libstore/local.mk
new file mode 100644
index 000000000000..2dddce740dcc
--- /dev/null
+++ b/src/libstore/local.mk
@@ -0,0 +1,28 @@
+libraries += libstore
+
+libstore_NAME = libnixstore
+
+libstore_DIR := $(d)
+
+libstore_SOURCES := $(wildcard $(d)/*.cc)
+
+libstore_LIBS = libutil libformat
+
+libstore_LDFLAGS = -lsqlite3 -lbz2
+
+libstore_CXXFLAGS = \
+ -DNIX_STORE_DIR=\"$(storedir)\" \
+ -DNIX_DATA_DIR=\"$(datadir)\" \
+ -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
+ -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
+ -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
+ -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
+ -DNIX_BIN_DIR=\"$(bindir)\" \
+ -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+
+$(d)/local-store.cc: $(d)/schema.sql.hh
+
+%.sql.hh: %.sql
+	$(trace-gen) sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1)
+
+clean-files += $(d)/schema.sql.hh