From ac5aa28889ac3a535f8cfdd71047c9aa10b1959d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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. --- distro.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'distro.scm') diff --git a/distro.scm b/distro.scm index f697ad3601..760c7245e7 100644 --- a/distro.scm +++ b/distro.scm @@ -24,6 +24,7 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-39) #:export (search-patch + search-bootstrap-binary %patch-directory find-packages-by-name)) @@ -41,10 +42,20 @@ (or (getenv "DISTRO_PATCH_DIRECTORY") (compile-time-value (getenv "DISTRO_INSTALLED_PATCH_DIRECTORY"))))) +(define %bootstrap-binaries-directory + (make-parameter + (or (getenv "DISTRO_BOOTSTRAP_DIRECTORY") + (compile-time-value (getenv "DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY"))))) + (define (search-patch file-name) "Search the patch FILE-NAME." (search-path (list (%patch-directory)) file-name)) +(define (search-bootstrap-binary file-name system) + "Search the bootstrap binary FILE-NAME for SYSTEM." + (search-path (list (%bootstrap-binaries-directory)) + (string-append system "/" file-name))) + (define %distro-module-directory ;; Absolute path of the (distro ...) module root. (string-append (dirname (search-path %load-path "distro.scm")) -- cgit v1.2.3