From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 05/13] tegra20: plutux: change obj directory mkdir commands
Date: Mon, 25 Jun 2012 10:39:31 -0700 [thread overview]
Message-ID: <20120625173931.GC17621@nvidia.com> (raw)
In-Reply-To: <1340323247-15512-6-git-send-email-amartin@nvidia.com>
On Thu, Jun 21, 2012 at 05:00:39PM -0700, Allen Martin wrote:
> Change the mkdir commands for the object directories to be more
> general purpose. This fixes an issue when building for SPL where
> SRCTREE and OBJTREE are the same, but $(obj) is under SPLTREE.
>
> Signed-off-by: Allen Martin <amartin@nvidia.com>
> ---
> board/avionic-design/plutux/Makefile | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/board/avionic-design/plutux/Makefile b/board/avionic-design/plutux/Makefile
> index d96d043..6bd394e 100644
> --- a/board/avionic-design/plutux/Makefile
> +++ b/board/avionic-design/plutux/Makefile
> @@ -25,8 +25,11 @@
>
> include $(TOPDIR)/config.mk
>
> -ifneq ($(OBJTREE),$(SRCTREE))
> -$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
> +ifeq ($(wildcard $(obj)../common),)
> +$(shell mkdir -p $(obj)../common)
> +endif
> +ifeq ($(wildcard $(obj)../../nvidia/common),)
> +$(shell mkdir -p $(obj)../../nvidia/common)
> endif
I verified the other boards that reach up and over to ../common and
../../nvidia/common also fail, it's just that this directory doesn't
get removed on a "make clobber" so once the directories are made it
works fine from then on.
I couldn't figure a good way of moving this up to a higher level.
The problem the build assumes all object files go to $(obj) and it's
only when evaluating the $(obj)%.o: %.c rule that we really know where
the object is going to end up (because the %.c has a relative path in
it). Putting extra logic in that rule seems like it would slow the
build down a lot for the general case, so I think it's better just to
put the explicit mkdirs in the Makefiles where we reach up and over.
-Allen
--
nvpublic
next prev parent reply other threads:[~2012-06-25 17:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 0:00 [U-Boot] [PATCH v4 0/13] split tegra20 arm7 code into separate SPL Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 01/13] tegra20: rename tegra2 -> tegra20 Allen Martin
2012-06-22 18:13 ` Stephen Warren
2012-06-22 18:41 ` Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 02/13] tegra20: move tegra20 SoC code to arch/arm/cpu/tegra20-common Allen Martin
2012-06-22 18:15 ` Stephen Warren
2012-06-22 18:43 ` Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 03/13] tegra20: rename CONFIG_MACH_TEGRA_GENERIC Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 04/13] tegra20: tec: add tegra20-common-post.h Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 05/13] tegra20: plutux: change obj directory mkdir commands Allen Martin
2012-06-25 17:39 ` Allen Martin [this message]
2012-06-22 0:00 ` [U-Boot] [PATCH v4 06/13] mkconfig: add support for SPL CPU Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 07/13] ARM: Fix arm720t SPL build Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 08/13] tegra20: remove timer_init from " Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 09/13] ARM: add tegra20 support to arm720t Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 10/13] tegra20: add u-boot-t2.bin target Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 11/13] tegra20: move SDRAM param save to later in boot Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 12/13] tegra20: enable SPL for tegra20 boards Allen Martin
2012-06-22 0:00 ` [U-Boot] [PATCH v4 13/13] tegra20: Remove armv4t build flags Allen Martin
2012-06-22 18:27 ` Stephen Warren
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=20120625173931.GC17621@nvidia.com \
--to=amartin@nvidia.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