[m-rev.] for prelim review: "Recursive make considered harmful" support

Peter Ross pro at missioncriticalit.com
Thu Nov 10 19:47:14 AEDT 2005


On Thu, Nov 10, 2005 at 01:55:34PM +1100, Zoltan Somogyi wrote:
> On 09-Nov-2005, Peter Ross <pro at missioncriticalit.com> wrote:
> > This consists of two parts, giving mmake the optional ability to ignore
> > the .d files in the current directory.  The second part is adding
> > support to the compiler to write out just the .d file.
> 
> Have you explored the following possibilities? They both seem simpler to me,
> and more robust, than what you are doing now.
> 
> - Have a file in the top level directory that lists all the directories
>   that may store .d files. When invoking mmake in that directory, include
>   all the .d files in all these directories, not just the ones in the current
>   directory.
> 
The advantage of the current scheme is that one always gets the most
up-to-date dependencies (plus no need for mmake depend), this wouldn't
be true of the scheme you give as you would always be one version
behind.

I prefer to automatically have the most up-to-date dependencies.


> - Add a new option to mmc that specified the name of the directory into which
>   .d files should be put. You can then set up an Mmake variable to specify
>   the name of the top level directory in all invocations.
> 
For me the best solution is to extract the directory part of the
filename to compile and place the .d file always in that directory.
If there is not directory part then use the current directory.

eg "mmc --compile-to-c ant/a.m" and "mmc --generate-dependency-file ant/a.m" 
both place a.d into the ant directory.

Thus avoiding needing to add an extra argument.

This however changes the semantics of how the compiler works now, but I
doubt anyone else relies on these semantics.
--------------------------------------------------------------------------
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