* Building a subdirectory ignores parent subdir-ccflags (was: Re: [PATCH 1/2] staging: lustre: Add include path to Makefile)
[not found] ` <1471295658.4075.117.camel@perches.com>
@ 2016-08-15 21:29 ` Joe Perches
2016-08-15 22:07 ` Building a subdirectory ignores parent subdir-ccflags Michal Marek
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2016-08-15 21:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Yann E. MORIN, Michal Marek, linux-kbuild
Cc: Oleg Drokin, Andreas Dilger, devel, linux-kernel, lustre-devel
On Mon, 2016-08-15 at 14:14 -0700, Joe Perches wrote:
> On Mon, 2016-08-15 at 23:04 +0200, Greg Kroah-Hartman wrote:
> > On Mon, Aug 15, 2016 at 12:33:23PM -0700, Joe Perches wrote:
> > > Start to rationalize include paths in source code files.
> []
> > > diff --git a/drivers/staging/lustre/Makefile b/drivers/staging/lustre/Makefile
> []
> > > @@ -1,2 +1,5 @@
> > > +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include/
> > > +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include/
> > > +
> > > obj-$(CONFIG_LNET) += lnet/
> > > obj-$(CONFIG_LUSTRE_FS) += lustre/
> > This is good, but does this break the subdir make command:
> > make M=drivers/staging/lustre/foo_dir/
> > ?
> hmm, yeah, it does. Oh well, nevermind for awhile.
> > I remember the last time I tried to clean this up, it took a while...
> It seems like something the build tools should
> handle correctly now, but I'll look at it.
Perhaps making a specific directory should also walk up
any parent directory Makefiles looking for subdir flags.
Is that unreasonable? Any suggestions?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building a subdirectory ignores parent subdir-ccflags
2016-08-15 21:29 ` Building a subdirectory ignores parent subdir-ccflags (was: Re: [PATCH 1/2] staging: lustre: Add include path to Makefile) Joe Perches
@ 2016-08-15 22:07 ` Michal Marek
2016-08-15 22:46 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2016-08-15 22:07 UTC (permalink / raw)
To: Joe Perches, linux-kbuild
Cc: Greg Kroah-Hartman, Yann E. MORIN, Oleg Drokin, Andreas Dilger,
devel, linux-kernel, lustre-devel
Dne 15.8.2016 v 23:29 Joe Perches napsal(a):
> On Mon, 2016-08-15 at 14:14 -0700, Joe Perches wrote:
>> On Mon, 2016-08-15 at 23:04 +0200, Greg Kroah-Hartman wrote:
>>> On Mon, Aug 15, 2016 at 12:33:23PM -0700, Joe Perches wrote:
>>>> Start to rationalize include paths in source code files.
>> []
>>>> diff --git a/drivers/staging/lustre/Makefile b/drivers/staging/lustre/Makefile
>> []
>>>> @@ -1,2 +1,5 @@
>>>> +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include/
>>>> +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include/
>>>> +
>>>> obj-$(CONFIG_LNET) += lnet/
>>>> obj-$(CONFIG_LUSTRE_FS) += lustre/
>>> This is good, but does this break the subdir make command:
>>> make M=drivers/staging/lustre/foo_dir/
>>> ?
>> hmm, yeah, it does. Oh well, nevermind for awhile.
>>> I remember the last time I tried to clean this up, it took a while...
>> It seems like something the build tools should
>> handle correctly now, but I'll look at it.
>
> Perhaps making a specific directory should also walk up
> any parent directory Makefiles looking for subdir flags.
>
> Is that unreasonable? Any suggestions?
I suggest to do make drivers/staging/lustre/. If building the lustre
subdirectories is going to be a common use case, then you can propagate
the subdir-ccflags-y assignment down to the individual Makefiles.
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building a subdirectory ignores parent subdir-ccflags
2016-08-15 22:07 ` Building a subdirectory ignores parent subdir-ccflags Michal Marek
@ 2016-08-15 22:46 ` Joe Perches
0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-08-15 22:46 UTC (permalink / raw)
To: Michal Marek, linux-kbuild
Cc: Greg Kroah-Hartman, Yann E. MORIN, Oleg Drokin, Andreas Dilger,
devel, linux-kernel, lustre-devel
On Tue, 2016-08-16 at 00:07 +0200, Michal Marek wrote:
Hi Michal.
> > Perhaps making a specific directory should also walk up
> > any parent directory Makefiles looking for subdir flags.
> >
> > Is that unreasonable? Any suggestions?
> I suggest to do make drivers/staging/lustre/. If building the lustre
> subdirectories is going to be a common use case, then you can propagate
> the subdir-ccflags-y assignment down to the individual Makefiles.
I don't have a problem with that.
Others might though for whatever reason.
There are a couple other places in the tree that
also use subdir-ccflags where the results of making
a subdirectory would either fail or have unexpected
results.
Does it matter? Not much, but it could be nicer if
it's possible for parent Makefile paths to be ascended.
I'm not much of a Makefile person, but perhaps you have
some clues/tips/suggestions for implementation?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-15 22:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1471289489.git.joe@perches.com>
[not found] ` <5f9f49c1e0caeb3b9ee0656b6d922dbaf52a15b7.1471289489.git.joe@perches.com>
[not found] ` <20160815210420.GA30864@kroah.com>
[not found] ` <1471295658.4075.117.camel@perches.com>
2016-08-15 21:29 ` Building a subdirectory ignores parent subdir-ccflags (was: Re: [PATCH 1/2] staging: lustre: Add include path to Makefile) Joe Perches
2016-08-15 22:07 ` Building a subdirectory ignores parent subdir-ccflags Michal Marek
2016-08-15 22:46 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).