diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-25 17:51:27 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-07-08 02:25:59 +0900 |
commit | 4e8fc3f55a38996a56106d6adfac72885ddd97ef (patch) | |
tree | fdf55f80830411a8593f8c05985d60633d242387 /Makefile | |
parent | 0c4ab18fc33bba70299f51fac83e32397cf9a04b (diff) | |
download | linux-4e8fc3f55a38996a56106d6adfac72885ddd97ef.tar.bz2 |
kbuild: add more hints about SUBDIRS replacement
Commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used")
added a hint about the 'SUBDIRS' replacement, but it was not clear
enough.
Multiple people sent me similar questions, patches. For instance,
https://lkml.org/lkml/2019/1/17/456
I did not mean to use M= for building a subdirectory in the kernel tree.
From commit 669efc76b317 ("net: hns3: fix compile error"), people
already (ab)use M=... to do that because it seems to work to some extent.
Documentation/kbuild/kbuild.txt says M= and KBUILD_EXTMOD are used for
building external modules.
In fact, Kbuild supports the single target '%/' for this purpose, but
this may not be noticed much.
Kindly add more hints.
Makefile:213: ================= WARNING ================
Makefile:214: 'SUBDIRS' will be removed after Linux 5.3
Makefile:215:
Makefile:216: If you are building an individual subdirectory
Makefile:217: in the kernel tree, you can do like this:
Makefile:218: $ make path/to/dir/you/want/to/build/
Makefile:219: (Do not forget the trailing slash)
Makefile:220:
Makefile:221: If you are building an external module,
Makefile:222: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:223: ==========================================
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -212,6 +212,13 @@ endif ifdef SUBDIRS $(warning ================= WARNING ================) $(warning 'SUBDIRS' will be removed after Linux 5.3) + $(warning ) + $(warning If you are building an individual subdirectory) + $(warning in the kernel tree, you can do like this:) + $(warning $$ make path/to/dir/you/want/to/build/) + $(warning (Do not forget the trailing slash)) + $(warning ) + $(warning If you are building an external module,) $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead) $(warning ==========================================) KBUILD_EXTMOD ?= $(SUBDIRS) |