scc

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

commit 00a158fd1958df4d55385a3ada8aaa0c5d3f970c
parent 71c43e522ab48fc2a4cccb03c1ed816116754a9b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 10 Jan 2025 19:56:04 +0100

make: Add more debug information

Diffstat:
Msrc/cmd/scc-make/parser.c | 7++++++-
Msrc/cmd/scc-make/rules.c | 1+
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/cmd/scc-make/parser.c b/src/cmd/scc-make/parser.c @@ -465,7 +465,12 @@ validchar(int c) static char * expandmacro(char *name) { - return expandstring(getmacro(name), NULL, getloc()); + char *s; + + s = expandstring(getmacro(name), NULL, getloc()); + debug("macro %s expanded to '%s'", name, s); + + return s; } static void diff --git a/src/cmd/scc-make/rules.c b/src/cmd/scc-make/rules.c @@ -311,6 +311,7 @@ run(Target *tp) for (i = 0; i < tp->nactions; i++) { struct action *p = &tp->actions[i]; + debug("executing action '%s'", p->line); s = expandstring(p->line, tp, &p->loc); r = execline(tp, s, ignore, silent); free(s);