[m-dev.] Mmake unnecessary recompilation bug

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Feb 7 23:40:36 AEDT 2004

On 07-Feb-2004, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 07-Feb-2004, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > As a result of Simon's recent changes, *.o now depends on *.mh.
> > 
> > The .mh files get regenerated at every compilation, and since we don't
> > have .mhdate files, this forces *.o to get rebuilt every time you run
> > Mmake, even if the .mh files haven't changed.
> > 
> > I suppose the simplest fix would be to add .mhdate files.
> Unless I'm missing something, I think the problem is that the `.mh' files
> aren't created using modules.update_interface (the `.mih' files are).

Ah, yes, you're right.

In general it's not enough to just use update_interface, a timestamp
file is also required.  But for the .mh and .mih files, the timestamp
is the .c_date file.

(Without a date stamp, you would run into issues where every time you
run mmake, notice that foo.m is newer than foo.mh, and so try to remake
foo.mh, but the new copy is the same, so foo.mh is left unchanged,
and then it all happens the same way again next time you run mmake.)

Anyway, I have implemented your suggestion and will post a diff
to mercury-reviews shortly.

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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list