lkml.org 
[lkml]   [2006]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [KBUILD] optionally print cause of rebuild (#2)
Date

On Jul 5, 2006, at 4:30 AM, Sam Ravnborg wrote:

> Hi Milton.
>
> On Wed, Jul 05, 2006 at 02:01:26AM -0500, Milton Miller wrote:
>> Al wanted to see why Kbuild wanted to build files, to help debug
>> Makefiles or dependency chains.
> I like the idea and I have played around with it a bit before.
> To keep noise level down the "why got it rebuild" info should be on
> same
> line as the CC command and to trigger it increasing verbose level to 2
> seems more natural.
>
> Following patch does this.
> The patch contains a few clean-ups to make the "why" part slimmer.
>
> Comments?

You gave priority of dependent files while I gave priority to command
change. This is a judgment call, both are actually correct, but I
chose command change because changing the config will always cause
the built-in.o to be rebuilt even if you turned something back on
that you had off for a while.

You removed the subtle marker ('of') that said "here is a list of files"
vs some descriptive text (cmd change, etc); that means machine parsing
scripts have to recognize all the strings in why.

Printing it with the command like this is more compact, as long as we
enforce the rule that quiet_xxx_cmd will be of the format TAG file to
allow machine parsing. However, it does mean that for things built with
a rule, one has to figure out why the command was invoked.

For example, mine printed
DEPS: building .tmp_vmlinux1 because of drivers/built-in.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
DEPS: building init/version.o because of include/linux/compile.h
CC init/version.o
DEPS: building init/built-in.o because of init/version.o
LD init/built-in.o
LD .tmp_vmlinux1

while yours does
GEN .version - due to: drivers/built-in.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o - due to: include/linux/compile.h
LD init/built-in.o - due to: init/version.o
LD .tmp_vmlinux1 - due to: drivers/built-in.o

One might wonder how .version depends on drivers/built-in.o, and
why tmp_vmlinux1 wasn't built for init/built-in.o.

We should add this to make help.


milton

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-05 19:25    [from the cache]
©2003-2011 Jasper Spaans