On Fri, 9 Jan 2009, Sam Ravnborg wrote: > So we duplicate the cases where we identify "this .o file > is used in a module". > This is not good. > > Also there is no reason to do this for the .i, .s and .lst > targets as they do not invode recordmcount.pl anyway. > > If your build your patch on top of the following we avoid > the duplicated list. > > Sam Thanks Sam, Can I add this on top of Shaohua's and put your Signed-off-by, as well as an Acked-by on Shaohua's? -- Steve > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 5d90030..3a23239 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -112,13 +112,13 @@ endif > # --------------------------------------------------------------------------- > > # Default is built-in, unless we know otherwise > -modkern_cflags := $(CFLAGS_KERNEL) > +modkern_cflags = $(if $(part-of-module), $(CFLAGS_MODULE), $(CFLAGS_KERNEL)) > quiet_modtag := $(empty) $(empty) > > -$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE) > -$(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE) > -$(real-objs-m:.o=.s) : modkern_cflags := $(CFLAGS_MODULE) > -$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE) > +$(real-objs-m) : part-of-module := y > +$(real-objs-m:.o=.i) : part-of-module := y > +$(real-objs-m:.o=.s) : part-of-module := y > +$(real-objs-m:.o=.lst): part-of-module := y > > $(real-objs-m) : quiet_modtag := [M] > $(real-objs-m:.o=.i) : quiet_modtag := [M] > > -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html