From faf0d38e40e099eebccac4013ab2692e545f612e Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 12 Sep 2023 08:43:30 +0100 Subject: make: avoid more warnings The tracking of progress introduced in commit fb4be267c (make: fixes to warning messages) failed to account for runs with the '-t' or '-n' options. Without this the following makefile: dummy_target: dummy_rule dummy_rule: @: issues the warning 'make: nothing to be done for dummy_target' when run with '-t' or '-n' and no 'dummy_rule' file present. (GitHub issue #354) --- miscutils/make.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miscutils/make.c b/miscutils/make.c index 08b9d806e..d554a5f7f 100644 --- a/miscutils/make.c +++ b/miscutils/make.c @@ -2165,7 +2165,6 @@ docmds(struct name *np, struct cmd *cp) target = np; status = system(cmd); target = NULL; - estat = MAKE_DIDSOMETHING; // If this command was being run to create an include file // or bring it up-to-date errors should be ignored and a // failure status returned. @@ -2184,6 +2183,8 @@ docmds(struct name *np, struct cmd *cp) exit(status); } } + if (sdomake || dryrun || dotouch) + estat = MAKE_DIDSOMETHING; free(command); } makefile = NULL; -- cgit v1.2.3-55-g6feb