[m-rev.] for review: fix intermod-opt dependencies for non-C targets

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jul 28 03:00:07 AEST 2001


For review by Simon Taylor.

Estimated hours taken: 1
Branches: main, release

compiler/modules.m:
	Fix a bug where it wasn't including the right dependencies
	when intermodule optimization was being used and the target
	language was not C.

Workspace: /home/mars/fjh/ws1/mercury
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.179
diff -u -d -r1.179 modules.m
--- compiler/modules.m	2001/07/20 14:14:10	1.179
+++ compiler/modules.m	2001/07/27 16:58:05
@@ -1892,10 +1892,10 @@
 		io__write_strings(DepStream, ["\n\n",
 			OptDateFileName, " ",
 			TransOptDateFileName, " ",
+			ErrFileName, " ",
 			CDateFileName, " ",
 			AsmDateFileName, " ",
 			PicAsmDateFileName, " ",
-			ErrFileName, " ",
 			SplitObjPattern, " ",
 			RLOFileName, " ",
 			ILDateFileName, " : ",
@@ -1923,17 +1923,21 @@
 			Intermod),
 		globals__io_lookup_accumulating_option(intermod_directories,
 			IntermodDirs),
-		( { Intermod = yes; UseOptFiles = yes } ->
+		( { Intermod = yes ; UseOptFiles = yes } ->
 			io__write_strings(DepStream, [
 				"\n\n", 
-				CDateFileName, " ",
 				TransOptDateFileName, " ",
-				ErrFileName, " ", 
-				SplitObjPattern, " :"
+				ErrFileName, " ",
+				CDateFileName, " ",
+				AsmDateFileName, " ",
+				PicAsmDateFileName, " ",
+				SplitObjPattern, " ",
+				RLOFileName, " ",
+				ILDateFileName, " : "
 			]),
 
-			% The .c file only depends on the .opt files from 
-			% the current directory, so that inter-module
+			% The target (e.g. C) file only depends on the .opt files
+			% from  the current directory, so that inter-module
 			% optimization works when the .opt files for the 
 			% library are unavailable. This is only necessary 
 			% because make doesn't allow conditional dependencies.
@@ -1955,9 +1959,13 @@
 					".opt", DepStream),
 				io__write_strings(DepStream, [
 					"\n\n", 
+					ErrFileName, " ",
 					CDateFileName, " ",
-					ErrFileName, " ", 
-					SplitObjPattern, " :"
+					AsmDateFileName, " ",
+					PicAsmDateFileName, " ",
+					SplitObjPattern, " ",
+					RLOFileName, " ",
+					ILDateFileName, " : "
 				]),
 				write_dependencies_list(TransOptDeps,
 					".trans_opt", DepStream)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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