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

Peter Ross peter.ross at miscrit.be
Sun Feb 17 05:18:46 AEDT 2002


Hi,


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


Estimated hours taken: 3
Branches: main

Ensure that before attempting to build a parent module of a nested
sub-module that we have built all the dependencies of that sub-module.
This is because the call to build the parent module will also build
the nested sub-module so all the dependencies better exist or the build
will fail.

compiler/modules.m:
    Add dependencies between the parent module build targets and the
    sub-module dependencies.

Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.217
diff -u -r1.217 modules.m
--- compiler/modules.m	15 Feb 2002 09:25:05 -0000	1.217
+++ compiler/modules.m	16 Feb 2002 18:08:01 -0000
@@ -1919,11 +1919,20 @@
 			PicAsmDateFileName, " ",
 			SplitObjPattern, " ",
 			RLOFileName, " ",
-			ILDateFileName, " : ",
-			SourceFileName
+			ILDateFileName
 		] ),
+		write_dependencies_list(ParentDeps, ".optdate", DepStream),
+		write_dependencies_list(ParentDeps,
+				".trans_opt_date", DepStream),
+		write_dependencies_list(ParentDeps, ".c_date", DepStream),
+		write_dependencies_list(ParentDeps, ".s_date", DepStream),
+		write_dependencies_list(ParentDeps, ".pic_s_date", DepStream),
+		write_dependencies_list(ParentDeps, ".dir/*.$O", DepStream),
+		write_dependencies_list(ParentDeps, ".rlo", DepStream),
+		write_dependencies_list(ParentDeps, ".il_date", DepStream),
+		io__write_strings(DepStream, [" : ", SourceFileName]),
 		% If the module contains nested sub-modules then `.int0'
 		% file must first be built.
 		( { InclDeps = [_ | _] } ->
 			io__write_strings(DepStream, [" ", Int0FileName])
 		;

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