• M
    kbuild: fix single target build for external module · f7a5ed08
    Masahiro Yamada 提交于
    [ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ]
    
    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: NMasahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    f7a5ed08
Makefile 58.7 KB