From: Michal Marek <mmarek@suse.cz>
To: Boaz Harrosh <boaz@plexistor.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 15:14:23 +0200 [thread overview]
Message-ID: <53A2E22F.6060100@suse.cz> (raw)
In-Reply-To: <53A2D0FC.7040309@plexistor.com>
Dne 19.6.2014 14:01, Boaz Harrosh napsal(a):
> On 06/19/2014 01:41 PM, Michal Marek wrote:
>>> Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
>>> - 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.
>>
>
> I kind of agree. My Makefile foo is not very strong any other way I
> know would duplicate code. What would you suggest?
>
> [ Best I can think of is:
>
> 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
>
>
> Is this better?
Definitely.
>> 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.
>>
>
> I would not care for those at all. The important is those files that
> you need to point and edit to fix stuff. The generated files I better
> not edit usually. The edit is in some other place, right?
Fair enough.
> I saw that this patch caused other breakage as well. Will you be
> fixing those? Do you want to own this or you still need a ver2
> of this patch?
I already sent three fixes to Linus:
https://lkml.org/lkml/2014/6/18/664. There is one more brekage that
Alexei is seeing with deb-pkg, but this needs further investigation.
Anyway, either send a v2 or tell me and I will fold the above change to
the first version of your patch.
Michal
next prev parent reply other threads:[~2014-06-19 13:14 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 [this message]
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=53A2E22F.6060100@suse.cz \
--to=mmarek@suse.cz \
--cc=alexei.starovoitov@gmail.com \
--cc=boaz@plexistor.com \
--cc=linux-kernel@vger.kernel.org \
--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.