[m-rev.] for review: fix sub-module build problem

Peter Ross peter.ross at miscrit.be
Fri Nov 16 08:51:44 AEDT 2001


Fergus wrote:
> How about the following?
> 
Looks fine, apart from one point below.

> ----------
> 
> Estimated hours taken: 2
> Branches: main
> 
> When compiling a module which contains a nested sub-module you must
> build the all the dependencies of the sub-module's .int file
> (including, in particular, the parent's .int0) before
> attempting to build the parent's .int file.
> 
> compiler/modules.m:
> When generating the .d file for a submodule,
> generate rules to say that the parent modules' .date files
> depend on same things as the submodule's .int file.
> 
> Workspace: /home/earth/fjh/ws-earth4/mercury
> Index: compiler/modules.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
> retrieving revision 1.205
> diff -u -d -r1.205 modules.m
> --- compiler/modules.m 15 Nov 2001 16:02:14 -0000 1.205
> +++ compiler/modules.m 15 Nov 2001 17:06:41 -0000
> @@ -2043,19 +2043,35 @@
>   "endif"
>   ]),
>  
> + % The .date and .date0 files depend on the .int0 files
> + % for the parent modules, and the .int3 files for the
> + % directly and indirectly imported modules.
> + %
> + % For nested sub-modules, the `.date' files for the
> + % parent modules also depend on the same things as the
> + % `.date' files for this module, since all the `.date'
> + % files will get produced by a single mmc command.
> + % XXX The same is true for the `.date0' files, but
> + % including those dependencies here might result in
> + % cyclic dependencies(?).
> +
>   module_name_to_file_name(ModuleName, ".date", no,
>   DateFileName),
>   module_name_to_file_name(ModuleName, ".date0", no,
>   Date0FileName),
>   io__write_strings(DepStream, [
>   "\n\n", DateFileName, " ",
> - Date0FileName, " : ",
> + Date0FileName
> + ]),
> + write_dependencies_list(ParentDeps, ".date", DepStream),

Shouldn't ".date" be ".int0" as the comment suggests?

> + io__write_strings(DepStream, [
> + " : ",
>   SourceFileName
>   ]),


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