Skip to content

Commit

Permalink
kbuild: define clean before including kbuild file
Browse files Browse the repository at this point in the history
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>
---
  • Loading branch information
Sam Ravnborg committed Jul 25, 2005
1 parent 2a69147 commit 2315c6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/Makefile.clean
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 2315c6e

Please sign in to comment.