From 37ebd8f8d58b52b46f2b1fdf430235e2444a19ab Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Wed, 10 Aug 2022 15:52:06 -0700 Subject: [PATCH] Don't generate output file for .PHONY targets --- third_party/make/job.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/make/job.c b/third_party/make/job.c index 54627d3ed..eee14dfda 100644 --- a/third_party/make/job.c +++ b/third_party/make/job.c @@ -1807,7 +1807,8 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv) * creation so that it can't be deleted by the command which * must truncate when writing its output. */ - if (strlen(c->file->name) < PATH_MAX) + if (!c->file->phony && + strlen(c->file->name) < PATH_MAX) { int fd, rc, err = errno; strcpy (outpathbuf, c->file->name);