[1/5] kbuild: remove ifdef builtin-target / lib-target
diff mbox series

Message ID 20200522020002.504506-1-masahiroy@kernel.org
State New
Headers show
Series
  • [1/5] kbuild: remove ifdef builtin-target / lib-target
Related show

Commit Message

Masahiro Yamada May 22, 2020, 1:59 a.m. UTC
I do not see a good reason to add ifdef here.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/Makefile.build | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Masahiro Yamada May 26, 2020, 10:29 a.m. UTC | #1
On Fri, May 22, 2020 at 11:00 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> I do not see a good reason to add ifdef here.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.



>  scripts/Makefile.build | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 3665b1a0bc8e..9af88f4cacb8 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -384,16 +384,14 @@ $(obj)/%/built-in.a: $(obj)/% ;
>  #
>  # Rule to compile a set of .o files into one .a file (without symbol table)
>  #
> -ifdef builtin-target
>
>  quiet_cmd_ar_builtin = AR      $@
>        cmd_ar_builtin = rm -f $@; $(AR) cDPrST $@ $(real-prereqs)
>
> -$(builtin-target): $(real-obj-y) FORCE
> +$(obj)/built-in.a: $(real-obj-y) FORCE
>         $(call if_changed,ar_builtin)
>
>  targets += $(builtin-target)
> -endif # builtin-target
>
>  #
>  # Rule to create modules.order file
> @@ -408,15 +406,11 @@ $(modorder-target): $(subdir-ym) FORCE
>  #
>  # Rule to compile a set of .o files into one .a file (with symbol table)
>  #
> -ifdef lib-target
> -
> -$(lib-target): $(lib-y) FORCE
> +$(obj)/lib.a: $(lib-y) FORCE
>         $(call if_changed,ar)
>
>  targets += $(lib-target)
>
> -endif
> -
>  # NOTE:
>  # Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
>  # module is turned into a multi object module, $^ will contain header file
> --
> 2.25.1
>

Patch
diff mbox series

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 3665b1a0bc8e..9af88f4cacb8 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -384,16 +384,14 @@  $(obj)/%/built-in.a: $(obj)/% ;
 #
 # Rule to compile a set of .o files into one .a file (without symbol table)
 #
-ifdef builtin-target
 
 quiet_cmd_ar_builtin = AR      $@
       cmd_ar_builtin = rm -f $@; $(AR) cDPrST $@ $(real-prereqs)
 
-$(builtin-target): $(real-obj-y) FORCE
+$(obj)/built-in.a: $(real-obj-y) FORCE
 	$(call if_changed,ar_builtin)
 
 targets += $(builtin-target)
-endif # builtin-target
 
 #
 # Rule to create modules.order file
@@ -408,15 +406,11 @@  $(modorder-target): $(subdir-ym) FORCE
 #
 # Rule to compile a set of .o files into one .a file (with symbol table)
 #
-ifdef lib-target
-
-$(lib-target): $(lib-y) FORCE
+$(obj)/lib.a: $(lib-y) FORCE
 	$(call if_changed,ar)
 
 targets += $(lib-target)
 
-endif
-
 # NOTE:
 # Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
 # module is turned into a multi object module, $^ will contain header file