linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Joe Perches <joe@perches.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Yann E. MORIN" <yann.morin.1998@free.fr>,
	Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	lustre-devel@lists.lustre.org
Subject: Re: Building a subdirectory ignores parent subdir-ccflags
Date: Tue, 16 Aug 2016 00:07:18 +0200	[thread overview]
Message-ID: <57B23D16.8060405@suse.com> (raw)
In-Reply-To: <1471296557.4075.127.camel@perches.com>

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

  reply	other threads:[~2016-08-15 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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         ` Michal Marek [this message]
2016-08-15 22:46           ` Building a subdirectory ignores parent subdir-ccflags Joe Perches

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=57B23D16.8060405@suse.com \
    --to=mmarek@suse.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=yann.morin.1998@free.fr \
    /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 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).