scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 8b0b5349595ca1f43e4f035282e8d684dd0bf733
parent 686f0cf621e606b63dbae585d229414dfacdca33
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 19 Jan 2024 21:05:36 +0100

make: Add space for every target in $?

If we don't add spaces with every target then all of them
are concatenated in only one full target.

Diffstat:
Msrc/cmd/make/parser.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/cmd/make/parser.c b/src/cmd/make/parser.c @@ -491,12 +491,16 @@ expandsimple(Target *tp) if (!tp) return; - if (tp->req && stamp(tp->req) > tp->stamp) + if (tp->req && stamp(tp->req) > tp->stamp) { + push(FTEXPAN, " "); push(FTEXPAN, tp->req); + } for (p = tp->deps; p && *p; ++p) { - if (stamp((*p)->name) > tp->stamp) + if (stamp((*p)->name) > tp->stamp) { + push(FTEXPAN, " "); push(FTEXPAN, (*p)->name); + } } break; default: