From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Date: Tue, 10 Nov 2015 08:55:19 -0600 Subject: [U-Boot] [PATCH] Makefile: Include vendor common library in include search path In-Reply-To: References: <563CDEEF.3070403@ti.com> <20151106182348.GA14217@ogun.home> <20151108021845.GI8499@bill-the-cat> <20151108163833.GY8499@bill-the-cat> <5640D9C9.4090803@ti.com> Message-ID: <20151110145519.GA5952@ogun.home> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. 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/ How does this sound? -- Regards, Nishanth Menon