X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=scripts%2FMakefile.clean;h=cff33498fa16a8edcdd872bfaf2da13f6cbae4d2;hb=e9e9290f5c85887baf1123a36ec9fdf56a10cf4b;hp=ff3e87dbf387412448f8f1d1359120a997636234;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=pandora-kernel.git diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index ff3e87dbf387..cff33498fa16 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -4,10 +4,17 @@ src := $(obj) -.PHONY: __clean +PHONY := __clean __clean: -include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) +# 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 +kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) +include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) # Figure out what we need to build from the various variables # ========================================================================== @@ -80,7 +87,7 @@ endif # Descending # --------------------------------------------------------------------------- -.PHONY: $(subdir-ymn) +PHONY += $(subdir-ymn) $(subdir-ymn): $(Q)$(MAKE) $(clean)=$@ @@ -88,7 +95,8 @@ $(subdir-ymn): 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 + +# Declare the contents of the .PHONY variable as phony. We keep that +# information in a variable se we can use it in if_changed and friends. + +.PHONY: $(PHONY)