From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbcHOV32 (ORCPT ); Mon, 15 Aug 2016 17:29:28 -0400 Received: from smtprelay0003.hostedemail.com ([216.40.44.3]:52167 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752316AbcHOV31 (ORCPT ); Mon, 15 Aug 2016 17:29:27 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3872:3874:4321:5007:10004:10400:10471:10848:11026:11232:11473:11658:11914:12043:12048:12517:12519:12740:13069:13073:13255:13311:13357:13439:13894:14659:14721:21080:21324:21451:30012:30054:30064:30090:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:error,Custom_rules:0:0:0,LFtime:2000,LUA_SUMMARY:none X-HE-Tag: river86_51506ee468d5c X-Filterd-Recvd-Size: 2328 Message-ID: <1471296557.4075.127.camel@perches.com> Subject: Building a subdirectory ignores parent subdir-ccflags (was: Re: [PATCH 1/2] staging: lustre: Add include path to Makefile) From: Joe Perches To: Greg Kroah-Hartman , "Yann E. MORIN" , Michal Marek , linux-kbuild Cc: Oleg Drokin , Andreas Dilger , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, lustre-devel@lists.lustre.org Date: Mon, 15 Aug 2016 14:29:17 -0700 In-Reply-To: <1471295658.4075.117.camel@perches.com> References: <5f9f49c1e0caeb3b9ee0656b6d922dbaf52a15b7.1471289489.git.joe@perches.com> <20160815210420.GA30864@kroah.com> <1471295658.4075.117.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?