aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.clean
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.clean')
-rw-r--r--scripts/Makefile.clean14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index ff3e87dbf387..8974ea5fc878 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -7,7 +7,14 @@ src := $(obj)
7.PHONY: __clean 7.PHONY: __clean
8__clean: 8__clean:
9 9
10include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) 10# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
11# Usage:
12# $(Q)$(MAKE) $(clean)=dir
13clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
14
15# The filename Kbuild has precedence over Makefile
16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
17include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
11 18
12# Figure out what we need to build from the various variables 19# Figure out what we need to build from the various variables
13# ========================================================================== 20# ==========================================================================
@@ -87,8 +94,3 @@ $(subdir-ymn):
87# If quiet is set, only print short version of command 94# If quiet is set, only print short version of command
88 95
89cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) 96cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
90
91# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
92# Usage:
93# $(Q)$(MAKE) $(clean)=dir
94clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj