While it should theoretically never happen, generate a warning if anything is selected for both modular and built-in construction at the same time.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> --- while the above might seem superfluous, if Makefile.lib insists on recognizing the possibility of this happening, then the build should at least warn the user that it's happened, since that would seem to signify a glitch of some kind in the underlying build process. diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3c5e88b..02e2032 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -8,7 +8,14 @@ ldflags-y += $(EXTRA_LDFLAGS) # =========================================================================== # When an object is listed to be built compiled-in and modular, -# only build the compiled-in version +# only build the compiled-in version, but print a warning that +# that's occurred. + +obj-both := $(filter %.o,$(filter $(obj-m), $(obj-y))) + +ifneq ($(obj-both),) +$(warning Selected for both modular and built-in: $(obj-both)) +endif obj-m := $(filter-out $(obj-y),$(obj-m)) ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca ======================================================================== - To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
