summary refs log tree commit diff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-17 21:44:25 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-17 23:25:25 +0200
commitac5aa28889ac3a535f8cfdd71047c9aa10b1959d (patch)
tree24498549369142b80528fa21b2d12629eb8432e6 /Makefile.am
parent9735a7b6eaccf248d91e1f3c17446b2fac41ec9a (diff)
downloadguix-ac5aa28889ac3a535f8cfdd71047c9aa10b1959d.tar.gz
distro: Use our own pre-built Guile to bootstrap.
* distro/packages/base.scm (%bootstrap-guile): Build from a tarball
  containing a pre-built Guile.

* distro.scm (%bootstrap-binaries-directory): New variable.
  (search-bootstrap-binary): New procedure.

* Makefile.am (bootstrapdir, bootstrap_x86_64_linuxdir,
  dist_bootstrap_x86_64_linux_DATA, DISTCLEANFILES, DOWNLOAD_FILE): New
  variables.
  (distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz):
  New rule.
  (EXTRA_DIST): Add `build-aux/download.scm'.
  (.scm.go): Define the `DISTRO_BOOTSTRAP_DIRECTORY' and
  `DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY' environment variables.

* pre-inst-env.in: Define `DISTRO_BOOTSTRAP_DIRECTORY'.

* build-aux/download.scm: New file.
* distro/packages/bootstrap/x86_64-linux/{bash, mkdir, tar, xz}: New
  files.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index dd2cfee8e6..277ac4277e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,6 +62,31 @@ dist_patch_DATA =					\
   distro/patches/readline-link-ncurses.patch		\
   distro/patches/tar-gets-undeclared.patch
 
+bootstrapdir = $(pkgdatadir)/bootstrap
+bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
+
+dist_bootstrap_x86_64_linux_DATA =		\
+  distro/packages/bootstrap/x86_64-linux/bash	\
+  distro/packages/bootstrap/x86_64-linux/mkdir	\
+  distro/packages/bootstrap/x86_64-linux/tar	\
+  distro/packages/bootstrap/x86_64-linux/xz
+
+# Big bootstrap binaries are not included in the tarball.  Instead, they
+# are downloaded.
+nodist_bootstrap_x86_64_linux_DATA =					\
+  distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz
+
+DISTCLEANFILES = $(nodist_bootstrap_x86_64_linux_DATA)
+
+# Method to download a file from an external source.
+DOWNLOAD_FILE =								\
+  GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"	\
+  $(GUILE) --no-auto-compile -L "$(top_srcdir)"				\
+           "$(top_srcdir)/build-aux/download.scm"
+
+distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz: guix/utils.go
+	$(DOWNLOAD_FILE) "$@" "0467a82cbe4136f60a79eb4176011bf88cf28ea19c9ad9defa365811ff8e11cf"
+
 nobase_nodist_guilemodule_DATA = $(GOBJECTS)
 
 TESTS =						\
@@ -77,6 +102,7 @@ LOG_COMPILER =					\
 
 EXTRA_DIST =					\
   .dir-locals.el				\
+  build-aux/download.scm			\
   srfi/srfi-64.scm				\
   srfi/srfi-64.upstream.scm			\
   tests/test.drv				\
@@ -93,6 +119,8 @@ CLEANFILES = $(GOBJECTS) *.log
 	LIBGCRYPT="$(LIBGCRYPT)"						\
 	DISTRO_PATCH_DIRECTORY="$(top_srcdir)/distro/patches"			\
 	DISTRO_INSTALLED_PATCH_DIRECTORY="$(patchdir)"				\
+	DISTRO_BOOTSTRAP_DIRECTORY="$(top_srcdir)/distro/packages/bootstrap"	\
+	DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY="$(bootstrapdir)"			\
 	GUILE_AUTO_COMPILE=0							\
 	GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"	\
 	$(GUILD) compile -L "$(top_srcdir)"					\