Subject: [clisp-list] (compile-file "foo.lisp") deletes foo.c ??

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Wed Mar 19 06:43:05 2003

Hi,

if you want to hear my voice on the subject: I believe it's quite ok for the .c file to share the basename of the lisp file (or the basename of the :output-file argument), even more since Sam's patch which causes .c files to be (overwritten and) generated only when needed.

It's very important however, that this naming and dependency issue be documented. I'm not sure that is documented other than in a sidenote: "(do not call it cfun.lisp - COMPILE-FILE would overwrite cfun.c)"

BTW, the basename also serves to generate the module's C identifiers (__module__xyz__subr_tab[] etc.).

I'm unsure whether hundreds of configuration switches are needed to control every piece of output. It just bloats every software, decreases reliability and costs a lot of code for little benefit (IMHO).
Say yes to flexibility, but I'm not sure that we address flexibility here.

Dan, you're not alone. Even Sam only learnt about this behaviour not too long ago. Witness the following e-mail, from 8th of March 2002:

>> * Honorable "Hoehle, Joerg-Cyril" writes: 
>> o One of dirkey.lisp or dirkey.c should be renamed (like affi|1,
>> foreign|1, rexx|1.{d,lisp}) This will avoid dirkey.c to get
>> overwritten the day dirkey.lisp will contain some FFI definition, when
>> it's supposed to be generated from dirkey.d. Furthermore, makefile
>> (MSVC6.0) get confused and wants to rebuild my dirkey, maybe because
>> of this?? or maybe because somehow dirkey.c disappeared?
>another mystery solved!!! thanks!
>fixed too.
I believe Sam added the mentioned patch as a consequence of this new piece of knowledge...

Regards,
	Jorg Hohle.