diff options
author | Michal Marek <mmarek@suse.cz> | 2014-12-31 16:29:35 +0100 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-02-04 10:57:55 +0000 |
commit | 1387ef054587c2d6d43158729e24503aea99e212 (patch) | |
tree | 153a36b48221e2cf28691193d9cb9addb9afcf85 /scripts | |
parent | 220ba44de13c89d68c1e70581562ac9bda2e2135 (diff) | |
download | linux-stable-1387ef054587c2d6d43158729e24503aea99e212.tar.gz linux-stable-1387ef054587c2d6d43158729e24503aea99e212.tar.bz2 linux-stable-1387ef054587c2d6d43158729e24503aea99e212.zip |
kbuild: Fix removal of the debian/ directory
commit a16c5f99a28c9945165c46da27fff8e6f26f8736 upstream.
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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
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 686cb0d31c7c..a835715386b6 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -47,19 +47,19 @@ __clean-files := $(extra-y) $(always) \ __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))) # ========================================================================== |