diff options
author | Michal Marek <mmarek@suse.cz> | 2014-12-31 10:29:35 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2015-01-02 08:51:27 -0500 |
commit | a16c5f99a28c9945165c46da27fff8e6f26f8736 (patch) | |
tree | a5d8fd1a65ba56c1492e39bb4a8548a9fa38df7d | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
kbuild: Fix removal of the debian/ directory
scripts/Makefile.clean treats absolute path specially, but
$(objtree)/debian is no longer an absolute path since 7e1c0477 (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>
-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-) \ | |||
42 | 42 | ||
43 | __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) | 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 | 45 | # clean-files is given relative to the current directory, unless it |
46 | # a $(obj) prefix, except for absolute paths | 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 | __clean-files := $(wildcard \ | 49 | __clean-files := $(wildcard \ |
49 | $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \ | 50 | $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \ |
50 | $(filter /%, $(__clean-files))) | 51 | $(filter $(objtree)/%, $(__clean-files))) |
51 | 52 | ||
52 | # as clean-dirs is given relative to the current directory, this adds | 53 | # same as clean-files |
53 | # a $(obj) prefix, except for absolute paths | ||
54 | 54 | ||
55 | __clean-dirs := $(wildcard \ | 55 | __clean-dirs := $(wildcard \ |
56 | $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \ | 56 | $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \ |
57 | $(filter /%, $(clean-dirs))) | 57 | $(filter $(objtree)/%, $(clean-dirs))) |
58 | 58 | ||
59 | # ========================================================================== | 59 | # ========================================================================== |
60 | 60 | ||