diff mbox series

kbuild: remove unneeded variable, single-all

Message ID 20191016051215.10909-1-yamada.masahiro@socionext.com
State Accepted
Commit 35e046a203ee3bc8ba9ae3561b50de02646dfb81
Headers show
Series kbuild: remove unneeded variable, single-all | expand

Commit Message

Masahiro Yamada Oct. 16, 2019, 5:12 a.m. UTC
When single-build is set, everything in $(MAKECMDGOALS) is a single
target. You can use $(MAKECMDGOALS) to list out the single targets.

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

---

 Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.17.1

Comments

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

> When single-build is set, everything in $(MAKECMDGOALS) is a single

> target. You can use $(MAKECMDGOALS) to list out the single targets.

>

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

> ---

>


Applied to linux-kbuild.

>  Makefile | 6 ++----

>  1 file changed, 2 insertions(+), 4 deletions(-)

>

> diff --git a/Makefile b/Makefile

> index ffd7a912fc46..710199f60c30 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -1764,11 +1764,9 @@ tools/%: FORCE

>

>  ifdef single-build

>

> -single-all := $(filter $(single-targets), $(MAKECMDGOALS))

> -

>  # .ko is special because modpost is needed

> -single-ko := $(sort $(filter %.ko, $(single-all)))

> -single-no-ko := $(sort $(patsubst %.ko,%.mod, $(single-all)))

> +single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS)))

> +single-no-ko := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS)))

>

>  $(single-ko): single_modpost

>         @:

> --

> 2.17.1

>



-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index ffd7a912fc46..710199f60c30 100644
--- a/Makefile
+++ b/Makefile
@@ -1764,11 +1764,9 @@  tools/%: FORCE
 
 ifdef single-build
 
-single-all := $(filter $(single-targets), $(MAKECMDGOALS))
-
 # .ko is special because modpost is needed
-single-ko := $(sort $(filter %.ko, $(single-all)))
-single-no-ko := $(sort $(patsubst %.ko,%.mod, $(single-all)))
+single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS)))
+single-no-ko := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS)))
 
 $(single-ko): single_modpost
 	@: