Commit 11c8f01b423b2d9742ce21e44cb7da7b55429ad5

Authored by Linus Torvalds

Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild fix from Michal Marek:
 "make mrproper / distclean stopped removing the generated debian/
  directory in v3.16.  This fixes it"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Fix removal of the debian/ directory

Showing 1 changed file Side-by-side Diff

scripts/Makefile.clean
... ... @@ -42,19 +42,19 @@
42 42  
43 43 __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
44 44  
45   -# as clean-files is given relative to the current directory, this adds
46   -# a $(obj) prefix, except for absolute paths
  45 +# clean-files is given relative to the current directory, unless it
  46 +# starts with $(objtree)/ (which means "./", so do not add "./" unless
  47 +# you want to delete a file from the toplevel object directory).
47 48  
48 49 __clean-files := $(wildcard \
49   - $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \
50   - $(filter /%, $(__clean-files)))
  50 + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
  51 + $(filter $(objtree)/%, $(__clean-files)))
51 52  
52   -# as clean-dirs is given relative to the current directory, this adds
53   -# a $(obj) prefix, except for absolute paths
  53 +# same as clean-files
54 54  
55 55 __clean-dirs := $(wildcard \
56   - $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \
57   - $(filter /%, $(clean-dirs)))
  56 + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \
  57 + $(filter $(objtree)/%, $(clean-dirs)))
58 58  
59 59 # ==========================================================================
60 60