[m-rev.] for review: don't search for source files

Simon Taylor stayl at cs.mu.OZ.AU
Wed Apr 17 16:56:05 AEST 2002


Estimated hours taken: 0.1

compiler/mercury_compile.m:
	Don't search for source files. This avoids creating interface
	files for the library in the compiler directory if you modify
	a module in the library but forget to recompile it.

Index: mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.245
diff -u -u -r1.245 mercury_compile.m
--- mercury_compile.m	15 Apr 2002 05:04:06 -0000	1.245
+++ mercury_compile.m	16 Apr 2002 15:47:07 -0000
@@ -564,7 +564,11 @@
 		{ MaybeTimestamp = MaybeTimestamp0 }
 	;
 		{ ReadModules = ReadModules0 },
-		read_mod(ModuleName, ".m", "Reading module", yes,
+		% We don't search `--search-directories' for source files
+		% because that can result in the generated interface files
+		% being created in the wrong directory.
+		{ Search = no },
+		read_mod(ModuleName, ".m", "Reading module", Search,
 			ReturnTimestamp, Items, Error, FileName,
 			MaybeTimestamp)
 	),
@@ -591,7 +595,11 @@
 		{ MaybeTimestamp = MaybeTimestamp0 }
 	;
 		{ ReadModules = ReadModules0 },
-		read_mod_from_file(FileName, ".m", "Reading file", yes,
+		% We don't search `--search-directories' for source files
+		% because that can result in the generated interface files
+		% being created in the wrong directory.
+		{ Search = no },
+		read_mod_from_file(FileName, ".m", "Reading file", Search,
 			ReturnTimestamp, Items, Error, ModuleName,
 			MaybeTimestamp),
 
--------------------------------------------------------------------------
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