[m-rev.] diff: fix hlc header file dependencies
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Aug 8 05:23:49 AEST 2001
On 08-Aug-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 08-Aug-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 08-Aug-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > >
> > > compiler/modules.m:
> > > Fix another bug in the `.c_date' file change.
> > > The `.h' file for high-level C code grades should depend
> > > on the `.c' file for the module, not the `.c_date' file.
> >
> > Why?
> >
> > (No doubt your change is correct, but I'd like to understand it better.)
>
> I'm not sure why the old rule caused compilation errors
> (the compiler was attempting to create the `.o' file for a module
> before all of the `.h' files for imported modules had been created),
It's generally a good idea to understand why a bug is happening before
trying to fix it.
> Even if it hadn't caused errors, it would cause unnecessary
> C compilations.
How so?
> By the way, do we need to add a datestamp file for the `.h' files
> with high-level C code to avoid unnecessarily recreating the `.o'
> files for importing moules when a module is recompiled but the
> header file is unchanged?
I don't think so. mlds_to_c uses `update_interface' to create the header file,
so the date stamp on the header file won't be changed unless the header file
has changed. Make may attempt to remake the `.h' file but the rule for
that is already an empty rule.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list