Noel Yap wrote:
Is there an option less verbose than --debug that outputs which dependencies triggered a target action?

You can hack it like this:

    OLD_SHELL := $(SHELL)
SHELL = $(warning Building $@ $(if $?,because $? newer,because $@ is missing))$(OLD_SHELL)

Then you'll get a lot of warnings. If you filter on just those that mention a Makefile name and line number you'll see something like this:

    shell3.mak:8: Building foo because foo is missing
    shell3.mak:8: Building bar because bar is missing
    shell3.mak:5: Building all because foo bar newer

for a Makefile like that:

    all: foo bar
        @echo Make all

    foo bar:
        @echo Make $@

I am planning to write an article for CM Crossroads about tricks with redefining SHELL for the October CM Basics.

John.
--
John Graham-Cumming
[EMAIL PROTECTED]

Home: http://www.jgc.org/
POPFile: http://getpopfile.org/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to