commit 99e9cc2d229fd4da66cbd9b75d4bc1340647f6cd
parent 2fdfb94cb05816f214b6f7b45c915c329b08045f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 18 Jan 2024 10:16:36 +0100
make: Update exitstate in lines with +
When the option -q is used if a line has the + modified then that
line has to be actually executed and the value of exitstatus
has to be updated only based in the result of the operations
executed.
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/cmd/make/rules.c b/src/cmd/make/rules.c
@@ -202,8 +202,11 @@ out_loop:
fflush(stdout);
}
- if ((nflag || qflag) && !plus)
+ if ((nflag || qflag) && !plus) {
+ if (qflag)
+ exitstatus = 1;
return 0;
+ }
if (minus || iflag || ignore)
ignore = 1;
@@ -517,9 +520,5 @@ build(char *name)
debug("checking target %s'", name);
build = 0;
- r = rebuild(lookup(name), &build);
- if (qflag && build)
- exitstatus = 1;
-
- return r;
+ return rebuild(lookup(name), &build);
}