chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] separate compilation


From: John Cowan
Subject: Re: [Chicken-users] separate compilation
Date: Sat, 22 Nov 2008 18:38:06 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

Jörg F. Wittenberger scripsit:

> I noticed that the .import.scm files are overwritten, whenever the
> associated .scm file is compiled.

That's because they are object files from the point of view of
compilation; the fact that they are textual doesn't make any difference.

> This defeats separate compilation of modules.  If the (any) file holding
> the exports where updated only if it's content really changed, it would
> be useful in Makefiles to suppress superfluous compiler runs while
> triggering those, which are really required.  As things are now, I can
> either make my build depend on the files containing the exports or the
> object files.  In any case, I'll have to compile too much.

A compiler run should depend only on source files, never on object files
of either type; if it does, you have introduced a dependency on the order
of compilation that shouldn't exist.  In other words, you may have to
recompile a file if the source of some other file has changed, but never
because the object file (.o or .import.scm) has changed.

The only files that should depend on object files are executables.

> Side note: if there where any kind of file going to record the
> last-modified-time of exports, that's perfect.  

The source file of the export is precisely what records that, which is
why you should depend on it.

-- 
All Norstrilians knew what laughter was:        John Cowan
it was "pleasurable corrigible malfunction".    address@hidden
        --Cordwainer Smith, Norstrilia




reply via email to

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