I was wondering if anyone has given any thoughts on adding compile
options to defsystem.
My defsystem looks something like this:
;; Convert a Fortran file to Lisp and compile the Lisp file.
(defun f2cl-compile (filename &key output-file error-file)
(compile-file (f2cl filename) :output-file output-file :error-file error-file))
(defun f2cl-compile-no-slice (filename &key output-file error-file)
(compile-file (f2cl filename :array-slicing nil :array-type 'array)
:output-file output-file :error-file error-file))
(mk:define-language :f2cl
:compiler #'f2cl-compile
:source-extension "f")
(mk:define-language :f2cl-no-slice
:compiler #'f2cl-compile-no-slice
:source-extension "f")
(mk:defsystem quadpack
:source-pathname (logical-pathname "clocc:src;f2cl;packages;quadpack;")
:depends-on ("mach-par")
:components
((:module Fortran
:source-pathname "Fortran;"
:binary-pathname "lib;"
:source-extension "f"
:language :f2cl
:components
(
(:file "dqagse"
:depends-on ("dqk21"
"dqelg"
"dqpsrt"))
(:file "dqawfe"
;; DQAWFE calls DQAWO with array elements, not
;; slices, so don't compile with slicing on.
:language :f2cl-no-slice
:depends-on ("dqagie"
"dqawoe"
"dqelg"))))))
The main difference between these languages is that :f2cl-no-slice
calls f2cl with :array-slicing nil and :array-type 'array.
It would be nice if there were an option, say, :compile-options where
I could specify appropriate options to the compiler. Then I could
have just one f2cl compiler and I could say
(:file "dqawfe"
:compiler-options (:array-slicing nil :array-type 'array)
:depends-on ...)
Then "dqawfe" would get compiled by calling
(f2cl "dqawfe" :array-slicing nil :array-type 'array)
What do people think about this?
Ray
|