distro-build/readme: adjust content of generated README files

Relevant to PR 14714

(I think the remaining suggestions in the PR are about the build
configuration.)

original commit: 0d9bb1367ee5e0f2e867d848b9463b52f5cca5ad
This commit is contained in:
Matthew Flatt 2014-09-01 14:40:27 +02:00
parent adf27c4888
commit 0f56ea84ee
2 changed files with 22 additions and 9 deletions

View File

@ -393,7 +393,7 @@ configuration keywords to values.
(make-macosx-notes config) -> string (make-macosx-notes config) -> string
config : hash? config : hash?
Produces "README" content to tell Mac OS X users how to install a Produces "README" content to tell Mac OS X users how to install a
distirbution folder. This function is used by `make-readme' when distribution folder. This function is used by `make-readme' when
`#:platform' in `config' is 'macosx. `#:platform' in `config' is 'macosx.
Names and Download Pages Names and Download Pages

View File

@ -18,7 +18,7 @@
=============================== ===============================
This is the This is the
@|(hash-ref config '#:name "Racket")| @|(drop-sort-annotations (hash-ref config '#:name "Racket"))|
distribution for version @(version)@(maybe-stamp config).@; distribution for version @(version)@(maybe-stamp config).@;
@(if (let ([src? (hash-ref config '#:source? #f)]) @(if (let ([src? (hash-ref config '#:source? #f)])
@ -43,27 +43,33 @@
[is (if (= 1 (length catalogs)) "is" "are")]) [is (if (= 1 (length catalogs)) "is" "are")])
(if (null? catalogs) (if (null? catalogs)
"" ""
@~a{@"\n"The distribution has been configured so that when you install or @~a{
The distribution has been configured so that when you install or
update packages, the package catalog@|s| at@; update packages, the package catalog@|s| at@;
@(apply ~a (for/list ([catalog (in-list catalogs)]) @(apply ~a (for/list ([catalog (in-list catalogs)])
@~a{@"\n" @|catalog|})) @~a{@"\n" @|catalog|}))
@|is| consulted, first.@"\n"}))@; @|is| consulted first.
}))@;
@(let* ([name (hash-ref config '#:install-name "")]) @(let* ([name (hash-ref config '#:install-name "")])
(if (or (equal? name "") (if (or (equal? name "")
(equal? name (version))) (equal? name (version)))
"" ""
@~a{@"\n"The distribution has been configured so that the installation @~a{
The distribution has been configured so that the installation
name is name is
@name @name
Multiple installations with this name share `user'-scoped packages, Multiple installations with this name share `user'-scoped packages,
which makes it easier to upgrade from such an installation to this one. which makes it easier to upgrade from such an installation to this one.
To avoid sharing (which is better for keeping multiple installations To avoid sharing (which is better for keeping multiple installations
active) use `raco pkg config -i --set name ...' to choose a different active) use `raco pkg config -i --set name ...' to choose a different
name for this installation.@"\n"}))@; name for this installation.
}))@;
Visit Visit http://racket-lang.org/ for more Racket resources.
http://racket-lang.org/
for more Racket resources.
License License
@ -80,6 +86,13 @@
that you must release the source code for the modified software. See that you must release the source code for the modified software. See
share/COPYING_LESSER.txt for more information.}) share/COPYING_LESSER.txt for more information.})
(define (drop-sort-annotations s)
;; Any number of spaces is allowed around "{...}" and "|",
;; so normalize that space while also removing "{...}":
(regexp-replace* #rx" *[|] *"
(regexp-replace* #rx" *{[^}]*} *" s "")
" | "))
(define (make-source-notes config) (define (make-source-notes config)
(define src? (hash-ref config '#:source? #f)) (define src? (hash-ref config '#:source? #f))
(define rt-src (define rt-src