All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	stable@vger.kernel.org, 856474@bugs.debian.org
Subject: Re: [PATCH] Kbuild.include: addtree: Remove quotes before matching path
Date: Tue, 4 Apr 2017 12:56:26 +0900	[thread overview]
Message-ID: <CAK7LNARgpsWh5xZr=6VhD6GpY2MQSWzvqKC9L382Dzm4Dx4Kow@mail.gmail.com> (raw)
In-Reply-To: <20170403202033.GB29829@ravnborg.org>

Hi Sam,


2017-04-04 5:20 GMT+09:00 Sam Ravnborg <sam@ravnborg.org>:
> On Mon, Apr 03, 2017 at 03:25:10PM +0200, Michal Marek wrote:
>> On 2017-04-03 09:42, Masahiro Yamada wrote:
>> > Each Makefile knows it wants to see
>> > additional headers in the source tree, or objtree.
>> >
>> > I am guessing the right approach in a long run is,
>> > we require -I to specify $(srctree) or $(objtree) explicitly.
>> >
>> > ccflags-y := -I$(srctree)/foo/bar/baz
>> >
>> > or
>> >
>> > ccflags-y := -I$(objtree)/foo/bar/baz
>> >
>> >
>> > (For the latter, we can omit $(objtree)/ as it is ./)
>> >
>> >
>> > Then, delete $(call flags,_c_flags) after the conversion.
>>
>> Agreed. The addtree function is more of a hack to make things just work
>> with O=, but AFAIK there is no clean way to implement VPATH for -I
>> arguments. So it's sensible to get rid of the hack. It looks like it's
>> going to be lot of work though:
>>
>> $ git grep -e '-I' -- '*Makefile*' | wc -l
>> 732
>> $ git grep -e '-I *\$(\(src\|obj\)tree)' -- '*Makefile*' | wc -l
>> 166
>
> There was a goal long time ago that moving the kernel source should
> not trigger a rebuild.
> Any hardcoded path would violate this (like $(srctree), $(objtree))

Even if we avoid hard-coding $(srctree) in each Makefile,
"addtree" will modify the -I paths and the modified paths
will be recorded in .*.cmd files.


If we really want to achieve the goal,
my old patch seemed to have a point:
https://patchwork.kernel.org/patch/4511991/
This was rejected due to side effects, anyway.


-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2017-04-04  3:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 21:58 [PATCH] Kbuild.include: addtree: Remove quotes before matching path Ben Hutchings
2017-04-03  7:42 ` Masahiro Yamada
2017-04-03 13:25   ` Michal Marek
2017-04-03 20:20     ` Sam Ravnborg
2017-04-04  3:56       ` Masahiro Yamada [this message]
2017-04-04  7:02       ` Michal Marek

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='CAK7LNARgpsWh5xZr=6VhD6GpY2MQSWzvqKC9L382Dzm4Dx4Kow@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=856474@bugs.debian.org \
    --cc=arnd@arndb.de \
    --cc=ben@decadent.org.uk \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=sam@ravnborg.org \
    --cc=stable@vger.kernel.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.