linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: simplify build, clean, modbuiltin shorthands
@ 2014-09-09 11:03 Masahiro Yamada
  2014-09-09 16:29 ` Peter Foley
  2014-10-02 13:14 ` Michal Marek
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2014-09-09 11:03 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Michal Marek, Sam Ravnborg, H. Peter Anvin,
	Andi Kleen, linux-kernel

$(if $(KBUILD_SRC),$(srctree)/) was a useful strategy
to omit a long absolute path for in-source-tree build
prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af
(kbuild: Use relative path when building in the source tree).

Now $(srctree) is "." when building in the source tree.
It would not be annoying to add "$(srctree)/" all the time.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile               | 2 +-
 scripts/Kbuild.include | 4 ++--
 scripts/Makefile.clean | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 1a60bdd..f7b9174 100644
--- a/Makefile
+++ b/Makefile
@@ -1574,7 +1574,7 @@ endif
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
 # Usage:
 # $(Q)$(MAKE) $(clean)=dir
-clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
+clean := -f $(srctree)/scripts/Makefile.clean obj
 
 endif	# skip-makefile
 
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 8a9a4e1..65e7b08 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -171,13 +171,13 @@ ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3))
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
 # Usage:
 # $(Q)$(MAKE) $(build)=dir
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
+build := -f $(srctree)/scripts/Makefile.build obj
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
 # Usage:
 # $(Q)$(MAKE) $(modbuiltin)=dir
-modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj
+modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
 
 # Prefix -I with $(srctree) if it is not an absolute path.
 # skip if -I has no parameter
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index c630ab5..b1c668d 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -10,7 +10,7 @@ __clean:
 # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
 # Usage:
 # $(Q)$(MAKE) $(clean)=dir
-clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
+clean := -f $(srctree)/scripts/Makefile.clean obj
 
 # The filename Kbuild has precedence over Makefile
 kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: simplify build, clean, modbuiltin shorthands
  2014-09-09 11:03 [PATCH] kbuild: simplify build, clean, modbuiltin shorthands Masahiro Yamada
@ 2014-09-09 16:29 ` Peter Foley
  2014-10-02 13:14 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Foley @ 2014-09-09 16:29 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, Michal Marek, Sam Ravnborg, H. Peter Anvin,
	Andi Kleen, LKML

On Tue, Sep 9, 2014 at 7:03 AM, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:
> $(if $(KBUILD_SRC),$(srctree)/) was a useful strategy
> to omit a long absolute path for in-source-tree build
> prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af
> (kbuild: Use relative path when building in the source tree).
>
> Now $(srctree) is "." when building in the source tree.
> It would not be annoying to add "$(srctree)/" all the time.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Peter Foley <pefoley2@pefoley.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: simplify build, clean, modbuiltin shorthands
  2014-09-09 11:03 [PATCH] kbuild: simplify build, clean, modbuiltin shorthands Masahiro Yamada
  2014-09-09 16:29 ` Peter Foley
@ 2014-10-02 13:14 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-10-02 13:14 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: Sam Ravnborg, H. Peter Anvin, Andi Kleen, linux-kernel

On 2014-09-09 13:03, Masahiro Yamada wrote:
> $(if $(KBUILD_SRC),$(srctree)/) was a useful strategy
> to omit a long absolute path for in-source-tree build
> prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af
> (kbuild: Use relative path when building in the source tree).

I think it was quite pointless even back then :).


> Now $(srctree) is "." when building in the source tree.
> It would not be annoying to add "$(srctree)/" all the time.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to kbuild.git#kbuild, thanks.

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-02 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 11:03 [PATCH] kbuild: simplify build, clean, modbuiltin shorthands Masahiro Yamada
2014-09-09 16:29 ` Peter Foley
2014-10-02 13:14 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).