mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: sedat.dilek@gmail.com
Cc: ben@decadent.org.uk, max@stro.at, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: [PATCH 1/2] kbuild: Fix removal of the debian/ directory
Date: Wed, 31 Dec 2014 16:35:18 +0100	[thread overview]
Message-ID: <1420040119-32669-1-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <54A40743.8080401@suse.cz>

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-by: Sedat Dilek <sedat.dilek@gmail.com>
Fixes: 7e1c0477 (kbuild: Use relative path for $(objtree)
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 scripts/Makefile.clean | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index 1bca180..627f8cb 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -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)))
 
 # ==========================================================================
 
-- 
2.1.2


  parent reply	other threads:[~2014-12-31 15:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26 12:02 deb-pkg: Cleaning of debian/*tmp files when running 'make (dist)clean' Sedat Dilek
2014-12-26 12:43 ` Sedat Dilek
2014-12-26 18:46   ` Ben Hutchings
2014-12-28  9:56     ` Sedat Dilek
2014-12-31 13:53     ` Michal Marek
2015-01-05 18:37       ` Sedat Dilek
2014-12-31 13:56     ` Michal Marek
2014-12-31 14:16       ` Sedat Dilek
2014-12-31 14:25         ` Michal Marek
2014-12-31 14:26           ` Sedat Dilek
2014-12-31 15:35           ` Michal Marek [this message]
2014-12-31 15:35             ` [PATCH 2/2] kbuild: Drop support for clean-rule Michal Marek
2014-12-31 16:05               ` Sedat Dilek
2014-12-31 15:50             ` [PATCH 1/2] kbuild: Fix removal of the debian/ directory Sedat Dilek
2015-01-02 15:01               ` Michal Marek
2015-01-02 15:06                 ` Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420040119-32669-1-git-send-email-mmarek@suse.cz \
    --to=mmarek@suse.cz \
    --cc=ben@decadent.org.uk \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@stro.at \
    --cc=sedat.dilek@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®