From ac5aa28889ac3a535f8cfdd71047c9aa10b1959d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Oct 2012 21:44:25 +0200 Subject: 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. --- Makefile.am | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Makefile.am') 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)" \ -- cgit v1.2.3