From patchwork Tue Nov 10 14:55:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 542424 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0944214141A for ; Wed, 11 Nov 2015 01:55:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A0714B8DF; Tue, 10 Nov 2015 15:55:40 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SxuZsiIIzB0p; Tue, 10 Nov 2015 15:55:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3698F4B8AE; Tue, 10 Nov 2015 15:55:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A1A414B8AD for ; Tue, 10 Nov 2015 15:55:35 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fr6yR4K9xOkQ for ; Tue, 10 Nov 2015 15:55:35 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id 248A54B898 for ; Tue, 10 Nov 2015 15:55:31 +0100 (CET) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id tAAEtLoP021850; Tue, 10 Nov 2015 08:55:21 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAAEtKTu014196; Tue, 10 Nov 2015 08:55:20 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 10 Nov 2015 08:55:21 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAAEtK2d019934; Tue, 10 Nov 2015 08:55:20 -0600 Date: Tue, 10 Nov 2015 08:55:19 -0600 From: Nishanth Menon To: Masahiro Yamada Message-ID: <20151110145519.GA5952@ogun.home> References: <563CDEEF.3070403@ti.com> <20151106182348.GA14217@ogun.home> <20151108021845.GI8499@bill-the-cat> <20151108163833.GY8499@bill-the-cat> <5640D9C9.4090803@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Michal Marek , Tom Rini , U-Boot Mailing List , Stefan Roese , Lokesh Subject: Re: [U-Boot] [PATCH] Makefile: Include vendor common library in include search path X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On 12:25-20151110, Masahiro Yamada wrote: > 2015-11-10 5:24 GMT+09:00 Simon Glass : > >>> I am unhappy because I was hoping > >>> we could stop creating symbolic links during building > >>> in a long run. > > > > But how? I don't see that it is possible if we want to have a sensible > > prefix for each include. > > > [step 1] move SoC-specific headers to arch//mach-/include/mach > > [step 2] change #include to #include > > [step 3] Drop CONFIG_CREATE_ARCH_SYMLINK > > > For example, mach-uniphier finished [1] and [2], > so it does not require the symbolic link. > (several ARM SoCs finished [1]) > > > I think this is the way ARM should do, at least. > > The topic of debate is PowerPC. Should we introduce mach- > directories or not? > OK: Option 4: How about this guys? include/board-common is an actual directory and instead of headers being located in board/$(VENDOR)/common or board/$(VENDOR)/common/include, we move the common headers to include/board/$(VENDOR)/ Directory. This will make the usage as follows: #include <$(VENDOR)/xyz.h> I know this does not exactly meet Simon's suggestion here of being identifiably board-common/xyz.h -> but at least knowing the prefix as vendor name implies a board common header. How does this sound? diff --git a/Makefile b/Makefile index 3c21f8ddf9e9..2bd684199512 100644 --- a/Makefile +++ b/Makefile @@ -620,6 +620,7 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags) # U-Boot objects....order is important (i.e. start must be first) HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) +UBOOTINCLUDE += $(if $(HAVE_VENDOR_COMMON_LIB:y=1), -I$(srctree)/include/board-common) libs-y += lib/ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/