Skip to content
Snippets Groups Projects
Commit 78e67588 authored by ram's avatar ram
Browse files

Changed COMF to allow any COMPILE-FILE options to be passed through. Changed

CAT-IF-ANYTHING-CHANGED to look for .bytef's as well as native fasls.
parent 3c272d5b
No related branches found
No related tags found
No related merge requests found
...@@ -152,21 +152,16 @@ ...@@ -152,21 +152,16 @@
(close *log-file*))))) (close *log-file*)))))
(defun comf (name &key always-once proceed load output-file assem) (defun comf (name &rest keys &key proceed assem &allow-other-keys)
(declare (ignore always-once))
(when (and *log-file* (when (and *log-file*
(> (- (file-position *log-file*) *last-file-position*) 10000)) (> (- (file-position *log-file*) *last-file-position*) 10000))
(setq *last-file-position* (file-position *log-file*)) (setq *last-file-position* (file-position *log-file*))
(force-output *log-file*)) (force-output *log-file*))
(let* ((src (merge-pathnames name (make-pathname :type "lisp"))) (let* ((src (merge-pathnames name (make-pathname :type "lisp")))
(obj (if output-file (obj (if assem
(pathname output-file) (make-pathname :defaults src :type "assem")
(make-pathname :defaults src (apply #'compile-file-pathname src keys))))
:type
(if assem
"assem"
(c:backend-fasl-file-type c:*backend*))))))
(unless (and (probe-file obj) (unless (and (probe-file obj)
(>= (file-write-date obj) (file-write-date src))) (>= (file-write-date obj) (file-write-date src)))
...@@ -181,9 +176,7 @@ ...@@ -181,9 +176,7 @@
(*interactive* (*interactive*
(if assem (if assem
(c::assemble-file src :output-file obj) (c::assemble-file src :output-file obj)
(compile-file src :error-file nil :output-file obj)) (apply #'compile-file src :allow-other-keys t keys)))
(when load
(load obj :verbose t)))
(t (t
(handler-bind (handler-bind
((error #'(lambda (condition) ((error #'(lambda (condition)
...@@ -204,9 +197,7 @@ ...@@ -204,9 +197,7 @@
(return-from comf))))) (return-from comf)))))
(if assem (if assem
(c::assemble-file src :output-file obj) (c::assemble-file src :output-file obj)
(compile-file src :error-file nil :output-file obj)) (apply #'compile-file src :allow-other-keys t keys))))))))))
(when load
(load obj :verbose t))))))))))
...@@ -214,8 +205,13 @@ ...@@ -214,8 +205,13 @@
(defun cat-if-anything-changed (output-file &rest input-files) (defun cat-if-anything-changed (output-file &rest input-files)
(flet ((add-correct-type (pathname) (flet ((add-correct-type (pathname)
(make-pathname :type (c:backend-fasl-file-type c:*target-backend*) (or (probe-file
:defaults pathname))) (make-pathname :type (c:backend-byte-fasl-file-type
c:*target-backend*)
:defaults pathname))
(make-pathname :type (c:backend-fasl-file-type
c:*target-backend*)
:defaults pathname))))
(let* ((output-file (add-correct-type output-file)) (let* ((output-file (add-correct-type output-file))
(write-date (file-write-date output-file)) (write-date (file-write-date output-file))
(input-namestrings (input-namestrings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment