All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Michal Marek <mmarek@suse.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.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: Mon, 3 Apr 2017 22:20:33 +0200	[thread overview]
Message-ID: <20170403202033.GB29829@ravnborg.org> (raw)
In-Reply-To: <7bebf377-1268-ee02-c19b-f2d16d69cf79@suse.com>

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))

I dunno if this is really something to aim for today.

I have personally from time to time renamed the directory where
I have kernel soruce (which is seen like moving the kernel source),
and would not be happy if this always triggered a full rebuild.
But this is frankly a corner case.

	Sam

  reply	other threads:[~2017-04-03 20:27 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 [this message]
2017-04-04  3:56       ` Masahiro Yamada
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=20170403202033.GB29829@ravnborg.org \
    --to=sam@ravnborg.org \
    --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=stable@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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.