~ chicken-core (chicken-5) 0221f15c52e3bc244019907161007d2f4c52aee2


commit 0221f15c52e3bc244019907161007d2f4c52aee2
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sat Jan 16 15:54:42 2016 +0100
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Thu Jan 21 19:19:57 2016 +0100

    Fix double quote wrapping of libs in csc.
    
    Prefix should not wrap its argument in a call to "quotewrap", because
    copy-libraries will use (target-lib-path), which will then be quoted,
    passing it on to copy-files which will quote it once again.
    
    This would break csc -deploy when copying libchicken.
    
    Bug was introduced in edd4926bb4f4c97760a0e03b0d0e8210398fe967
    (master) and 3246aa817f342578e541bcdc2ac1dcb8fbe300f2 (chicken-5).
    
    Signed-off-by: Mario Domenech Goulart <mario.goulart@gmail.com>
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/csc.scm b/csc.scm
index 0285938e..29aa634e 100644
--- a/csc.scm
+++ b/csc.scm
@@ -92,10 +92,9 @@
 (define cross-chicken (##sys#fudge 39))
 
 (define (prefix str dir default)
-  (quotewrap
-   (if chicken-prefix
-       (make-pathname (list chicken-prefix dir) str)
-       default) ))
+  (if chicken-prefix
+      (make-pathname (list chicken-prefix dir) str)
+      default) )
 
 (define (back-slash->forward-slash path)
   (if windows-shell
@@ -112,10 +111,11 @@
   (prefix "" "share" (if host-mode INSTALL_SHARE_HOME TARGET_SHARE_HOME)))
 
 (define translator
-  (prefix "chicken" "bin"
-	  (make-pathname
-	   INSTALL_BIN_HOME
-	   CHICKEN_PROGRAM)))
+  (quotewrap
+   (prefix "chicken" "bin"
+	   (make-pathname
+	    INSTALL_BIN_HOME
+	    CHICKEN_PROGRAM))))
 
 (define compiler (quotewrap (if host-mode INSTALL_CC TARGET_CC)))
 (define c++-compiler (quotewrap (if host-mode INSTALL_CXX TARGET_CXX)))
@@ -279,10 +279,11 @@
 	   (conc " -Wl,-R"
 		 (if deployed
 		     "\\$ORIGIN"
-		     (prefix "" "lib"
-			     (if host-mode
-				 INSTALL_LIB_HOME
-				 TARGET_RUN_LIB_HOME))))))
+		     (quotewrap
+		      (prefix "" "lib"
+			      (if host-mode
+				  INSTALL_LIB_HOME
+				  TARGET_RUN_LIB_HOME)))))))
 	 (aix
 	  (list (conc "-Wl,-R\"" library-dir "\"")))
 	 (else
Trap