diff options
| author | Andrew Lunn <andrew@lunn.ch> | 2015-01-19 16:00:15 -0600 |
|---|---|---|
| committer | Andrew Lunn <andrew@lunn.ch> | 2015-01-19 16:00:15 -0600 |
| commit | fe6e91e3387e4f90ed4605a1a538248a31686c16 (patch) | |
| tree | d4e10d0d214ca73500fcbb3dbbd25027320fddda /scripts | |
| parent | c6574542149dede8093e326d2c358ba447e30f33 (diff) | |
| parent | 38bdf45f4aa5cb6186d50a29e6cbbd9d486a1519 (diff) | |
Merge branch 'mvebu/fixes-3' into mvebu/soc
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.clean | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 1bca180db8ad..627f8cbbedb8 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -42,19 +42,19 @@ __clean-files := $(extra-y) $(extra-m) $(extra-) \ __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) -# as clean-files is given relative to the current directory, this adds -# a $(obj) prefix, except for absolute paths +# clean-files is given relative to the current directory, unless it +# starts with $(objtree)/ (which means "./", so do not add "./" unless +# you want to delete a file from the toplevel object directory). __clean-files := $(wildcard \ - $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \ - $(filter /%, $(__clean-files))) + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \ + $(filter $(objtree)/%, $(__clean-files))) -# as clean-dirs is given relative to the current directory, this adds -# a $(obj) prefix, except for absolute paths +# same as clean-files __clean-dirs := $(wildcard \ - $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \ - $(filter /%, $(clean-dirs))) + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \ + $(filter $(objtree)/%, $(clean-dirs))) # ========================================================================== |
