[Ecls-list] Works!
Goffioul Michael
goffioul at imec.be
Fri Oct 21 01:35:12 UTC 2005
> Great. However, I already found several problems in some specific
> situations. One (that I already experienced in another context) is
> a name clash when you want to build a FASL file containing an object
> file with the same name (ex: asdf.lisp, asdf-ecl.lisp -> asdf.fas).
> In that case, the temporary C file generated to collect the object
> files clashes with one of those object file (ex: when building
> asdf.fas, it creates asdf.c, compiles it into asdf.obj, overwriting
> the existing asdf.obj).
>
> So I wonder if it was possible to use randomly generated file names
> for those temporary source files used for collecting the actual
> object files, to avoid any name clash.
Something like the following:
Index: src/cmp/cmpmain.lsp
===================================================================
RCS file: /cvsroot/ecls/ecls/src/cmp/cmpmain.lsp,v
retrieving revision 1.92
diff -u -3 -p -r1.92 cmpmain.lsp
--- src/cmp/cmpmain.lsp 17 Oct 2005 10:29:33 -0000 1.92
+++ src/cmp/cmpmain.lsp 21 Oct 2005 08:31:09 -0000
@@ -232,10 +232,11 @@ main(int argc, char **argv)
funcall(1,_intern(\"TOP-LEVEL\",cl_core.system_package));
cl_shutdown();
return 0;" "")))
- (let* ((c-name (si::coerce-to-filename
- (compile-file-pathname output-name :type :c)))
+ (let* ((tmp-output-name (string (gensym (string output-name))))
+ (c-name (si::coerce-to-filename
+ (compile-file-pathname tmp-output-name :type :c)))
(o-name (si::coerce-to-filename
- (compile-file-pathname output-name :type :object)))
+ (compile-file-pathname tmp-output-name :type :object)))
submodules
c-file)
(dolist (item (reverse lisp-files))
Michael.
More information about the ecl-devel
mailing list