提交 2315c6e4 编写于 作者: S Sam Ravnborg

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: NSam Ravnborg <sam@ravnborg.org>
---
上级 2a691470
...@@ -7,6 +7,11 @@ src := $(obj) ...@@ -7,6 +7,11 @@ src := $(obj)
.PHONY: __clean .PHONY: __clean
__clean: __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
# The filename Kbuild has precedence over Makefile # The filename Kbuild has precedence over Makefile
include $(if $(wildcard $(srctree)/$(src)/Kbuild), \ include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
$(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile) $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
...@@ -89,8 +94,3 @@ $(subdir-ymn): ...@@ -89,8 +94,3 @@ $(subdir-ymn):
# If quiet is set, only print short version of command # If quiet is set, only print short version of command
cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
# Usage:
# $(Q)$(MAKE) $(clean)=dir
clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册