Skip to content

Commit

Permalink
kbuild: Fix removal of the debian/ directory
Browse files Browse the repository at this point in the history
scripts/Makefile.clean treats absolute path specially, but
$(objtree)/debian is no longer an absolute path since 7e1c047 (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: 7e1c047 (kbuild: Use relative path for $(objtree)
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
michal42 committed Jan 2, 2015
1 parent 97bf6af commit a16c5f9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/Makefile.clean
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

# ==========================================================================

Expand Down

0 comments on commit a16c5f9

Please sign in to comment.