chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] always use temporary filenames in csc


From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH] always use temporary filenames in csc
Date: Wed, 07 Nov 2012 14:44:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On Wed, 7 Nov 2012 12:29:34 -0700 ".alyn.post." <address@hidden> wrote:

> It would nice if create-temporary-file also accepted a prefix
> option, so that file.scm compiled to something like file-XXXXX.scm,
> rather than XXXXX.scm.
>
> Such a thing shouldn't hold up this patch, but it would make it
> easier to sort out the results from the -k (keep) option and others
> flags like it.

How about just showing what files were generated?  Something like:

$ git diff
diff --git a/csc.scm b/csc.scm
index 7bc2a48..28adbec 100644
--- a/csc.scm
+++ b/csc.scm
@@ -880,9 +880,13 @@ EOF
         (set! ofiles (cons fo ofiles))))
      rc-files)
     (set! object-files (append (reverse ofiles) object-files)) ; put
     generated object files first
-    (unless keep-files 
-      (for-each $delete-file generated-c-files)
-      (for-each $delete-file generated-rc-files))))
+    (cond (keep-files
+           (print "The following files have been generated:")
+           (for-each print generated-c-files)
+           (for-each print generated-rc-files))
+          (else
+           (for-each $delete-file generated-c-files)
+           (for-each $delete-file generated-rc-files)))))
 
 (define (compiler-options)
   (string-intersperse


Attached is Felix's patch amended in case you think that suggestion
makes sense.

Best wishes.
Mario
-- 
http://parenteses.org/mario

Attachment: 0001-use-temporary-files-in-csc-where-possible.patch
Description: Text Data


reply via email to

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