~ chicken-core (chicken-5) 3eaa4f4d6ae7b1531d2012db23b653daa833f502


commit 3eaa4f4d6ae7b1531d2012db23b653daa833f502
Author:     Kooda <kooda@upyum.com>
AuthorDate: Sat Oct 21 22:18:03 2017 +0200
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sat Oct 28 17:41:06 2017 +0200

    Use the correct output file extension when using csc -c
    
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/csc.scm b/csc.scm
index a4f8f9ac..c24ec836 100644
--- a/csc.scm
+++ b/csc.scm
@@ -558,9 +558,9 @@ EOF
 		    (set! translate-options (cons "-dynamic" translate-options)) )
 		  (unless target-filename
 		    (set! target-filename
-		      (if shared
-			  (pathname-replace-extension (first scheme-files) shared-library-extension)
-			  (pathname-replace-extension (first scheme-files) executable-extension) ) ) )
+		      (cond (shared (pathname-replace-extension (first scheme-files) shared-library-extension))
+			    (compile-only (pathname-replace-extension (first scheme-files) object-extension))
+			    (else (pathname-replace-extension (first scheme-files) executable-extension)) ) ) )
 		  (run-translation) ] )
 	   (unless translate-only 
 	     (run-compilation)
Trap