[m-rev.] diff: fix hlc header file dependencies

Simon Taylor stayl at cs.mu.OZ.AU
Thu Aug 9 02:57:39 AEST 2001


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:
> > 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.

Actually, that change didn't fix the problem. It's just another instance
of the problem of the dependencies for nested sub-modules not working
properly. I may end up having to just disable the test case.
 
> > Even if it hadn't caused errors, it would cause unnecessary
> > C compilations.
> 
> How so?

It doesn't, I was wrong.

The change does make the handling of the dependency of the `.h' file
on the `.c' file more consistent with the way other similar dependencies
are handled. For example targets usually depend on the `.int' file
rather than the `.date' file.

Simon.
--------------------------------------------------------------------------
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