[m-dev.] For review: fix an alt install dir annoyance

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jan 7 17:40:17 AEDT 2000


On 07-Jan-2000, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Added some extra dependencies to the generated `.d' files, so that local
> `.int', `.opt', etc. files shadow the installed versions properly (e.g. for
> when you're trying to build a new version of an already installed library).
...
> (In theory, perhaps this change shouldn't be needed; however, Make has a
> habit of ignoring pattern rules whenever it feels like it.)

It would be better if we understood why those pattern rules
were being ignored (I'm not a big fan of "voodoo" programming ;-).
GNU Make's algorithm is documented; see the "Search Algorithm" section
of the GNU Make documentation.  Is this behaviour a consequence of
that algorithm, or is it a bug in GNU Make?  If the latter, which
versions are affected, and has the bug been reported?

> -# Be very careful about changing the following rules.
> -# The `@:' is a silent do-nothing command.
> -# It is used to force GNU Make to recheck the timestamp
> -# on the target file.  (It is a pity that GNU Make doesn't
> -# have a way of handling these sorts of rules in a nicer manner.)

That comment should remain;
if the places where `@:' is used are different,
then the comment should be moved, not deleted.

Also, with this change in place, should the following
code from extras/clpr/Mmakefile be deleted?

 | # Because the clpr stuff gets installed in the standard ints directory,
 | # which is included in VPATH, if there is an already installed copy,
 | # then `mmake' will use that, even if it is out-of-date.  We need
 | # to add some extra dependencies to prevent this.
 | # (Perhaps these rules should go in the standard Mmake.rules file?)
 | 
 | $(MERCURY_INT_DIR)/%.int : %.date
 |         @:
 | $(MERCURY_INT_DIR)/%.int2 : %.date
 |         @:
 | $(MERCURY_INT_DIR)/%.int3 : %.date3
 |         @:
 | $(MERCURY_INT_DIR)/%.opt : %.optdate
 |         @:
 | $(MERCURY_INT_DIR)/%.trans_opt : %.trans_opt_date
 |         @:

Apart from that, this change looks OK.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- 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