diff options
author | Sam Ravnborg <sam@mars.(none)> | 2005-07-25 18:41:12 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.(none)> | 2005-07-25 18:41:12 -0400 |
commit | 2315c6e42278152360470124ce903ecb8c97270a (patch) | |
tree | c95b63c0c6c6c625c7a3f0c0c96d6bd713fc3190 | |
parent | 2a691470345a0024dd7ffaf47ad3d0f5f4f41924 (diff) |
kbuild: define clean before including kbuild file
Defining clean before including the kbuild file give us knowledge when
the kbuild file is included for cleaning. This is rarey usefull - but in
a corner case in klibc this proved necessary.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
-rw-r--r-- | scripts/Makefile.clean | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 9c978b7bbdf1..62351b630fab 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean | |||
@@ -7,6 +7,11 @@ src := $(obj) | |||
7 | .PHONY: __clean | 7 | .PHONY: __clean |
8 | __clean: | 8 | __clean: |
9 | 9 | ||
10 | # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir | ||
11 | # Usage: | ||
12 | # $(Q)$(MAKE) $(clean)=dir | ||
13 | clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj | ||
14 | |||
10 | # The filename Kbuild has precedence over Makefile | 15 | # The filename Kbuild has precedence over Makefile |
11 | include $(if $(wildcard $(srctree)/$(src)/Kbuild), \ | 16 | include $(if $(wildcard $(srctree)/$(src)/Kbuild), \ |
12 | $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile) | 17 | $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile) |
@@ -89,8 +94,3 @@ $(subdir-ymn): | |||
89 | # If quiet is set, only print short version of command | 94 | # If quiet is set, only print short version of command |
90 | 95 | ||
91 | cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) | 96 | cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) |
92 | |||
93 | # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir | ||
94 | # Usage: | ||
95 | # $(Q)$(MAKE) $(clean)=dir | ||
96 | clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj | ||