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

Peter Ross peter.ross at miscrit.be
Thu Nov 15 02:35:30 AEDT 2001


Hi,

I think this solves the problem (well it solves the one I encounter all
the time) of modules containing nested sub-modules failing to build.

===================================================================


Estimated hours taken: 1
Branches: main

When compiling a module which contains a nested sub-module you must
build the .int0 file before attempting to build the .int file.  This is
because while building the .int file you will need the .int0 file to
build the .int file of the nested sub-module.

compiler/modules.m:
    Add the dependency <module>.date : <module>.date0


Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.200
diff -u -r1.200 modules.m
--- compiler/modules.m	6 Nov 2001 15:21:06 -0000	1.200
+++ compiler/modules.m	14 Nov 2001 15:23:37 -0000
@@ -2046,7 +2046,10 @@
 		module_name_to_file_name(ModuleName, ".date0", no,
 						Date0FileName),
 		io__write_strings(DepStream, [
-				"\n\n", DateFileName, " ",
+				"\n\n", DateFileName, " : ", Date0FileName
+		]),
+		io__write_strings(DepStream, [
+				"\n", DateFileName, " ",
 				Date0FileName, " : ",
 				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