add "share", move "collects" back out of "lib", move "pkgs"

The "share" directory holds platform-independent files, while
"lib" holds platform-specific files.

In principle, the "collects" directory belongs in "share",
as does "doc". Those directories are put into "share"
by a Unix-style install, but left at top level for an
in-place install.

Packages in installation scope are put in "share" instead
of "lib", and the top-level Makefile puts development links
in "share/devel-pkgs".

The `configure' script now supports `--docdir' and `--collectsdir'.

Changed the version to 5.90.0.1.

original commit: 67a9889ef750ce88139e17da6d8f807adcccc68e
This commit is contained in:
Matthew Flatt 2013-07-19 04:49:29 -06:00
parent 40083f37df
commit a35f2373f8
6 changed files with 17 additions and 18 deletions

View File

@ -28,9 +28,10 @@
(define ht (define ht
(hash 'doc-dir (build-path/s "doc") (hash 'doc-dir (build-path/s "doc")
'lib-dir (build-path/s "lib") 'lib-dir (build-path/s "lib")
'share-dir (build-path/s "share")
'dll-dir (build-path/s "lib") 'dll-dir (build-path/s "lib")
'links-file (build-path/s "lib" "links.rktd") 'links-file (build-path/s "share" "links.rktd")
'pkgs-dir (build-path/s "lib" "pkgs") 'pkgs-dir (build-path/s "share" "pkgs")
'bin-dir (build-path/s "bin") 'bin-dir (build-path/s "bin")
'include-dir (build-path/s "include") 'include-dir (build-path/s "include")
'catalogs (map build-path/f catalogs))) 'catalogs (map build-path/f catalogs)))

View File

@ -212,7 +212,6 @@ Function myTestInstDir
IfFileExists "$INSTDIR\Racket.exe" racket_is_installed IfFileExists "$INSTDIR\Racket.exe" racket_is_installed
@(if auto-launch @~a{IfFileExists "$INSTDIR\${RKTLaunchProgram}.exe" racket_is_installed} "") @(if auto-launch @~a{IfFileExists "$INSTDIR\${RKTLaunchProgram}.exe" racket_is_installed} "")
IfFileExists "$INSTDIR\collects" racket_is_installed IfFileExists "$INSTDIR\collects" racket_is_installed
IfFileExists "$INSTDIR\lib\collects" racket_is_installed
Goto racket_is_not_installed Goto racket_is_not_installed
racket_is_installed: racket_is_installed:
IfFileExists "${UNINSTEXE}" we_have_uninstall IfFileExists "${UNINSTEXE}" we_have_uninstall
@ -320,7 +319,7 @@ Function un.myGUIInit
IfFileExists "$INSTDIR\Racket.exe" racket_is_installed_un IfFileExists "$INSTDIR\Racket.exe" racket_is_installed_un
IfFileExists "$INSTDIR\lib\GRacket.exe" racket_is_installed_un IfFileExists "$INSTDIR\lib\GRacket.exe" racket_is_installed_un
@(if auto-launch @~a{IfFileExists "$INSTDIR\${RKTLaunchProgram}.exe" racket_is_installed_un} "") @(if auto-launch @~a{IfFileExists "$INSTDIR\${RKTLaunchProgram}.exe" racket_is_installed_un} "")
IfFileExists "$INSTDIR\lib\collects" racket_is_installed_un IfFileExists "$INSTDIR\collects" racket_is_installed_un
MessageBox MB_YESNO "It does not appear that Racket is installed in '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES racket_is_installed_un MessageBox MB_YESNO "It does not appear that Racket is installed in '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES racket_is_installed_un
Abort "Uninstall aborted by user" Abort "Uninstall aborted by user"
racket_is_installed_un: racket_is_installed_un:
@ -336,6 +335,7 @@ Section "Uninstall"
Delete "$INSTDIR\README*.*" Delete "$INSTDIR\README*.*"
RMDir /r "$INSTDIR\include" RMDir /r "$INSTDIR\include"
RMDir /r "$INSTDIR\lib" RMDir /r "$INSTDIR\lib"
RMDir /r "$INSTDIR\share"
RMDir /r "$INSTDIR\etc" RMDir /r "$INSTDIR\etc"
RMDir /r "$INSTDIR\doc" RMDir /r "$INSTDIR\doc"
;; these exist in Racket-Full installations ;; these exist in Racket-Full installations

View File

@ -13,7 +13,5 @@
(when (file-exists? tgz-file) (when (file-exists? tgz-file)
(delete-file tgz-file)) (delete-file tgz-file))
(parameterize ([current-directory (build-path "racket/lib")]) (parameterize ([current-directory (build-path "racket")])
(tar-gzip tgz-file "collects")) (tar-gzip tgz-file "collects"))

View File

@ -30,7 +30,7 @@
also modify Racket; if you distribute a modified version, you must also modify Racket; if you distribute a modified version, you must
distribute it under the terms of the LGPL, which in particular means distribute it under the terms of the LGPL, which in particular means
that you must release the source code for the modified software. See that you must release the source code for the modified software. See
lib/COPYING_LESSER.txt for more information.}) share/COPYING_LESSER.txt for more information.})
(define macosx-notes (define macosx-notes
@~a{Install by dragging the enclosing Racket folder to your Applications folder @~a{Install by dragging the enclosing Racket folder to your Applications folder

View File

@ -164,6 +164,7 @@ set_dirs() {
libdir="$1/lib" libdir="$1/lib"
incrktdir="$1/include/$TARGET" incrktdir="$1/include/$TARGET"
librktdir="$1/lib/$TARGET" librktdir="$1/lib/$TARGET"
sharerktdir="$1/share/$TARGET"
configdir="$1/etc/$TARGET" configdir="$1/etc/$TARGET"
has_share="N" has_share="N"
if test -d "$1/share"; then has_share="Y"; fi if test -d "$1/share"; then has_share="Y"; fi
@ -227,8 +228,8 @@ unpack_installation() {
| { cd "$INSTDIR" | { cd "$INSTDIR"
"$tar" xf - || failwith "problems during unpacking of binary archive." "$tar" xf - || failwith "problems during unpacking of binary archive."
} }
test -d "$INSTDIR/lib/collects" \ test -d "$INSTDIR/collects" \
|| failwith "unpack failed (could not find \"$T/lib/collects\")." || failwith "unpack failed (could not find \"$T/collects\")."
echo "Done." echo "Done."
} }
@ -328,6 +329,7 @@ unixstyle_install() {
echo "Target Directories:" echo "Target Directories:"
show_dir_var "[e] Executables " "$bindir" show_dir_var "[e] Executables " "$bindir"
show_dir_var "[o] Libraries " "$librktdir" show_dir_var "[o] Libraries " "$librktdir"
show_dir_var "[s] Shared files " "$sharerktdir"
show_dir_var "[c] Configuration" "$configdir" show_dir_var "[c] Configuration" "$configdir"
show_dir_var "[d] Documentation" "$docdir" show_dir_var "[d] Documentation" "$docdir"
show_dir_var "[l] C Libraries " "$libdir" show_dir_var "[l] C Libraries " "$libdir"
@ -351,6 +353,7 @@ unixstyle_install() {
[lL]* ) read_dir libdir ;; [lL]* ) read_dir libdir ;;
[hH]* ) read_dir incrktdir ;; [hH]* ) read_dir incrktdir ;;
[oO]* ) read_dir librktdir ;; [oO]* ) read_dir librktdir ;;
[sS]* ) read_dir sharerktdir ;;
[cC]* ) read_dir configdir ;; [cC]* ) read_dir configdir ;;
[mM]* ) read_dir mandir ;; [mM]* ) read_dir mandir ;;
"" ) if test "$err" = "N"; then done="Y" "" ) if test "$err" = "N"; then done="Y"
@ -382,9 +385,9 @@ unixstyle_install() {
unpack_installation "$tmp" unpack_installation "$tmp"
cd "$where" cd "$where"
"$tmp/bin/racket" "$tmp/lib/collects/setup/unixstyle-install.rkt" \ "$tmp/bin/racket" "$tmp/collects/setup/unixstyle-install.rkt" \
"move" "$tmp" "$bindir" "$librktdir/collects" "$docdir" "$libdir" \ "move" "$tmp" "$bindir" "$sharerktdir/collects" "$docdir" "$libdir" \
"$incrktdir" "$librktdir" "$configdir" "$mandir" \ "$incrktdir" "$librktdir" "$sharerktdir" "$configdir" "$mandir" \
|| failwith "installation failed" || failwith "installation failed"
} }

View File

@ -22,12 +22,9 @@
(display-time) (display-time)
(define lib-dir (build-path dest-dir "lib")) (define collects-dir (build-path dest-dir "collects"))
(make-directory* lib-dir)
(define collects-dir (build-path lib-dir "collects"))
(when (directory-exists? collects-dir) (when (directory-exists? collects-dir)
(delete-directory/files collects-dir)) (delete-directory/files collects-dir))
(untgz (open-input-bytes zip-content) (untgz (open-input-bytes zip-content)
#:dest lib-dir) #:dest dest-dir)