Commit 01aa2ff4 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Fix ECL bundle and tests

Push monolithic-op to the back of inheritance, to preserve class-allocated
slot bundle-type slot in a class in front of the inheritance list.

Now that make-build was remove,
adjust some ECL tests to use program-op instead.
parent 0221e198
......@@ -35,7 +35,7 @@ concatenate together a system's components and all of its dependencies, but a
simple concatenate operation will concatenate only the components of the system
itself."))
(defclass monolithic-bundle-op (monolithic-op bundle-op)
(defclass monolithic-bundle-op (bundle-op monolithic-op)
;; Old style way of specifying prologue and epilogue on ECL: in the monolithic operation.
;; DEPRECATED. Supported replacement: Define slots on program-system instead.
((prologue-code :initform nil :accessor prologue-code)
......@@ -165,7 +165,7 @@ for all the linkable object files associated with the system. Compare with LIB-O
(:documentation "produce an asd file for delivering the system as a single fasl"))
(defclass monolithic-deliver-asd-op (monolithic-bundle-op deliver-asd-op)
(defclass monolithic-deliver-asd-op (deliver-asd-op monolithic-bundle-op)
((selfward-operation
;; TODO: implement link-op on all implementations, and make that
;; '(monolithic-compile-bundle-op monolithic-lib-op #-(or clasp ecl mkcl) monolithic-dll-op)
......@@ -174,7 +174,7 @@ for all the linkable object files associated with the system. Compare with LIB-O
(:documentation "produce fasl and asd files for combined system and dependencies."))
(defclass monolithic-compile-bundle-op
(monolithic-bundle-op basic-compile-bundle-op
(basic-compile-bundle-op monolithic-bundle-op
#+(or clasp ecl mkcl) link-op gather-operation non-propagating-operation)
((gather-operation
:initform #-(or clasp ecl mkcl) 'compile-bundle-op #+(or clasp ecl mkcl) 'lib-op
......@@ -184,16 +184,16 @@ for all the linkable object files associated with the system. Compare with LIB-O
:allocation :class))
(:documentation "Create a single fasl for the system and its dependencies."))
(defclass monolithic-load-bundle-op (monolithic-bundle-op load-bundle-op)
(defclass monolithic-load-bundle-op (load-bundle-op monolithic-bundle-op)
((selfward-operation :initform 'monolithic-compile-bundle-op :allocation :class))
(:documentation "Load a single fasl for the system and its dependencies."))
(defclass monolithic-lib-op (monolithic-bundle-op lib-op non-propagating-operation)
(defclass monolithic-lib-op (lib-op monolithic-bundle-op non-propagating-operation)
((gather-type :initform :static-library :allocation :class))
(:documentation "Compile the system and produce a linkable static library (.a/.lib)
for all the linkable object files associated with the system or its dependencies. See LIB-OP."))
(defclass monolithic-dll-op (monolithic-bundle-op dll-op non-propagating-operation)
(defclass monolithic-dll-op (dll-op monolithic-bundle-op non-propagating-operation)
((gather-type :initform :static-library :allocation :class))
(:documentation "Compile the system and produce a dynamic loadable library (.so/.dll)
for all the linkable object files associated with the system or its dependencies. See LIB-OP"))
......
......@@ -4,5 +4,4 @@
(ffi::def-foreign-var ("hello_string" +hello-string+) (* :char) nil)
(print (ffi:convert-from-foreign-string +hello-string+))
(princ (ffi:convert-from-foreign-string +hello-string+))
(defsystem #:hellow
:serial t
:components ((:file "hello")))
(defsystem "hellow"
:components ((:file "hello"))
:class program-system
:build-operation program-op
:build-pathname "hellow"
:prologue-code "printf(\"Good morning sunshine!\\n\");fflush(stdout);"
:epilogue-code (progn
(format t "~%Good bye sunshine.~%")
(ext:quit 0))
:no-uiop t
:extra-build-args (:ld-flags #.(list (namestring (compile-file-pathname "hello_aux.c" :type :object)))))
......@@ -49,20 +49,7 @@
:defaults *load-truename*)
asdf:*central-registry*)
(asdf:make-build :hellow
:type :program
:move-here "./"
:prologue-code "printf(\"Good morning sunshine!\");"
:epilogue-code '(progn
(format t "~%Good bye sunshine.~%")
(ext:quit 0))
:ld-flags
(list (namestring (compile-file-pathname "hello_aux.c" :type :object))))
;; This doesn't seem to work
;; (asdf:operate 'asdf:program-op :hellow
;; :ld-flags
;; (list (namestring (compile-file-pathname "hello_aux.c" :type :object))))
(asdf:make "hellow")
;;
;; * Test the program
......
(asdf:defsystem #:hellow
:serial t
:depends-on (#:asdf)
:components ((:file "hello")))
(defsystem "hellow"
:depends-on ("asdf")
:components ((:file "hello"))
:class program-system
:build-operation program-op
:build-pathname "hellow"
:prologue-code "printf(\"Good morning sunshine!\");fflush(stdout);"
:epilogue-code (progn (format t "~%Good bye sunshine.~%") (ext:quit 0)))
......@@ -31,13 +31,7 @@
:defaults *load-truename*)
asdf:*central-registry*)
(asdf:make-build :hellow
:type :program
:move-here "./"
:prologue-code "printf(\"Good morning sunshine!\");"
:epilogue-code '(progn
(format t "~%Good bye sunshine.~%")
(ext:quit 0)))
(asdf:make "hellow")
;;
;; * Test the program
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment