> One way without extending the current rules could be: > > ifdef CONFIG_CC_WERROR > Werror := -Werror > endif > > CFLAGS_sched.o := $(Werror) > CFLAGS_another.o := $(Werror) > > What do you think? We could extend kbuild to support something like this: ccflags-<filename>-y := -Werror Sample: ccflags-sched.o-$(CONFIG_WERROR) := -Werror The above is a nice counterpart to the existing ccflags-y. And we could then deprecate CLFAGS_<filename> as we have today. To remove options we could use: ccflags-<filename>-remove-y := -pg This is a replacement of the undocumented CFLAGS_REMOVE_<filename> variant. Today: ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_lockdep.o = -pg endif Could be replaced with: ccflags-lockdep.o-remove-$(CONFIG_FUNCTION_TRACER) := -pg The ifdef often cover more than one file so we save less lines in reality than the example says. All looks rather trivial to implement. But it is maybe a bit too cryptic? Sam -- 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