diff: fix another fact tables .dep bug

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 9 10:20:12 AEDT 1999


Estimated hours taken: 0.5

compiler/modules.m:
	Fix a bug with the arguments passed to c2init by the generated `.dep'
	file when using fact tables: it should not pass the fact table `.c'
	files to c2init, because the fact table `.c' files do not have
	(or need) any initialization function.

Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.94
diff -u -r1.94 modules.m
--- modules.m	1999/02/08 22:40:56	1.94
+++ modules.m	1999/02/08 22:59:17
@@ -2275,9 +2275,15 @@
 	io__write_string(DepStream, "\n"),
 
 	io__write_string(DepStream, MakeVarName),
-	io__write_string(DepStream, ".cs = "),
+	io__write_string(DepStream, ".init_cs = "),
 	write_compact_dependencies_list(Modules, "$(cs_subdir)", ".c",
 					Basis, DepStream),
+	io__write_string(DepStream, "\n"),
+
+	io__write_string(DepStream, MakeVarName),
+	io__write_string(DepStream, ".cs = $("),
+	io__write_string(DepStream, MakeVarName),
+	io__write_string(DepStream, ".init_cs) "),
 	write_extra_link_dependencies_list(ExtraLinkObjs, ".c", DepStream),
 	io__write_string(DepStream, "\n"),
 
@@ -2495,7 +2501,7 @@
 	io__write_strings(DepStream, [
 		InitCFileName, " : ", DepFileName, "\n",
 		"\t$(C2INIT) $(ALL_GRADEFLAGS) $(ALL_C2INITFLAGS) $(",
-			MakeVarName, ".cs) > ", InitCFileName, "\n\n"
+			MakeVarName, ".init_cs) > ", InitCFileName, "\n\n"
 	]),
 
 	module_name_to_file_name(SourceModuleName, ".nu", yes, NU_ExeFileName),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list