diff mbox series

[2/2] kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile

Message ID 1542948687-7326-2-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series [1/2] kbuild: make 'scripts' depend on 'prepare0' | expand

Commit Message

Masahiro Yamada Nov. 23, 2018, 4:51 a.m. UTC
Now that 'prepare0' depends on 'scripts', building GCC plugins can
go into scripts/Makefile, which is a more standard way.

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

---

 Makefile                     | 2 +-
 scripts/Makefile             | 3 ++-
 scripts/Makefile.gcc-plugins | 8 --------
 3 files changed, 3 insertions(+), 10 deletions(-)

-- 
2.7.4

Comments

Masahiro Yamada Nov. 26, 2018, 2:54 p.m. UTC | #1
On Sat, Nov 24, 2018 at 4:57 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>

> Now that 'prepare0' depends on 'scripts', building GCC plugins can

> go into scripts/Makefile, which is a more standard way.

>

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

> ---



Applied to linux-kbuild.


>  Makefile                     | 2 +-

>  scripts/Makefile             | 3 ++-

>  scripts/Makefile.gcc-plugins | 8 --------

>  3 files changed, 3 insertions(+), 10 deletions(-)

>

> diff --git a/Makefile b/Makefile

> index cee4cec..a8bbe68 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -1114,7 +1114,7 @@ macroprepare: prepare1 archmacros

>

>  archprepare: archheaders archscripts macroprepare scripts_basic

>

> -prepare0: scripts archprepare gcc-plugins

> +prepare0: scripts archprepare

>         $(Q)$(MAKE) $(build)=scripts/mod

>         $(Q)$(MAKE) $(build)=.

>

> diff --git a/scripts/Makefile b/scripts/Makefile

> index b48259d..feb1f71 100644

> --- a/scripts/Makefile

> +++ b/scripts/Makefile

> @@ -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

> diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins

> index 46c5c68..c36f199 100644

> --- a/scripts/Makefile.gcc-plugins

> +++ b/scripts/Makefile.gcc-plugins

> @@ -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

> -       @:

> --

> 2.7.4

>



-- 
Best Regards
Masahiro Yamada
Kees Cook Nov. 27, 2018, 10:02 p.m. UTC | #2
On Thu, Nov 22, 2018 at 8:51 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Now that 'prepare0' depends on 'scripts', building GCC plugins can

> go into scripts/Makefile, which is a more standard way.

>

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


Reviewed-by: Kees Cook <keescook@chromium.org>


-Kees

> ---

>

>  Makefile                     | 2 +-

>  scripts/Makefile             | 3 ++-

>  scripts/Makefile.gcc-plugins | 8 --------

>  3 files changed, 3 insertions(+), 10 deletions(-)

>

> diff --git a/Makefile b/Makefile

> index cee4cec..a8bbe68 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -1114,7 +1114,7 @@ macroprepare: prepare1 archmacros

>

>  archprepare: archheaders archscripts macroprepare scripts_basic

>

> -prepare0: scripts archprepare gcc-plugins

> +prepare0: scripts archprepare

>         $(Q)$(MAKE) $(build)=scripts/mod

>         $(Q)$(MAKE) $(build)=.

>

> diff --git a/scripts/Makefile b/scripts/Makefile

> index b48259d..feb1f71 100644

> --- a/scripts/Makefile

> +++ b/scripts/Makefile

> @@ -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

> diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins

> index 46c5c68..c36f199 100644

> --- a/scripts/Makefile.gcc-plugins

> +++ b/scripts/Makefile.gcc-plugins

> @@ -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

> -       @:

> --

> 2.7.4

>




-- 
Kees Cook
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index cee4cec..a8bbe68 100644
--- a/Makefile
+++ b/Makefile
@@ -1114,7 +1114,7 @@  macroprepare: prepare1 archmacros
 
 archprepare: archheaders archscripts macroprepare scripts_basic
 
-prepare0: scripts archprepare gcc-plugins
+prepare0: scripts archprepare
 	$(Q)$(MAKE) $(build)=scripts/mod
 	$(Q)$(MAKE) $(build)=.
 
diff --git a/scripts/Makefile b/scripts/Makefile
index b48259d..feb1f71 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -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
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins
index 46c5c68..c36f199 100644
--- a/scripts/Makefile.gcc-plugins
+++ b/scripts/Makefile.gcc-plugins
@@ -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
-	@: