kbuild: Fix removal of the debian/ directory
scripts/Makefile.clean treats absolute path specially, but $(objtree)/debian is no longer an absolute path since7e1c0477
(kbuild: Use relative path for $(objtree). Work around this by checking if the path starts with $(objtree)/. Reported-and-tested-by: Sedat Dilek <sedat.dilek@gmail.com> Fixes:7e1c0477
(kbuild: Use relative path for $(objtree) Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
97bf6af1f9
commit
a16c5f99a2
@ -42,19 +42,19 @@ __clean-files := $(extra-y) $(extra-m) $(extra-) \
|
|||||||
|
|
||||||
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
|
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
|
||||||
|
|
||||||
# as clean-files is given relative to the current directory, this adds
|
# clean-files is given relative to the current directory, unless it
|
||||||
# a $(obj) prefix, except for absolute paths
|
# starts with $(objtree)/ (which means "./", so do not add "./" unless
|
||||||
|
# you want to delete a file from the toplevel object directory).
|
||||||
|
|
||||||
__clean-files := $(wildcard \
|
__clean-files := $(wildcard \
|
||||||
$(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \
|
$(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
|
||||||
$(filter /%, $(__clean-files)))
|
$(filter $(objtree)/%, $(__clean-files)))
|
||||||
|
|
||||||
# as clean-dirs is given relative to the current directory, this adds
|
# same as clean-files
|
||||||
# a $(obj) prefix, except for absolute paths
|
|
||||||
|
|
||||||
__clean-dirs := $(wildcard \
|
__clean-dirs := $(wildcard \
|
||||||
$(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \
|
$(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \
|
||||||
$(filter /%, $(clean-dirs)))
|
$(filter $(objtree)/%, $(clean-dirs)))
|
||||||
|
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user