switch "config.rktd" dirs back to "collects"-relative
Making them "etc"-relative intercts badly with redirecting a configuration to override just a few values --- such as the links path, which is what `make core' needs.
This commit is contained in:
parent
d2ec0bf5cc
commit
53d68e2149
14
Makefile
14
Makefile
|
@ -39,15 +39,23 @@ win32-in-place:
|
|||
# ------------------------------------------------------------
|
||||
# Core build
|
||||
|
||||
# During this step, we use a configuration file that indicates
|
||||
# an empty set of link files, so that any installation-wide
|
||||
# links or packages are ignored during the core build.
|
||||
|
||||
core:
|
||||
mkdir -p build/config
|
||||
echo '#hash((links-search-files . ()))' > build/config/config.rktd
|
||||
mkdir -p racket/src/build
|
||||
$(MAKE) racket/src/build/Makefile
|
||||
cd racket/src/build; $(MAKE) reconfigure
|
||||
cd racket/src/build; $(MAKE) SELF_RACKET_FLAGS="-G ."
|
||||
cd racket/src/build; $(MAKE) install SELF_RACKET_FLAGS="-G ."
|
||||
cd racket/src/build; $(MAKE) SELF_RACKET_FLAGS="-G `cd ../../../build/config; pwd`"
|
||||
cd racket/src/build; $(MAKE) install SELF_RACKET_FLAGS="-G `cd ../../../build/config; pwd`"
|
||||
|
||||
win32-core:
|
||||
cmd /c racket\src\worksp\build-at racket\src\worksp
|
||||
IF NOT EXIST build\config cmd /c mkdir mkdir -p build\config
|
||||
cmd /c echo #hash((links-search-files . ())) > build\config\config.rktd
|
||||
cmd /c racket\src\worksp\build-at racket\src\worksp ..\..\..\build\config
|
||||
|
||||
racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
|
||||
cd racket/src/build; ../configure
|
||||
|
|
|
@ -20,17 +20,19 @@ to locate configured directories.
|
|||
|
||||
A @filepath{config.rktd} file in the configuration directory should
|
||||
contain a @racket[read]able hash table with any of the following
|
||||
symbolic keys:
|
||||
symbolic keys, where an relative path is relative to the main collection
|
||||
directory:
|
||||
|
||||
@itemlist[
|
||||
|
||||
@item{@racket['doc-dir] --- a path, string, or byte string for the
|
||||
main documentation directory. The value defaults to a
|
||||
@filepath{doc} sibling directory of the configuration directory.}
|
||||
@filepath{doc} sibling directory of the parent of the
|
||||
main collection directory.}
|
||||
|
||||
@item{@racket['lib-dir] --- a path, string, or byte string for the
|
||||
main library directory; it defaults to a @filepath{lib} sibling
|
||||
directory of the configuration directory.}
|
||||
main library directory; it defaults to the parent
|
||||
directory of the main collection directory.}
|
||||
|
||||
@item{@racket['lib-search-dirs] --- a list of paths, strings, byte
|
||||
strings, or @racket[#f] representing the search path for
|
||||
|
@ -45,7 +47,8 @@ symbolic keys:
|
|||
|
||||
@item{@racket['links-file] --- a path, string, or byte string for the
|
||||
@tech[#:doc reference-doc]{collection links file}; it defaults
|
||||
to a @filepath{links.rktd} file in the main library directory.}
|
||||
to a @filepath{links.rktd} file in the parent of the main
|
||||
collection directory.}
|
||||
|
||||
@item{@racket['links-search-files] --- like @racket['lib-search-dirs],
|
||||
but for @tech[#:doc reference-doc]{collection links file}.}
|
||||
|
@ -59,7 +62,7 @@ symbolic keys:
|
|||
|
||||
@item{@racket['bin-dir] --- a path, string, or byte string for the
|
||||
main directory containing executables; it defaults to a
|
||||
@filepath{bin} sibling directory of the main library
|
||||
@filepath{bin} sibling directory of the parent of the main collection
|
||||
directory.}
|
||||
|
||||
@item{@racket['doc-search-dirs] --- like @racket['lib-search-dirs],
|
||||
|
|
|
@ -943,7 +943,7 @@ v
|
|||
Returns a list of paths to installation @tech[#:doc
|
||||
reference-doc]{collection links files} that are search in
|
||||
order. (Normally, the result includes the result of
|
||||
@racket[(find-links-files)], which is where new installation-wide
|
||||
@racket[(find-links-file)], which is where new installation-wide
|
||||
links are installed by @exec{raco link} or @racket[links].) The
|
||||
files indicated by the returned paths may or may not exist.}
|
||||
|
||||
|
|
|
@ -281,6 +281,10 @@ flags:
|
|||
argument is parsed in the same way as @envvar{PLTCOMPILEDROOTS}
|
||||
(see @racket[current-compiled-file-roots]).}
|
||||
|
||||
@item{@FlagFirst{G} @nonterm{dir} or @DFlagFirst{config}
|
||||
@nonterm{dir} : Sets the directory that is returned by
|
||||
@racket[(find-system-path 'config-dir)].}
|
||||
|
||||
@item{@FlagFirst{A} @nonterm{dir} or @DFlagFirst{addon}
|
||||
@nonterm{dir} : Sets the directory that is returned by
|
||||
@racket[(find-system-path 'addon-dir)].}
|
||||
|
|
|
@ -6,9 +6,9 @@ raco link: -u/--user mode installs a version-specific link,
|
|||
added -s/--shared for user-specific, all-version links
|
||||
Added PLTCONFIGDIR
|
||||
Added links-file and links-search-dirs to config, enabling
|
||||
a search path of installation-wide link files
|
||||
setup/dir: default paths found relative to the config directory,
|
||||
instead of the main collection directory
|
||||
a search path of installation-wide link files, as well
|
||||
as pkgs-dir and pkgs-search-dirs
|
||||
Removed -C/--links command-line flag
|
||||
|
||||
Version 5.3.900.1
|
||||
Reorganized collections into packages
|
||||
|
|
|
@ -157,8 +157,8 @@
|
|||
(define dir
|
||||
(delay
|
||||
(or (force config:id)
|
||||
(let ([p (find-config-dir)])
|
||||
(and p (simplify-path (build-path p 'up default)))))))
|
||||
(let ([p (find-collects-dir)])
|
||||
(and p (simplify-path (build-path p 'up 'up default)))))))
|
||||
(define (id)
|
||||
(force dir)))]
|
||||
[(_ provide config:id id user-id default)
|
||||
|
|
|
@ -354,16 +354,17 @@
|
|||
#:info-path-mode 'abs-in-relative
|
||||
#:omit-root 'dir
|
||||
#:main? #t))
|
||||
(for ([c+p (in-list (links #:user? #f #:with-path? #t))])
|
||||
(cc! (list (string->path (car c+p)))
|
||||
#:path (cdr c+p)))
|
||||
(for ([cp (in-list (links #:root? #t #:user? #f))]
|
||||
#:when (directory-exists? cp)
|
||||
[collection (directory-list cp)]
|
||||
#:unless (skip-collection-directory? collection)
|
||||
#:when (directory-exists? (build-path cp collection)))
|
||||
(cc! (list collection)
|
||||
#:path (build-path cp collection))))
|
||||
(when (member (find-links-file) (get-links-search-files))
|
||||
(for ([c+p (in-list (links #:user? #f #:with-path? #t))])
|
||||
(cc! (list (string->path (car c+p)))
|
||||
#:path (cdr c+p)))
|
||||
(for ([cp (in-list (links #:root? #t #:user? #f))]
|
||||
#:when (directory-exists? cp)
|
||||
[collection (directory-list cp)]
|
||||
#:unless (skip-collection-directory? collection)
|
||||
#:when (directory-exists? (build-path cp collection)))
|
||||
(cc! (list collection)
|
||||
#:path (build-path cp collection)))))
|
||||
(when (make-user)
|
||||
(define info-root (find-user-lib-dir))
|
||||
(define info-path (build-path info-root "info-cache.rktd"))
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -372,9 +372,30 @@
|
|||
"(define-values(coerce-to-path)"
|
||||
"(lambda(p)"
|
||||
"(cond"
|
||||
"((string? p)(string->path p))"
|
||||
"((bytes? p)(bytes->path p))"
|
||||
"((string? p)(collects-relative-path->complete-path(string->path p)))"
|
||||
"((bytes? p)(collects-relative-path->complete-path(bytes->path p)))"
|
||||
"((path? p)(collects-relative-path->complete-path p))"
|
||||
"(else p))))"
|
||||
"(define-values(collects-relative-path->complete-path)"
|
||||
"(lambda(p)"
|
||||
"(cond"
|
||||
"((complete-path? p) p)"
|
||||
"(else"
|
||||
"(path->complete-path"
|
||||
" p"
|
||||
"(or(exe-relative-path->complete-path(find-system-path 'collects-dir))"
|
||||
"(find-system-path 'orig-dir)))))))"
|
||||
"(define-values(exe-relative-path->complete-path)"
|
||||
"(lambda(collects-path)"
|
||||
"(cond"
|
||||
"((complete-path? collects-path) collects-path)"
|
||||
"((absolute-path? collects-path)"
|
||||
"(path->complete-path collects-path"
|
||||
"(path->complete-path"
|
||||
"(find-executable-path(find-system-path 'exec-file) #f #t)"
|
||||
"(find-system-path 'orig-dir))))"
|
||||
"(else"
|
||||
"(find-executable-path(find-system-path 'exec-file) collects-path #t)))))"
|
||||
"(define-values(add-config-search)"
|
||||
"(lambda(ht key orig-l)"
|
||||
"(let((l(hash-ref ht key #f)))"
|
||||
|
@ -389,11 +410,11 @@
|
|||
"(lambda()"
|
||||
"(let*((d(find-config-dir))"
|
||||
"(ht(get-config-table d))"
|
||||
"(lf(or(hash-ref ht 'links-file #f)"
|
||||
"(build-path(or"
|
||||
"(coerce-to-path(hash-ref ht 'lib-dir #f))"
|
||||
" (build-path d 'up \"lib\"))"
|
||||
" \"links.rktd\"))))"
|
||||
"(lf(coerce-to-path"
|
||||
"(or(hash-ref ht 'links-file #f)"
|
||||
"(build-path(or(hash-ref ht 'lib-dir #f)"
|
||||
" 'up)"
|
||||
" \"links.rktd\")))))"
|
||||
"(list->vector"
|
||||
"(add-config-search"
|
||||
" ht"
|
||||
|
@ -760,14 +781,7 @@
|
|||
"(if(null? l)"
|
||||
" null"
|
||||
"(let*((collects-path(car l))"
|
||||
"(v"
|
||||
"(cond"
|
||||
"((complete-path? collects-path) collects-path)"
|
||||
"((absolute-path? collects-path)"
|
||||
"(path->complete-path collects-path"
|
||||
"(find-executable-path(find-system-path 'exec-file) #f #t)))"
|
||||
"(else"
|
||||
"(find-executable-path(find-system-path 'exec-file) collects-path #t)))))"
|
||||
"(v(exe-relative-path->complete-path collects-path)))"
|
||||
"(if v"
|
||||
"(cons(simplify-path(path->complete-path v(current-directory)))"
|
||||
"(loop(cdr l)))"
|
||||
|
|
|
@ -440,10 +440,35 @@
|
|||
(define-values (coerce-to-path)
|
||||
(lambda (p)
|
||||
(cond
|
||||
[(string? p) (string->path p)]
|
||||
[(bytes? p) (bytes->path p)]
|
||||
[(string? p) (collects-relative-path->complete-path (string->path p))]
|
||||
[(bytes? p) (collects-relative-path->complete-path (bytes->path p))]
|
||||
[(path? p) (collects-relative-path->complete-path p)]
|
||||
[else p])))
|
||||
|
||||
(define-values (collects-relative-path->complete-path)
|
||||
(lambda (p)
|
||||
(cond
|
||||
[(complete-path? p) p]
|
||||
[else
|
||||
(path->complete-path
|
||||
p
|
||||
(or (exe-relative-path->complete-path (find-system-path 'collects-dir))
|
||||
(find-system-path 'orig-dir)))])))
|
||||
|
||||
(define-values (exe-relative-path->complete-path)
|
||||
(lambda (collects-path)
|
||||
(cond
|
||||
[(complete-path? collects-path) collects-path]
|
||||
[(absolute-path? collects-path)
|
||||
;; This happens only under Windows; add a drive
|
||||
;; specification to make the path complete
|
||||
(path->complete-path collects-path
|
||||
(path->complete-path
|
||||
(find-executable-path (find-system-path 'exec-file) #f #t)
|
||||
(find-system-path 'orig-dir)))]
|
||||
[else
|
||||
(find-executable-path (find-system-path 'exec-file) collects-path #t)])))
|
||||
|
||||
(define-values (add-config-search)
|
||||
(lambda (ht key orig-l)
|
||||
(let ([l (hash-ref ht key #f)])
|
||||
|
@ -463,11 +488,11 @@
|
|||
(lambda ()
|
||||
(let* ([d (find-config-dir)]
|
||||
[ht (get-config-table d)]
|
||||
[lf (or (hash-ref ht 'links-file #f)
|
||||
(build-path (or
|
||||
(coerce-to-path (hash-ref ht 'lib-dir #f))
|
||||
(build-path d 'up "lib"))
|
||||
"links.rktd"))])
|
||||
[lf (coerce-to-path
|
||||
(or (hash-ref ht 'links-file #f)
|
||||
(build-path (or (hash-ref ht 'lib-dir #f)
|
||||
'up)
|
||||
"links.rktd")))])
|
||||
(list->vector
|
||||
(add-config-search
|
||||
ht
|
||||
|
@ -837,7 +862,7 @@
|
|||
|
||||
(define-values (load/use-compiled)
|
||||
(lambda (f) ((current-load/use-compiled) f #f)))
|
||||
|
||||
|
||||
(define-values (find-library-collection-paths)
|
||||
(case-lambda
|
||||
[() (find-library-collection-paths null null)]
|
||||
|
@ -868,14 +893,7 @@
|
|||
(if (null? l)
|
||||
null
|
||||
(let* ([collects-path (car l)]
|
||||
[v
|
||||
(cond
|
||||
[(complete-path? collects-path) collects-path]
|
||||
[(absolute-path? collects-path)
|
||||
(path->complete-path collects-path
|
||||
(find-executable-path (find-system-path 'exec-file) #f #t))]
|
||||
[else
|
||||
(find-executable-path (find-system-path 'exec-file) collects-path #t)])])
|
||||
[v (exe-relative-path->complete-path collects-path)])
|
||||
(if v
|
||||
(cons (simplify-path (path->complete-path v (current-directory)))
|
||||
(loop (cdr l)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cd %1
|
||||
set SELF_RACKET_FLAGS=-G .
|
||||
set BUILD_CONFIG=%2
|
||||
set PLT_SETUP_OPTIONS=--no-foreign-libs
|
||||
build
|
||||
|
|
|
@ -8,6 +8,11 @@ set DEVENV=devenv
|
|||
for %%X in (vcexpress.exe) do (set VCEXP=%%~$PATH:X)
|
||||
if defined VCEXP set DEVENV=%VCEXP%
|
||||
|
||||
if not exist ..\..\etc mkdir ..\..\etc
|
||||
if not exist ..\..\doc mkdir ..\..\doc
|
||||
|
||||
if not defined BUILD_CONFIG set BUILD_CONFIG=..\..\etc
|
||||
|
||||
cd racket
|
||||
"%DEVENV%" racket.sln /Build "Release|%BUILDMODE%"
|
||||
if errorlevel 1 exit /B 1
|
||||
|
@ -17,7 +22,7 @@ if errorlevel 1 exit /B 1
|
|||
cd ..
|
||||
|
||||
cd gc2
|
||||
..\..\..\racketcgc %SELF_RACKET_FLAGS% -cu make.rkt
|
||||
..\..\..\racketcgc -G ..\%BUILD_CONFIG% -cu make.rkt
|
||||
if errorlevel 1 exit /B 1
|
||||
cd ..
|
||||
|
||||
|
@ -35,7 +40,7 @@ if errorlevel 1 exit /B 1
|
|||
cd ..
|
||||
|
||||
cd mzcom
|
||||
..\..\..\racket %SELF_RACKET_FLAGS% -cu xform.rkt
|
||||
..\..\..\racket -G ..\%BUILD_CONFIG -cu xform.rkt
|
||||
if errorlevel 1 exit /B 1
|
||||
cd ..
|
||||
|
||||
|
@ -44,11 +49,6 @@ cd mzcom
|
|||
if errorlevel 1 exit /B 1
|
||||
cd ..
|
||||
|
||||
..\..\racket -l racket/kernel/init -e "(if (directory-exists? \"../../etc\") (void) (make-directory \"../../etc\"))"
|
||||
if errorlevel 1 exit /B 1
|
||||
..\..\racket -l racket/kernel/init -e "(if (directory-exists? \"../../doc\") (void) (make-directory \"../../doc\"))"
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
copy ..\COPYING-libscheme.txt ..\..\lib\
|
||||
if errorlevel 1 exit /B 1
|
||||
copy ..\COPYING_LESSER.txt ..\..\lib\
|
||||
|
@ -56,5 +56,5 @@ if errorlevel 1 exit /B 1
|
|||
copy ..\COPYING.txt ..\..\lib\
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
..\..\racket -N "raco setup" %SELF_RACKET_FLAGS% -l- setup %PLT_SETUP_OPTIONS%
|
||||
..\..\racket -G %BUILD_CONFIG% -N "raco setup" %SELF_RACKET_FLAGS% -l- setup %PLT_SETUP_OPTIONS%
|
||||
if errorlevel 1 exit /B 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user