]> err.no Git - linux-2.6/commitdiff
kbuild: define clean before including kbuild file
authorSam Ravnborg <sam@mars.(none)>
Mon, 25 Jul 2005 22:41:12 +0000 (22:41 +0000)
committerSam Ravnborg <sam@mars.(none)>
Mon, 25 Jul 2005 22:41:12 +0000 (22:41 +0000)
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>
---

scripts/Makefile.clean

index 9c978b7bbdf189b7cdb45ae95464b3f99bb3c899..62351b630fabbec556e0da11779549149036e66a 100644 (file)
@@ -7,6 +7,11 @@ src := $(obj)
 .PHONY: __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
 include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
                         $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
@@ -89,8 +94,3 @@ $(subdir-ymn):
 # If quiet is set, only print short version of command
 
 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