~evhan/beaker

3c96b673552d7a06d04db4592f42628120404fcb — Evan Hanson 3 months ago 284f599
Allow chicken-install flags to be passed to load-system
1 files changed, 5 insertions(+), 5 deletions(-)

M lib/beaker/system.scm
M lib/beaker/system.scm => lib/beaker/system.scm +5 -5
@@ 91,13 91,13 @@
;;
;; Compiles all out-of-date components for the given egg.
;;
;; This is equivalent to running `chicken-install -no-install`.
;; This is equivalent to running `chicken-install -no-install [flags ...]`.
;;
(define (compile-system egg-file)
(define (compile-system egg-file #!key (flags '()))
  (with-current-directory
   (egg-path egg-file)
   (lambda ()
     (receive (_ _ status) (process-wait (process-run (chicken-install) (list "-no-install")))
     (receive (_ _ status) (process-wait (process-run (chicken-install) (cons "-no-install" flags)))
       (unless (zero? status)
         (signal (condition '(exn message "failed to compile system"))))))))



@@ 127,8 127,8 @@
;; Subsequent calls cause the components to be recompiled and reloaded
;; as necessary.
;;
(define (load-system #!optional (egg-file ".") #!key (skip '()))
  (compile-system egg-file)
(define (load-system #!optional (egg-file ".") #!key (skip '()) (flags '()))
  (compile-system egg-file flags: flags)
  (for-each (lambda (x)
              (unless (memq x skip)
                (load-extension egg-file x "import.so")))