]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: fix single target build for external module
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 21 Nov 2018 23:11:54 +0000 (08:11 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 1 Dec 2018 13:21:57 +0000 (22:21 +0900)
commitb7300bdf31ff98cf36d42c0db66c59be1a06e0b2
treedeab3724d619c09276c18b28f43e8f37825d860b
parentabc04517ffa1718400510737a29aa4bfb01f215a
kbuild: fix single target build for external module

Building a single target in an external module fails due to missing
.tmp_versions directory.

For example,

  $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o

will fail in the following way:

  CC [M]  /home/masahiro/foo/foo.o
/bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent

This is because $(cmd_crmodverdir) is executed only before building
/, %/, %.ko single targets of external modules. Create .tmp_versions
in the 'prepare' target.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile