Typically, these system tools should allow this. All you need is a system description and FASL files. Then the system tool should use the FASL files to load. You just need to make sure that it does not have a hard dependency on some source file.
Thus, software has been supplied in the Lisp world for decades (> 30 years). There is nothing wrong with this approach. If a specific tool (here ASDF, but there are others) has a problem with this, the authors should complain.
If you have a practical problem with this, you should discuss it on the ASDF mailing list or ask a question here. Do you have a practical problem?
This will not help you directly, but may give you some advice on how a system tool usually works.
Example with LispWorks 6 and its own DEFSYSTEM
We have three files in the FOO directory:
RJMBA:foo joswig$ ls -l -rw-r
system.lisp contains the following system description:
(defvar *foo-directory* (make-pathname :name nil :type nil :directory (pathname-directory *load-pathname*) :defaults *load-pathname*)) (defsystem foo (:default-pathname *foo-directory*) :members ("a" "b"))
The above is given the path *foo-directory* based on the path name for the downloaded file. Thus, we can establish the real absolute path, but it is not necessary to specify it manually. Alternatively, we could use relative paths - it depends on what you want to use. I chose this to show how to automatically create an absolute path.
Now I upload this file to LispWorks, then compile the system:
CL-USER 12 > (compile-system 'foo) ;;; Compiling file /Lisp/foo/a.lisp ... ;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1 ;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3 ;;; Source level debugging is on ;;; Source file recording is on ;;; Cross referencing is on ; (TOP-LEVEL-FORM 0) ; (TOP-LEVEL-FORM 1) ;; Processing Cross Reference Information ;;; Compiling file /Lisp/foo/b.lisp ... ;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1 ;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3 ;;; Source level debugging is on ;;; Source file recording is on ;;; Cross referencing is on ; (TOP-LEVEL-FORM 0) ; (TOP-LEVEL-FORM 1) ;; Processing Cross Reference Information (FOO)
We created two fasl files.
Now I copy the system.lisp file and the fasl files to the new directory:
RJMBA:Lisp joswig$ mkdir bar RJMBA:Lisp joswig$ cp foo/system.lisp bar/system.lisp RJMBA:Lisp joswig$ cp foo/a.64xfasl bar/a.64xfasl RJMBA:Lisp joswig$ cp foo/b.64xfasl bar/b.64xfasl
Now I launched the new LispWorks in the b directory, download the system.lisp file and boot the system:
RJMBA:Lisp joswig$ cd bar RJMBA:bar joswig$ lispworks LispWorks(R): The Common Lisp Programming Environment Copyright (C) 1987-2009 LispWorks Ltd. All rights reserved. Version 6.0.0 User joswig on RJMBA.local ... CL-USER 1 > (load "system.lisp") ; Loading text file /Lisp/bar/system.lisp ;; Creating system "FOO"
Ready and working.
Additionally, this can be done using relative directories or the so-called logical paths. Logical paths are mapped from some path to the physical path, thus allowing the use of system-independent paths - regardless of architecture, OS, or directory structures. This provides an additional level of independence from a specific deployment scenario.