Diff: Fix missing dependency in generated .dep files
Warwick Harvey
wharvey at cs.monash.edu.au
Wed Mar 17 16:32:05 AEDT 1999
I'll commit this once I've tested it. If anybody sees any problems in the
mean time, please speak up.
Estimated hours taken: .5
The generated `.dep' file for a program does not declare the dependency of
the `_init.c' file on the other `.c' files which comprise the program. This
means that with parallel makes (or if, for some reason, make chose to build
its targets in a different order) then make could try to build the `_init.c'
file before all the `.c' files exist. This change fixes this.
compiler/modules.m:
Make the `_init.c' file for a program depend on the `.c' files
comprising that program.
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.96
diff -u -r1.96 modules.m
--- modules.m 1999/02/09 00:27:44 1.96
+++ modules.m 1999/03/17 05:19:28
@@ -2499,7 +2499,7 @@
io__write_string(DepStream, "\n"),
io__write_strings(DepStream, [
- InitCFileName, " : ", DepFileName, "\n",
+ InitCFileName, " : ", DepFileName, " $(", MakeVarName, ")\n",
"\t$(C2INIT) $(ALL_GRADEFLAGS) $(ALL_C2INITFLAGS) $(",
MakeVarName, ".init_cs) > ", InitCFileName, "\n\n"
]),
More information about the developers
mailing list