help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stack trace


From: Renato Golin
Subject: stack trace
Date: Thu, 21 Sep 2006 14:42:34 +0100
User-agent: Thunderbird 2.0a1 (X11/20060724)

Hi,

Is there any option to print a stack trace of all rules that gnu make has passed before it broke?

I'll explain better, my makefile is:

all: 1.foo 2.foo 3.foo
    @rm -f *.bar

%.foo : %.bar
    @echo $@ needs $<

%.bar :
    touch $@

Running it yields:

$ make
touch 1.bar
1.foo needs 1.bar
touch 2.bar
2.foo needs 2.bar
touch 3.bar
3.foo needs 3.bar

If I remove the last rule (%.bar) it stops with the error:

$ make
make: *** No rule to make target `1.foo', needed by `all'.  Stop.

when in fact the problem is that 1.bar cannot be made therefore 1.foo cannot be made and all broke. Is there a make option that shows something like this:

$ make
make: *** No rule to make target `1.bar', needed by `1.foo'...
make: *** No rule to make target `1.foo', needed by `all'.  Stop.

So I'd know exactly what happened and where it broke instead of digging into complex nested makefiles with lots of includes.

I'm using GNU Make 3.80 on Linux 2.6.9-22.ELsmp x86_64.

thank you!
--renato


reply via email to

[Prev in Thread] Current Thread [Next in Thread]