kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 29 Nov 2018 03:56:31 +0000 (12:56 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 1 Dec 2018 14:09:38 +0000 (23:09 +0900)
Now that 'archprepare' depends on 'scripts', Kbuild can descend into
scripts/gcc-plugins in a more standard way.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Makefile
scripts/Makefile
scripts/Makefile.gcc-plugins

index 06b6424d519a7ce019100e6541fa0e26b135546a..861d9d48c7df64f323d214ea11522ca1687cdf95 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1110,7 +1110,7 @@ prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h
 
 macroprepare: prepare1 archmacros
 
-archprepare: archheaders archscripts macroprepare scripts gcc-plugins
+archprepare: archheaders archscripts macroprepare scripts
 
 prepare0: archprepare
        $(Q)$(MAKE) $(build)=scripts/mod
index b48259d3028031c3494db4357545a738c8d59bdb..feb1f71381d73a083e42e457444a8b4d3a0896dd 100644 (file)
@@ -36,9 +36,10 @@ PHONY += build_unifdef
 build_unifdef: $(obj)/unifdef
        @:
 
+subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
 subdir-$(CONFIG_MODVERSIONS) += genksyms
 subdir-$(CONFIG_SECURITY_SELINUX) += selinux
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
 
 # Let clean descend into subdirs
-subdir-        += basic dtc kconfig mod package gcc-plugins
+subdir-        += basic dtc kconfig mod package
index 46c5c680980657dfc8997d5127bfab198b710490..c36f19959619216e5e88059b3acf3f37d91ac540 100644 (file)
@@ -49,11 +49,3 @@ KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
 # All enabled GCC plugins are collected here for building below.
 GCC_PLUGIN := $(gcc-plugin-y)
 export GCC_PLUGIN
-
-# Actually do the build, if requested.
-PHONY += gcc-plugins
-gcc-plugins: scripts_basic
-ifdef CONFIG_GCC_PLUGINS
-       $(Q)$(MAKE) $(build)=scripts/gcc-plugins
-endif
-       @: