about summary refs log tree commit diff
path: root/src/nix
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/Makefile.am27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nix/Makefile.am b/src/nix/Makefile.am
new file mode 100644
index 000000000000..37415976b3d7
--- /dev/null
+++ b/src/nix/Makefile.am
@@ -0,0 +1,27 @@
+bin_PROGRAMS = nix
+
+nix_SOURCES = nix.cc dotgraph.cc
+nix_LDADD = ../libmain/libmain.a ../libnix/libnix.a ../boost/format/libformat.a \
+ -L../../externals/inst/lib -ldb_cxx -lATerm
+
+nix.o: nix-help.txt.hh
+
+%.hh: %
+	echo -n '"' > $@
+	sed 's|\(.*\)|\1\\n\\|' < $< >> $@
+	echo '"' >> $@
+
+AM_CXXFLAGS = \
+ -I.. -I../../externals/inst/include -I../libnix -I../libmain
+
+install-data-local:
+	$(INSTALL) -d $(localstatedir)/nix
+	$(INSTALL) -d $(localstatedir)/nix/db
+	$(INSTALL) -d $(localstatedir)/nix/links
+	rm -f $(prefix)/current
+	ln -sf $(localstatedir)/nix/links/current $(prefix)/current
+	$(INSTALL) -d $(localstatedir)/log/nix
+	$(INSTALL) -d $(prefix)/store
+	$(bindir)/nix --init
+
+EXTRA_DIST = *.hh