about summary refs log tree commit diff
path: root/Makefile.am
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-04-21T10·54+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-04-21T10·54+0000
commitf79e9c2d22345eeb0c721a8cf5375101d33dc4c9 (patch)
treeb969e1ebfcde35c9889cacf98bde162f9124356c /Makefile.am
parent8e459d919dbce7c6d45d90ef9a9385133cfae15e (diff)
* Do initialise state (the DB etc.) when doing a `make install',
  unless `--disable-init-state' is passed to configure.

Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index cb50401357c8..720279460ae7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,3 +10,16 @@ rpm: nix.spec dist
 
 relname:
 	echo -n $(distdir) > relname
+
+install-data-local: init-state
+
+if INIT_STATE
+init-state:
+	$(INSTALL) -d $(DESTDIR)$(localstatedir)/nix
+	$(INSTALL) -d $(DESTDIR)$(localstatedir)/nix/db
+	$(INSTALL) -d $(DESTDIR)$(localstatedir)/log/nix
+	$(INSTALL) -d $(DESTDIR)$(prefix)/store
+#	$(bindir)/nix-store --init
+else
+init-state:
+endif
\ No newline at end of file