public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <openosd@gmail.com>
To: Michal Marek <mmarek@suse.cz>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: 9da0763 "kbuild: Use relative path ..." Broke my IDE
Date: Wed, 18 Jun 2014 21:00:01 +0300	[thread overview]
Message-ID: <53A1D3A1.70202@gmail.com> (raw)

Hi Sir Michal

Below patch broke my stupid yet useful IDE tool. I use kdevelop.

kdevelop now gets confused on warnings and errors because it now comes out
as (for example):
../fs/ext4/fsync.c:63:3: error: implicit declaration of function ‘iputddd’ [-Werror=implicit-function-declaration]

>From what I understand kdevelop picks up the "[make] cd ..." outputs from make and
will interpret those for finding gcc files output. But Linux Makefile will suppress
these messages and kdevelop as no way to interpret the "../xxxx"

I do not know what other IDEs do, but this one here is not smart enough.

Could we please define a new input to Makefile that will revert to
old behavior. like:
	KBUILD_FULL_PATH

let me cook up a patch tomorrow (getting late here)
Thanks
Boaz

The patch that broke it
----
>From 9da0763bdd82572be243fcf5161734f11568960f Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@suse.cz>
Date: Fri, 25 Apr 2014 23:25:18 +0200
Subject: [PATCH] kbuild: Use relative path when building in a subdir of the
 source tree

When doing make O=<subdir>, use '..' to refer to the source tree. This
allows for more readable compiler messages, and, more importantly, it
sets the VPATH to '..', so filenames in WARN_ON() etc. will be shorter.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 Makefile | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 3e134ec..f4702c1 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,17 @@ else
 _all: modules
 endif
 
-srctree		:= $(if $(KBUILD_SRC),$(KBUILD_SRC),.)
+ifeq ($(KBUILD_SRC),)
+        # building in the source tree
+        srctree := .
+else
+        ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
+                # building in a subdirectory of the source tree
+                srctree := ..
+        else
+                srctree := $(KBUILD_SRC)
+        endif
+endif
 objtree		:= .
 src		:= $(srctree)
 obj		:= $(objtree)
-- 
1.9.3


             reply	other threads:[~2014-06-18 18:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 18:00 Boaz Harrosh [this message]
2014-06-18 19:56 ` 9da0763 "kbuild: Use relative path ..." Broke my IDE Alexei Starovoitov
2014-06-19 10:12 ` kbuild: support of new KBUILD_FULL_PATH Boaz Harrosh
2014-06-19 10:41   ` Michal Marek
2014-06-19 12:01     ` Boaz Harrosh
2014-06-19 13:14       ` Michal Marek
2014-06-19 14:52         ` [PATCH] " Boaz Harrosh
2014-06-19 14:59           ` Boaz Harrosh

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=53A1D3A1.70202@gmail.com \
    --to=openosd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sam@ravnborg.org \
    /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