Created
February 10, 2013 07:51
-
-
Save uebayasi/4748836 to your computer and use it in GitHub Desktop.
This makes NetBSD's make(1) behaviour when encountering stale depend from only printing error and continuing build, to exiting build. Stale dependency should be considred as an erroneous state of build (object) tree.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: usr.bin/make/dir.c | |
=================================================================== | |
RCS file: /cvsroot/src/usr.bin/make/dir.c,v | |
retrieving revision 1.65 | |
diff -u -p -r1.65 dir.c | |
--- usr.bin/make/dir.c 12 Jun 2012 19:21:50 -0000 1.65 | |
+++ usr.bin/make/dir.c 10 Feb 2013 06:45:36 -0000 | |
@@ -1463,9 +1463,15 @@ Dir_MTime(GNode *gn, Boolean recheck) | |
* so that we give that to the compiler. | |
*/ | |
gn->path = bmake_strdup(fullName); | |
+#ifdef XXX_IGNORE_STALE_DEPEND | |
fprintf(stdout, | |
"%s: ignoring stale %s for %s, found %s\n", | |
progname, makeDependfile, gn->name, fullName); | |
+#else | |
+ Error("Stale %s for %s, found %s", makeDependfile, | |
+ gn->name, fullName); | |
+ exit(1); | |
+#endif | |
} | |
} | |
} | |
Index: usr.bin/make/job.c | |
=================================================================== | |
RCS file: /cvsroot/src/usr.bin/make/job.c,v | |
retrieving revision 1.169 | |
diff -u -p -r1.169 job.c | |
--- usr.bin/make/job.c 6 Feb 2013 16:36:01 -0000 1.169 | |
+++ usr.bin/make/job.c 10 Feb 2013 06:45:36 -0000 | |
@@ -1232,9 +1232,14 @@ Job_CheckCommands(GNode *gn, void (*abor | |
static const char msg[] = ": don't know how to make"; | |
if (gn->flags & FROM_DEPEND) { | |
+#ifdef XXX_IGNORE_STALE_DEPEND | |
fprintf(stdout, "%s: ignoring stale %s for %s\n", | |
progname, makeDependfile, gn->name); | |
return TRUE; | |
+#else | |
+ Error("Stale %s for %s\n", makeDependfile, gn->name); | |
+ exit(1); | |
+#endif | |
} | |
if (gn->type & OP_OPTIONAL) { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment