X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-pathname.lisp;h=c1deb5ac621ba0a5bbf87078bdced3848651a917;hb=829ced3e78a23ba153ba4db64e6ea6984c2313b6;hp=52e81dcdd27424f5ff48a4d94abefbb357ce722c;hpb=9df2abae0a60d757448f06f0cc90213ec9fa775b;p=sbcl.git diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 52e81dc..c1deb5a 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -47,7 +47,7 @@ (unparse-enough #'unparse-win32-enough) (unparse-directory-separator "\\") (simplify-namestring #'simplify-win32-namestring) - (customary-case :upper)))) + (customary-case :lower)))) (defparameter *win32-host* (make-win32-host)) (defun make-win32-host-load-form (host) (declare (ignore host)) @@ -863,7 +863,7 @@ a host-structure or string." (cond (junk-allowed (handler-case - (%parse-namestring namestr host defaults start end nil) + (%parse-native-namestring namestr host defaults start end nil as-directory) (namestring-parse-error (condition) (values nil (namestring-parse-error-offset condition))))) (t @@ -1361,7 +1361,7 @@ unspecified elements into a completed to-pathname based on the to-wildname." ;;; a new one if necessary. (defun intern-logical-host (thing) (declare (values logical-host)) - (with-locked-hash-table (*logical-hosts*) + (with-locked-system-table (*logical-hosts*) (or (find-logical-host thing nil) (let* ((name (logical-word-or-lose thing)) (new (make-logical-host :name name))) @@ -1767,3 +1767,29 @@ experimental and subject to change." `(("SYS:SRC;**;*.*.*" ,src) ("SYS:CONTRIB;**;*.*.*" ,contrib) ("SYS:OUTPUT;**;*.*.*" ,output))))) + +(defun set-sbcl-source-location (pathname) + "Initialize the SYS logical host based on PATHNAME, which should be +the top-level directory of the SBCL sources. This will replace any +existing translations for \"SYS:SRC;\", \"SYS:CONTRIB;\", and +\"SYS:OUTPUT;\". Other \"SYS:\" translations are preserved." + (let ((truename (truename pathname)) + (current-translations + (remove-if (lambda (translation) + (or (pathname-match-p "SYS:SRC;" translation) + (pathname-match-p "SYS:CONTRIB;" translation) + (pathname-match-p "SYS:OUTPUT;" translation))) + (logical-pathname-translations "SYS") + :key #'first))) + (flet ((physical-target (component) + (merge-pathnames + (make-pathname :directory (list :relative component + :wild-inferiors) + :name :wild + :type :wild) + truename))) + (setf (logical-pathname-translations "SYS") + `(("SYS:SRC;**;*.*.*" ,(physical-target "src")) + ("SYS:CONTRIB;**;*.*.*" ,(physical-target "contrib")) + ("SYS:OUTPUT;**;*.*.*" ,(physical-target "output")) + ,@current-translations)))))