[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57B23D16.8060405@suse.com>
Date: Tue, 16 Aug 2016 00:07:18 +0200
From: Michal Marek <mmarek@...e.com>
To: Joe Perches <joe@...ches.com>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Yann E. MORIN" <yann.morin.1998@...e.fr>,
Oleg Drokin <oleg.drokin@...el.com>,
Andreas Dilger <andreas.dilger@...el.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
lustre-devel@...ts.lustre.org
Subject: Re: Building a subdirectory ignores parent subdir-ccflags
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
Powered by blists - more mailing lists