kbuild: re-order the code to not parse unnecessary variables
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 4 Oct 2017 03:56:06 +0000 (12:56 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 09:54:37 +0000 (10:54 +0100)
commitcfe39acafbaf80504451e56ccb33d1481f13bbe7
tree9b5c624c3f93e8321528644dae8bedd990463cf1
parente6993149fa4d3700c66cf4607833588c052cca89
kbuild: re-order the code to not parse unnecessary variables

commit 2c1f4f125159f10521944cea23e33a00fcf85ede upstream.

The top Makefile is divided into some sections such as mixed targets,
config targets, build targets, etc.

When we build mixed targets, Kbuild just invokes submake to process
them one by one.  In this case, compiler-related variables like CC,
KBUILD_CFLAGS, etc. are unneeded.

Check what kind of targets we are building first, and parse variables
for building only when necessary.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile