about summary refs log tree commit diff
path: root/src/libstore/Makefile.am
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-11-22T17·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-11-22T17·28+0000
commit993fa94fb489f46e127ef760bea8c65ef281ef7f (patch)
treeaa9072bc840449143362be8657a81092d2384dfa /src/libstore/Makefile.am
parent4e1ea17052b4cc2445bc2ece2136f248112b4e45 (diff)
* Move initialisation of variables like nixConfDir from libmain to
  libstore so that the Perl bindings can use it as well.  It's vital
  that the Perl bindings use the configuration file, because otherwise
  nix-copy-closure will fail with a ‘database locked’ message if the
  value of ‘use-sqlite-wal’ is changed from the default.

Diffstat (limited to 'src/libstore/Makefile.am')
-rw-r--r--src/libstore/Makefile.am11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am
index e19256b925..39a61233b4 100644
--- a/src/libstore/Makefile.am
+++ b/src/libstore/Makefile.am
@@ -15,7 +15,16 @@ libstore_la_LIBADD = ../libutil/libutil.la ../boost/format/libformat.la ${aterm_
 EXTRA_DIST = schema.sql
 
 AM_CXXFLAGS = -Wall \
- ${sqlite_include} -I$(srcdir)/.. -I$(srcdir)/../libutil
+ ${sqlite_include} -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)\" \
+ -I$(srcdir)/.. -I$(srcdir)/../libutil \
+ -I$(srcdir)/../libstore
 
 local-store.lo: schema.sql.hh