From: Nishanth Menon <nm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Makefile: Include vendor common library in include search path
Date: Tue, 10 Nov 2015 08:55:19 -0600 [thread overview]
Message-ID: <20151110145519.GA5952@ogun.home> (raw)
In-Reply-To: <CAK7LNARP4ipj7YyDorpN0x1v7TFc3EvaBa42G5hBFgaP7zdyRw@mail.gmail.com>
On 12:25-20151110, Masahiro Yamada wrote:
> 2015-11-10 5:24 GMT+09:00 Simon Glass <sjg@chromium.org>:
> >>> 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/<arch>/mach-<soc>/include/mach
>
> [step 2] change #include <asm/arch/foo.h> to #include <mach/foo.h>
>
> [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-<soc>
> 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
next prev parent reply other threads:[~2015-11-10 14:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 7:28 [U-Boot] [PATCH] Makefile: Include vendor common library in include search path Nishanth Menon
2015-11-05 7:32 ` Nishanth Menon
2015-11-06 0:15 ` Simon Glass
2015-11-06 3:30 ` Nishanth Menon
2015-11-06 4:50 ` Masahiro Yamada
2015-11-06 17:10 ` Nishanth Menon
2015-11-06 18:23 ` Nishanth Menon
2015-11-06 23:58 ` Simon Glass
2015-11-08 2:18 ` Tom Rini
2015-11-08 15:56 ` menon.nishanth at gmail.com
2015-11-08 16:38 ` Tom Rini
2015-11-09 16:03 ` Masahiro Yamada
2015-11-09 17:37 ` Nishanth Menon
2015-11-09 20:24 ` Simon Glass
2015-11-10 3:25 ` Masahiro Yamada
2015-11-10 14:55 ` Nishanth Menon [this message]
2015-11-10 15:34 ` Nishanth Menon
2015-11-12 16:16 ` Simon Glass
2015-11-12 16:22 ` Tom Rini
2015-11-12 16:45 ` Nishanth Menon
2015-11-12 16:56 ` Simon Glass
2015-11-12 17:05 ` Tom Rini
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=20151110145519.GA5952@ogun.home \
--to=nm@ti.com \
--cc=u-boot@lists.denx.de \
/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