From: Boaz Harrosh <boaz@plexistor.com>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] kbuild: support of new KBUILD_FULL_PATH
Date: Thu, 19 Jun 2014 17:59:52 +0300 [thread overview]
Message-ID: <53A2FAE8.8080908@plexistor.com> (raw)
In-Reply-To: <53A2F949.9090100@plexistor.com>
On 06/19/2014 05:52 PM, Boaz Harrosh wrote:
>
> The commit 9da0763bdd82572be243fcf5161734f11568960f
>
> 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
>
> Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
Thanks Sir Michal
Please feel free to check out my broken grammar and change
what you see fit.
BTW: The old system was sensitive to absolute paths so if
I compile on local machine say at:
/home/boaz/dev/lin/
but then go to a network station and do "make install" in:
/mnt/boaz/home/boaz/dev/lin/
The build would attempt to rebuild everything what I do
is cd /net/boaz/home/boaz/dev on local and remote so the
make just works. Your patch actually fixed that ;-)
Thanks
Boaz
> ---
> Documentation/kbuild/kbuild.txt | 9 +++++++++
> Makefile | 13 ++++++++-----
> 2 files changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
> index 6466704..9133b47 100644
> --- a/Documentation/kbuild/kbuild.txt
> +++ b/Documentation/kbuild/kbuild.txt
> @@ -77,6 +77,15 @@ Specify the output directory when building the kernel.
> The output directory can also be specified using "O=...".
> Setting "O=..." takes precedence over KBUILD_OUTPUT.
>
> +KBUILD_FULL_PATH
> +--------------------------------------------------
> +Since Linux v3.16-rc1 the Kernel build system prefers to use
> +relative paths when supplying file-paths to gcc and other
> +tools. This will break IDEs and other environments that would
> +parse the gcc output to find files and lines.
> +Use KBUILD_FULL_PATH=1 on make command line to revert to old
> +way of feeding tools with full-paths.
> +
> KBUILD_DEBARCH
> --------------------------------------------------
> For the deb-pkg target, allows overriding the normal heuristics deployed by
> diff --git a/Makefile b/Makefile
> index 97b2861..51fcebd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -153,11 +153,14 @@ 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)
> + srctree := $(KBUILD_SRC)
> +
> + # if KBUILD_FULL_PATH=1 then do not use relative path
> + ifneq ($(KBUILD_FULL_PATH), 1)
> + ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
> + # building in a subdirectory of the source tree
> + srctree := ..
> + endif
> endif
> endif
> objtree := .
>
prev parent reply other threads:[~2014-06-19 14:59 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
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 [this message]
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=53A2FAE8.8080908@plexistor.com \
--to=boaz@plexistor.com \
--cc=alexei.starovoitov@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.