Changeset 12514


Ignore:
Timestamp:
03/03/10 15:18:41 (12 years ago)
Author:
Mark Evenson
Message:

Create logical pathnames translations for "SYS:SRC" and "SYS:JAVA".

COMPILE-SYSTEM now dumps the file "system.lisp" to the output path,
which gets picked up by the build process and packaged in abcl.jar.
boot.lisp now has a (REQUIRE :system) form to load this, trapping any
errors to be non-fatal.

Location:
trunk/abcl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/CHANGES

    r12511 r12514  
    66Features
    77--------
     8
     9* [svn 12513] Implement SYS:SRC and SYS:JAVA logical pathname
     10  translations for system Lisp source and the root of the Java package
     11  structure, respectively.
    812
    913* [svn 12505] All calls to anonymous functions and local functions that have
  • trunk/abcl/build.xml

    r12487 r12514  
    8181
    8282    <patternset id="abcl.objects">
     83      <!-- "system.lisp" is dynamically created by COMPILE-SYSTEM -->
     84      <include name="org/armedbear/lisp/system.lisp"/>
    8385      <include name="org/armedbear/lisp/**/*.class"/>
    8486      <include name="org/armedbear/lisp/**/*.cls"/>
  • trunk/abcl/src/org/armedbear/lisp/boot.lisp

    r12392 r12514  
    192192    (%format t "Startup completed in ~A seconds.~%"
    193193             (float (/ (ext:uptime) 1000)))))
     194
     195;;; "system.lisp" contains system installation specific information
     196;;; (currently only the logical pathname definition for "SYS;SRC")
     197;;; that is not currently required for ABCL to run.  Since
     198;;; LOAD-SYSTEM-FILE exits the JVM if its argument cannot be found, we
     199;;; use REQUIRE trapping any error.
     200(handler-case
     201    (require 'system)
     202  (t ()))
     203
  • trunk/abcl/src/org/armedbear/lisp/compile-system.lisp

    r12422 r12514  
    285285         (unless failure-p
    286286           (setf status 0)))))
     287    (create-system-logical-translations output-path)
    287288    (when quit
    288289      (quit :status status))))
     290
     291(defun create-system-logical-translations (output-path)
     292  (let* ((dir (directory-namestring (pathname output-path)))
     293         (system (merge-pathnames "system.lisp" dir))
     294         (home (pathname *lisp-home*))
     295         (src (format nil "~A**/*.*" home))
     296         (java (format nil "~A../../../**/*.*" home)))
     297    (with-open-file (s system :direction :output
     298                       :if-exists :supersede)
     299      (write `(setf (logical-pathname-translations "sys")
     300                    '(("SYS:SRC;**;*.*" ,src)
     301                      ("SYS:JAVA;**;*.*" ,java)))
     302       :stream s))))
     303     
Note: See TracChangeset for help on using the changeset viewer.