Commit 0126be38 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: announce removal of SUBDIRS if used

SUBDIRS has been kept as a backward compatibility since
commit ("[PATCH] kbuild: external module support") in 2002.

We do not need multiple ways to do the same thing, so I will remove
SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and
updated the document so that nobody would try to use it.

Meanwhile, display the following warning if SUBDIRS is used.

Makefile:189: ================= WARNING ================
Makefile:190: 'SUBDIRS' will be removed after Linux 5.3
Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:192: ==========================================
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> # for scx200_docflash.c
Acked-by: Guenter Roeck <linux@roeck-us.net> # for scx200_wdt.c
parent 0987abcb
...@@ -81,12 +81,7 @@ KBUILD_EXTMOD ...@@ -81,12 +81,7 @@ KBUILD_EXTMOD
-------------------------------------------------- --------------------------------------------------
Set the directory to look for the kernel source when building external Set the directory to look for the kernel source when building external
modules. modules.
The directory can be specified in several ways: Setting "M=..." takes precedence over KBUILD_EXTMOD.
1) Use "M=..." on the command line
2) Environment variable KBUILD_EXTMOD
3) Environment variable SUBDIRS
The possibilities are listed in the order they take precedence.
Using "M=..." will always override the others.
KBUILD_OUTPUT KBUILD_OUTPUT
-------------------------------------------------- --------------------------------------------------
......
...@@ -186,6 +186,10 @@ endif ...@@ -186,6 +186,10 @@ endif
# Old syntax make ... SUBDIRS=$PWD is still supported # Old syntax make ... SUBDIRS=$PWD is still supported
# Setting the environment variable KBUILD_EXTMOD take precedence # Setting the environment variable KBUILD_EXTMOD take precedence
ifdef SUBDIRS ifdef SUBDIRS
$(warning ================= WARNING ================)
$(warning 'SUBDIRS' will be removed after Linux 5.3)
$(warning Please use 'M=' or 'KBUILD_EXTMOD' instead)
$(warning ==========================================)
KBUILD_EXTMOD ?= $(SUBDIRS) KBUILD_EXTMOD ?= $(SUBDIRS)
endif endif
......
...@@ -216,10 +216,3 @@ static void __exit cleanup_scx200_docflash(void) ...@@ -216,10 +216,3 @@ static void __exit cleanup_scx200_docflash(void)
module_init(init_scx200_docflash); module_init(init_scx200_docflash);
module_exit(cleanup_scx200_docflash); module_exit(cleanup_scx200_docflash);
/*
Local variables:
compile-command: "make -k -C ../../.. SUBDIRS=drivers/mtd/maps modules"
c-basic-offset: 8
End:
*/
...@@ -262,10 +262,3 @@ static void __exit scx200_wdt_cleanup(void) ...@@ -262,10 +262,3 @@ static void __exit scx200_wdt_cleanup(void)
module_init(scx200_wdt_init); module_init(scx200_wdt_init);
module_exit(scx200_wdt_cleanup); module_exit(scx200_wdt_cleanup);
/*
Local variables:
compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules"
c-basic-offset: 8
End:
*/
...@@ -14,4 +14,4 @@ HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include ...@@ -14,4 +14,4 @@ HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
all: modules all: modules
modules clean: modules clean:
$(MAKE) -C ../.. SUBDIRS=$(CURDIR) $@ $(MAKE) -C ../.. M=$(CURDIR) $@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment