summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-23 15:53:34 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-23 15:53:34 +0000
commit39ce70025b59a545127d1ffdefa83b7cbfcd8be1 (patch)
tree073ced88097af91b11f9331168d823a7fff8d64f
parent9202570f8c40f58f6444c2ec512104b305058977 (diff)
downloadguix-39ce70025b59a545127d1ffdefa83b7cbfcd8be1.tar.gz
* Incorporated Berkeley DB and ATerm into the source tree.
* `make dist'.

-rw-r--r--Makefile.am4
-rw-r--r--configure.ac4
-rw-r--r--corepkgs/fetchurl/Makefile.am2
-rw-r--r--corepkgs/nar/Makefile.am2
-rw-r--r--externals/Makefile.am43
-rw-r--r--scripts/Makefile.am5
-rw-r--r--src/Makefile.am8
7 files changed, 63 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 2bed3f3bbc..70aa1ba960 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1,3 @@
-SUBDIRS = src scripts corepkgs
+SUBDIRS = externals src scripts corepkgs
+
+EXTRA_DIST = boost/*.hpp boost/format/*.hpp substitute.mk
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 9db0a88079..e60895ff7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(nix, 0.1)
+AC_INIT(nix, 0.2pre1)
 AC_CONFIG_SRCDIR(src/nix.cc)
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE
@@ -12,7 +12,7 @@ AC_PROG_CXX
 AC_PROG_RANLIB
 
 AM_CONFIG_HEADER([config.h])
-AC_CONFIG_FILES([Makefile src/Makefile scripts/Makefile
+AC_CONFIG_FILES([Makefile externals/Makefile src/Makefile scripts/Makefile
 			  corepkgs/Makefile corepkgs/fetchurl/Makefile
 			  corepkgs/nar/Makefile])
 AC_OUTPUT
diff --git a/corepkgs/fetchurl/Makefile.am b/corepkgs/fetchurl/Makefile.am
index 6bae43907a..44e07280fe 100644
--- a/corepkgs/fetchurl/Makefile.am
+++ b/corepkgs/fetchurl/Makefile.am
@@ -6,3 +6,5 @@ install-exec-local:
 	$(INSTALL_DATA) fetchurl.sh $(datadir)/fix/fetchurl
 
 include ../../substitute.mk
+
+EXTRA_DIST = fetchurl.fix fetchurl.sh
diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am
index 508eeff7c9..4cb59ae398 100644
--- a/corepkgs/nar/Makefile.am
+++ b/corepkgs/nar/Makefile.am
@@ -8,3 +8,5 @@ install-exec-local:
 	$(INSTALL_DATA) unnar.sh $(datadir)/fix/nar
 
 include ../../substitute.mk
+
+EXTRA_DIST = nar.fix nar.sh unnar.fix unnar.sh
diff --git a/externals/Makefile.am b/externals/Makefile.am
new file mode 100644
index 0000000000..cd95832f66
--- /dev/null
+++ b/externals/Makefile.am
@@ -0,0 +1,43 @@
+# Berkeley DB
+
+DB = db-4.0.14
+DB_URL = http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz
+
+$(DB).tar.gz:
+	wget $(DB_URL)
+
+$(DB): $(DB).tar.gz
+	gunzip < $(DB).tar.gz | tar xvf -
+
+build-db: $(DB)
+	(pfx=`pwd` && \
+	cd $(DB)/build_unix && \
+	CC=$(CC) CXX=$(CXX) ../dist/configure --prefix=$$pfx/inst --enable-cxx --disable-shared && \
+	make && \
+	make install)
+	touch build-db
+
+
+# CWI ATerm
+
+ATERM = aterm-2.0
+ATERM_URL = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz
+
+$(ATERM).tar.gz:
+	wget $(ATERM_URL)
+
+$(ATERM): $(ATERM).tar.gz
+	gunzip < $(ATERM).tar.gz | tar xvf -
+
+build-aterm: $(ATERM)
+	(pfx=`pwd` && \
+	cd $(ATERM) && \
+	./configure --prefix=$$pfx/inst && \
+	make && \
+	make install)
+	touch build-aterm
+
+
+all: build-db build-aterm
+
+EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index fb2ef566da..d1ab6e4cdc 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -11,3 +11,8 @@ install-exec-local:
 	$(INSTALL_DATA) prebuilts.conf $(sysconfdir)/nix/prebuilts.conf
 
 include ../substitute.mk
+
+EXTRA_DIST = nix-switch.in nix-collect-garbage.in \
+ nix-pull.in nix-push.in nix-profile.sh.in \
+ prebuilts.conf
+
diff --git a/src/Makefile.am b/src/Makefile.am
index eb5177d13e..98d76b7536 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,8 @@
 bin_PROGRAMS = nix nix-hash fix
 check_PROGRAMS = test
 
-AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I..
+AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I.. -I../externals/inst/include $(CXXFLAGS)
+AM_LDFLAGS = -L../externals/inst/lib -ldb_cxx -lATerm $(LDFLAGS)
 
 nix_SOURCES = nix.cc
 nix_LDADD = libshared.a libnix.a -ldb_cxx -lATerm
@@ -29,7 +30,8 @@ libshared_a_CXXFLAGS = \
  -DNIX_STORE_DIR=\"$(prefix)/store\" \
  -DNIX_DATA_DIR=\"$(datadir)\" \
  -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
- -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\"
+ -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
+ $(AM_CXXFLAGS)
 
 install-data-local:
 	$(INSTALL) -d $(localstatedir)/nix
@@ -37,3 +39,5 @@ install-data-local:
 	$(INSTALL) -d $(localstatedir)/log/nix
 	$(INSTALL) -d $(prefix)/store
 	$(bindir)/nix --init
+
+EXTRA_DIST = *.hh *.h
\ No newline at end of file