~ chicken-core (chicken-5) 9b2b6bc717ed266f17721444e9ac4e6277aa0c01
commit 9b2b6bc717ed266f17721444e9ac4e6277aa0c01
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Jul 26 10:18:38 2018 +0200
Commit: Kooda <kooda@upyum.com>
CommitDate: Thu Jul 26 19:50:23 2018 +0200
Add component-options egg specification item
Signed-off-by: Kooda <kooda@upyum.com>
diff --git a/chicken-install.scm b/chicken-install.scm
index 8593745c..b455f135 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -192,6 +192,7 @@
(program #f #t #t)
(data #f #t #t)
(modules #f #f #f)
+ (component-options #t #f #f)
(c-include #f #f #t)
(scheme-include #f #f #t)))
diff --git a/egg-compile.scm b/egg-compile.scm
index 91edd3b9..4b6c3cea 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -165,10 +165,10 @@
(tfile #f)
(ptfile #f)
(ifile #f)
- (lopts '())
+ (lopts lopts)
(oname #f)
(mods #f)
- (opts '()))
+ (opts opts))
(for-each compile-extension/program (cddr info))
(let ((dest (destination-repository mode #t))
;; Respect install-name if specified
@@ -263,9 +263,9 @@
(cbuild #f)
(src #f)
(link default-program-linkage)
- (lopts '())
+ (lopts lopts)
(oname #f)
- (opts '()))
+ (opts opts))
(for-each compile-extension/program (cddr info))
(let ((dest (if (eq? mode 'target)
default-bindir ; XXX wrong!
@@ -331,11 +331,18 @@
((files)
(set! files (append files (map ->string (cdr info)))))
(else (compile-common info compile-data/include))))
+ (define (compile-options info)
+ (case (car info)
+ ((csc-options) (set! opts (append opts (cdr info))))
+ ((link-options) (set! lopts (append lopts (cdr info))))
+ (else (error "invalid option specification" info))))
(define (->dep x)
(if (name? x) x (error "invalid dependency" x)))
(define (compile info)
(case (car info)
((components) (for-each compile-component (cdr info)))
+ ((component-options)
+ (for-each compile-options (cdr info)))
(else (compile-common info compile))))
(define (arg info n #!optional (pred (constantly #t)))
(when (< (length info) n)
diff --git a/manual/Egg specification format b/manual/Egg specification format
index 4602515d..a80b63c4 100644
--- a/manual/Egg specification format
+++ b/manual/Egg specification format
@@ -129,6 +129,13 @@ Recursively process {{PROP ...}}, but only for the target
platform, in case this is a "cross-chicken", a CHICKEN installation
intended for cross compilation.
+==== component-options
+
+[egg property] (component-options OPTIONSPEC ...)
+
+Specifies global options for all programs and extensions compiled for this egg.
+{{OPTIONSPEC}} may be {{csc-options}} or {{link-options}} specifications.
+
==== Components
==== extension
Trap