chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] compile-file: options override default options


From: Felix
Subject: [Chicken-hackers] [PATCH] compile-file: options override default options
Date: Fri, 16 Mar 2012 08:52:14 +0100 (CET)

In the attached patch, "compile-file" was changed to allow overriding
the default compilation options (previously the default options were
always added to the options given).


cheers,
felix
>From aa7ec49c16b38fad36b2340d03229e9ec8977778 Mon Sep 17 00:00:00 2001
From: felix <address@hidden>
Date: Sun, 4 Mar 2012 11:53:54 +0100
Subject: [PATCH] options explicitly given to compile-file override default 
options

---
 utils.scm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils.scm b/utils.scm
index 0db5c96..41934bc 100644
--- a/utils.scm
+++ b/utils.scm
@@ -83,14 +83,16 @@
   (let ((csc (foreign-value "C_CSC_PROGRAM" c-string))
        (load-file load)
        (path (foreign-value "C_INSTALL_BIN_HOME" c-string)) )
-    (lambda (filename #!key (options '()) output-file (load #t) verbose)
+    (lambda (filename #!key options output-file (load #t) verbose)
       (let* ((cscpath (or (file-exists? (make-pathname path csc)) "csc"))
             (tmpfile (and (not output-file) (create-temporary-file "so")))
             (crapshell (eq? (build-platform) 'mingw32))
             (cmd (sprintf "~a~a -s ~a ~a -o ~a~a" 
                    (if crapshell "\"" "")
                    (qs cscpath)
-                   (string-intersperse (append (compile-file-options) options) 
" ")
+                   (string-intersperse
+                    (or options
+                        (compile-file-options)))
                    (qs filename)
                    (qs (or output-file tmpfile))
                    (if crapshell "\"" ""))))
-- 
1.6.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]