aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-09 07:03:58 -0400
committerMichal Marek <mmarek@suse.cz>2014-10-02 09:12:41 -0400
commit5b2389b45d1a9c12b9f4b976e38c36264bfc42f5 (patch)
tree9d5bdfc4475aca7884edd5d8d205cc1c5ff53230 /scripts
parent226422d08c33cf0b68f6ea55a3b0e5f9c8212bf8 (diff)
kbuild: simplify build, clean, modbuiltin shorthands
$(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> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include4
-rw-r--r--scripts/Makefile.clean2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 8a9a4e1c7eab..65e7b08bb2cc 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -171,13 +171,13 @@ ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3))
171# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= 171# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
172# Usage: 172# Usage:
173# $(Q)$(MAKE) $(build)=dir 173# $(Q)$(MAKE) $(build)=dir
174build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj 174build := -f $(srctree)/scripts/Makefile.build obj
175 175
176### 176###
177# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= 177# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
178# Usage: 178# Usage:
179# $(Q)$(MAKE) $(modbuiltin)=dir 179# $(Q)$(MAKE) $(modbuiltin)=dir
180modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj 180modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
181 181
182# Prefix -I with $(srctree) if it is not an absolute path. 182# Prefix -I with $(srctree) if it is not an absolute path.
183# skip if -I has no parameter 183# skip if -I has no parameter
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index c630ab52fa42..b1c668dc6815 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -10,7 +10,7 @@ __clean:
10# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir 10# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
11# Usage: 11# Usage:
12# $(Q)$(MAKE) $(clean)=dir 12# $(Q)$(MAKE) $(clean)=dir
13clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj 13clean := -f $(srctree)/scripts/Makefile.clean obj
14 14
15# The filename Kbuild has precedence over Makefile 15# The filename Kbuild has precedence over Makefile
16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))