From: Michal Marek <mmarek@suse.cz>
To: Boaz Harrosh <openosd@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: kbuild: support of new KBUILD_FULL_PATH
Date: Thu, 19 Jun 2014 12:41:41 +0200 [thread overview]
Message-ID: <53A2BE65.2070501@suse.cz> (raw)
In-Reply-To: <53A2B7A9.7080605@gmail.com>
On 2014-06-19 12:12, Boaz Harrosh wrote:
>
> The commit:
>
> commit 9da0763bdd82572be243fcf5161734f11568960f
> Author: Michal Marek <mmarek@suse.cz>
> Date: Fri Apr 25 23:25:18 2014 +0200
>
> 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>
>
> Broke IDEs and other tools which analyze the make output.
> Introduce a new KBUILD_FULL_PATH switch to Makefile that will revert
> to the old output if KBUILD_FULL_PATH=1 is specified.
> The default is KBUILD_FULL_PATH=0
Parsing make output is a use case I did not think of, so the knob seems
inevitable :-/.
> Is there a document I need to edit for this new parameter?
That would be Documentation/kbuild/kbuild.txt
> Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
> ---
> Makefile | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 97b2861..778732a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -149,11 +149,17 @@ else
> _all: modules
> endif
>
> +# put KBUILD_FULL_PATH=1 if relative path to sources breaks your system
> +ifneq ($(KBUILD_FULL_PATH), 1)
> + KBUILD_FULL_PATH=""
> +endif
> +
> ifeq ($(KBUILD_SRC),)
> # building in the source tree
> srctree := .
> else
> - ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
> + # if KBUILD_FULL_PATH is not empty then condition will fail
> + ifeq ($(KBUILD_FULL_PATH)$(KBUILD_SRC)/,$(dir $(CURDIR)))
This is an ugly way to express the logic.
> # building in a subdirectory of the source tree
> srctree := ..
> else
How about generated sources like asm-offsets.s or the lexer and parser
in scripts/kconfig, does kdevelop figure out where the files live? If
not, you might need to add
-objtree := .
+ifeq ($(KBUILD_FULL_PATH),1)
+ objtree := $(CURDIR)
+else
+ objtree := .
+endif
to use the full path also for the O= directory.
Michal
next prev parent reply other threads:[~2014-06-19 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 18:00 9da0763 "kbuild: Use relative path ..." Broke my IDE Boaz Harrosh
2014-06-18 19:56 ` Alexei Starovoitov
2014-06-19 10:12 ` kbuild: support of new KBUILD_FULL_PATH Boaz Harrosh
2014-06-19 10:41 ` Michal Marek [this message]
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=53A2BE65.2070501@suse.cz \
--to=mmarek@suse.cz \
--cc=alexei.starovoitov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openosd@gmail.com \
--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