commit 343bf8a6210ab740eab465069bd1b5bb629a5d84
parent 717c7fb82f3675417da3b3d00b70abc633bf85e5
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Sat, 20 Jul 2013 12:09:37 -0600
distro-build: change `#:source?' config to mean source packages, too
Use `#:source-runtime?' to make only the run-time system have
source form, while packages are pre-built.
original commit: 82c4e5663183d03d776dbccbae8ea4c6d35ac205
Diffstat:
4 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/pkgs/distro-build/config.rkt b/pkgs/distro-build/config.rkt
@@ -138,6 +138,8 @@
[(#:pull?) (boolean? val)]
[(#:release?) (boolean? val)]
[(#:source?) (boolean? val)]
+ [(#:source-runtime?) (boolean? val)]
+ [(#:source-pkgs?) (boolean? val)]
[(#:site-dest) (path-string? val)]
[(#:pdf-doc?) (boolean? val)]
[(#:max-snapshots) (real? val)]
diff --git a/pkgs/distro-build/doc.txt b/pkgs/distro-build/doc.txt
@@ -204,11 +204,20 @@ Site-configuration keywords (where <string*> means no spaces, etc.):
installers; the default is determined by the `RELEASE_MODE'
makefile variable
- #:source? <boolean> --- if true, then create a kernel-source archive
- (with pre-built packages), instead of a platform-specific
- installer; a #t value works best when used with a Unix client
- machine, since Unix clients typically have no native-library
- packages; the default is #f
+ #:source? <boolean> --- determines the default value for
+ `#:source-runtime' and `#:source-pkgs'
+
+ #:source-runtime? <boolean> --- if true, then create an archive that
+ contains the run-time system in source form (possibly with built
+ packages), instead of a platform-specific installer; a #t value
+ works best when used with a Unix client machine, since Unix
+ clients typically have no native-library packages; the default is
+ the value of `#:source?'
+
+ #:source-pkgs? --- if true, then packages are included in the
+ installer/archive only in source form; a true value works best
+ when the `#:source-runtime?' value is also #t; the default is the
+ value of `#:source?'
#:site-dest <path-string> --- destination for completed build, used
by the `site' and `snapshot-site' makefile targets; the default is
diff --git a/pkgs/distro-build/drive-clients.rkt b/pkgs/distro-build/drive-clients.rkt
@@ -250,6 +250,8 @@
(define dist-catalogs (choose-catalogs c '("")))
(define release? (get-opt c '#:release? default-release?))
(define source? (get-opt c '#:source? #f))
+ (define source-pkgs? (get-opt c '#:source-pkgs? source?))
+ (define source-runtime? (get-opt c '#:source-runtime? source?))
(~a " SERVER=" server
" PKGS=" (q pkgs)
" DOC_SEARCH=" (q doc-search)
@@ -260,7 +262,10 @@
" DIST_SUFFIX=" (q dist-suffix)
" DIST_CATALOGS_q=" (qq dist-catalogs kind)
" RELEASE_MODE=" (if release? "--release" (q ""))
- " SOURCE_MODE=" (if source? "--source" (q ""))
+ " SOURCE_MODE=" (if source-runtime? "--source" (q ""))
+ " PKG_SOURCE_MODE=" (if source-pkgs?
+ (q "--source --no-setup")
+ (q ""))
" README=" (q (file-name-from-path readme))))
(define (unix-build c host port user server repo clean? pull? readme)
diff --git a/pkgs/distro-build/readme.rkt b/pkgs/distro-build/readme.rkt
@@ -21,10 +21,13 @@
@|(hash-ref config '#:name "Racket")|
distribution for version @(version)@(maybe-stamp config).@;
- @(if (hash-ref config '#:source? #f)
+ @(if (let ([src? (hash-ref config '#:source? #f)])
+ (or (hash-ref config '#:source-runtime? src?)
+ (hash-ref config '#:source-pkgs? src?)))
(string-append "\n" (make-source-notes config) "\n")
"")@;
- @(if (and (not (hash-ref config '#:source? #f))
+ @(if (and (not (hash-ref config '#:source-runtime?
+ (hash-ref config '#:source? #f)))
(eq? (hash-ref config '#:platform (system-type)) 'macosx))
(string-append "\n" (make-macosx-notes config) "\n")
"")@;
@@ -66,14 +69,28 @@
share/COPYING_LESSER.txt for more information.})
(define (make-source-notes config)
-
- @~a{This distribution provides source for the Racket run-time system;
- for build and installation instructions, see "racket/src/README".
- Besides the run-time system's source, the distribution provides
- pre-built versions of the core Racket bytecode, as well as pre-built
- versions of included packages and documentation --- which makes it
- suitable for quick installation on a Unix platform for which
- executable binaries are not already provided.})
+ (define src? (hash-ref config '#:source? #f))
+ (define rt-src
+ @~a{This distribution provides source for the Racket run-time system;
+ for build and installation instructions, see "racket/src/README".})
+ (define pkg-src
+ @~a{(The distribution also includes the core Racket collections and any
+ installed packages in source form.)})
+ (define pkg-built
+ @~a{Besides the run-time system's source, the distribution provides
+ pre-built versions of the core Racket bytecode, as well as pre-built
+ versions of included packages and documentation --- which makes it
+ suitable for quick installation on a Unix platform for which
+ executable binaries are not already provided.})
+ (cond
+ [(and (hash-ref config '#:source-runtime? src?)
+ (not (hash-ref config '#:source-pkgs? src?)))
+ (~a rt-src "\n" pkg-built)]
+ [(and (hash-ref config '#:source-runtime? src?)
+ (hash-ref config '#:source-pkgs? src?))
+ (~a rt-src "\n" pkg-src)]
+ [else
+ @~a{The distribution includes any pre-installed packages in source form.}]))
(define (make-macosx-notes config)
@~a{Install by dragging the enclosing