From 0e750f785eb9d4151aa3850e162ab424d9641750 Mon Sep 17 00:00:00 2001
From: Juan Jose Garcia Ripoll <jjgarcia@users.sourceforge.net>
Date: Mon, 1 Aug 2011 21:48:29 +0200
Subject: [PATCH 5/5] In asdf.lisp, distinguish between the two compilers that
 ECL offers: bytecodes compiler and lisp->C translator:
 only the later produces two files.

---
 asdf.lisp |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/asdf.lisp b/asdf.lisp
index 1a160e6..6350a84 100755
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -61,7 +61,7 @@
   (setf excl::*autoload-package-name-alist*
         (remove "asdf" excl::*autoload-package-name-alist*
                 :test 'equalp :key 'car)) ; need that BEFORE any mention of package ASDF as below
-  #+(and ecl (not ecl-bytecmp)) (require :cmp)
+  #+ecl (unless (member :ecl-bytecmp *features*) (require :cmp))
   #+gcl ;; Debian's GCL 2.7 has bugs with compiling multiple-value stuff, but can run ASDF 2.011
   (when (or (< system::*gcl-major-version* 2) ;; GCL 2.6 fails to fully compile ASDF at all
             (and (= system::*gcl-major-version* 2)
@@ -4044,20 +4044,25 @@ with a different configuration, so the configuration would be re-read then."
   (setf *compile-op-compile-file-function*
         (lambda (input-file &rest keys &key output-file &allow-other-keys)
           (declare (ignore output-file))
-          (multiple-value-bind (object-file flags1 flags2)
-              (apply 'compile-file* input-file :system-p t keys)
-            (values (and object-file
-                         (c::build-fasl (compile-file-pathname object-file :type :fasl)
-                                        :lisp-files (list object-file))
-                         object-file)
-                    flags1
-                    flags2))))
+          (if (member :ecl-bytecmp *features*)
+              (apply 'compile-file input-file keys)
+              (multiple-value-bind (object-file flags1 flags2)
+                  (apply 'compile-file* input-file :system-p t keys)
+                (values (and object-file
+                             (c::build-fasl (compile-file-pathname object-file :type :fasl)
+                                            :lisp-files (list object-file))
+                             object-file)
+                        flags1
+                        flags2)))))
+  
 
   (defmethod output-files ((operation compile-op) (c cl-source-file))
     (declare (ignorable operation))
-    (let ((p (lispize-pathname (component-pathname c))))
-      (list (compile-file-pathname p :type :object)
-            (compile-file-pathname p :type :fasl))))
+    (let* ((p (lispize-pathname (component-pathname c)))
+           (f (compile-file-pathname p :type :fasl)))
+      (if (member :ecl-bytecmp *features*)
+          (list f)
+          (list (compile-file-pathname p :type :object) f))))
 
   (defmethod perform ((o load-op) (c cl-source-file))
     (map () #'load
-- 
1.7.6

