diff mbox series

[1/2] kbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories

Message ID 20191016051547.11399-1-yamada.masahiro@socionext.com
State Accepted
Commit 203126293cd78c56578e33dfe8d517e7e83941a8
Headers show
Series [1/2] kbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories | expand

Commit Message

Masahiro Yamada Oct. 16, 2019, 5:15 a.m. UTC
KBUILD_SINGLE_TARGETS does not need to contain all the targets.
Change it to keep track the targets only from the current directory
and its subdirectories.

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

---

 scripts/Makefile.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Masahiro Yamada Oct. 24, 2019, 5:20 p.m. UTC | #1
On Wed, Oct 16, 2019 at 2:17 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>

> KBUILD_SINGLE_TARGETS does not need to contain all the targets.

> Change it to keep track the targets only from the current directory

> and its subdirectories.

>

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

> ---


Series, applied to linux-kbuild.


>

>  scripts/Makefile.build | 6 +++---

>  1 file changed, 3 insertions(+), 3 deletions(-)

>

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

> index a9e47953ca53..dcbb0124dac4 100644

> --- a/scripts/Makefile.build

> +++ b/scripts/Makefile.build

> @@ -469,15 +469,15 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \

>

>  ifdef single-build

>

> +KBUILD_SINGLE_TARGETS := $(filter $(obj)/%, $(KBUILD_SINGLE_TARGETS))

> +

>  curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \

>                         $(if $(filter $(x) $(basename $(x)).o, $(targets)), $(x))))

>

>  # Handle single targets without any rule: show "Nothing to be done for ..." or

>  # "No rule to make target ..." depending on whether the target exists.

>  unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \

> -                       $(filter $(obj)/%, \

> -                               $(filter-out $(curdir-single), \

> -                                       $(KBUILD_SINGLE_TARGETS))))

> +                       $(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS)))

>

>  __build: $(curdir-single) $(subdir-ym)

>  ifneq ($(unknown-single),)

> --

> 2.17.1

>



-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a9e47953ca53..dcbb0124dac4 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -469,15 +469,15 @@  targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
 
 ifdef single-build
 
+KBUILD_SINGLE_TARGETS := $(filter $(obj)/%, $(KBUILD_SINGLE_TARGETS))
+
 curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \
 			$(if $(filter $(x) $(basename $(x)).o, $(targets)), $(x))))
 
 # Handle single targets without any rule: show "Nothing to be done for ..." or
 # "No rule to make target ..." depending on whether the target exists.
 unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \
-			$(filter $(obj)/%, \
-				$(filter-out $(curdir-single), \
-					$(KBUILD_SINGLE_TARGETS))))
+			$(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS)))
 
 __build: $(curdir-single) $(subdir-ym)
 ifneq ($(unknown-single),)