如果单个目标有多个配方,则GNU会发出警告。这可以将警告转换为错误以使其更加明显吗?
答案 0 :(得分:0)
我最终修补了GNU make并从源代码重建它(GIT标签4.1):
diff --git a/read.c b/read.c
index 6ff4bcc..f227681 100644
--- a/read.c
+++ b/read.c
@@ -2121,7 +2121,7 @@ record_files (struct nameseq *filenames, const char *pattern,
error (&cmds->fileinfo, l,
_("warning: overriding recipe for target '%s'"),
f->name);
- error (&f->cmds->fileinfo, l,
+ fatal (&f->cmds->fileinfo, l,
_("warning: ignoring old recipe for target '%s'"),
f->name);
}