Allow embedding ASDF in monolithic executables

This commit is contained in:
Juan Jose Garcia Ripoll 2010-09-12 09:57:32 +02:00
parent c4dd32ca96
commit 1245e5e8a0
3 changed files with 11 additions and 4 deletions

View file

@ -98,6 +98,11 @@ ECL 10.5.1:
- (EXPT 2 -2.0d0) is now computed in double precision.
- When building programs with ASDF:MAKE-BUILD, "prebuilt-asdf" may be listed
in the dependencies, as the last one, so that ASDF is linked in. It is
required by some packages that do not distinguish between compilation and
distribution.
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

View file

@ -140,14 +140,14 @@
(make-package "ASDF")
(defun build-fake-asdf (name)
(defun build-fake-asdf (name &optional (filename (string name)))
(let ((path (make-pathname :name name :type "asd")))
(with-open-file (*standard-output* path
:direction :output :if-exists :supersede
:if-does-not-exist :create)
(print `(defsystem ,name :class asdf::prebuilt-system
:lib ,(format nil "SYS:~A" (string name))
:components ((:compiled-file ,(string name))))))
(print `(defsystem ,name :class asdf::prebuilt-system
:lib ,(format nil "SYS:~A" filename)
:components ((:compiled-file ,filename)))))
path))
(defun build-module (name sources &key additional-files

View file

@ -174,6 +174,8 @@
:dir "build:ext;"
:prefix "EXT"
:builtin #+:BUILTIN-ASDF t #-:BUILTIN-ASDF nil)
(push (build-fake-asdf "prebuilt-asdf" "asdf")
*module-files*)
;;;
;;; * PROFILE