public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Don't add symlink in srctree when using an objtree
Date: Fri, 17 Dec 2010 20:51:31 +0100	[thread overview]
Message-ID: <mailman.202.1292617704.8188.u-boot@lists.denx.de> (raw)
In-Reply-To: <1291510334-650-1-git-send-email-loic.minier@linaro.org>

Dear =?UTF-8?q?Lo=C3=AFc=20Minier?=,

In message <1291510334-650-1-git-send-email-loic.minier@linaro.org> you wrote:
> When building with srctree != objtree, the build creates arch/soc/cpu
> specific symlinks in the source tree.  This means that the same source
> tree can't be used for multiple builds at the same time.  Also, these
> symlinks in the source tree are only cleaned up if one passes the same
> O= to distclean.
> 
> When srctree != objtree, mkconfig creates an $objtree/include2 directory
> in the objtree to host the asm -> arch/$arch/include/asm symlink so that
> "#include <asm>" can be used.  But it also creates another identical
> symlink in $objtree/include.
> 
> Then, mkconfig creates two symlinks:
> $objtree/include/asm/arch -> arch/$arch/include/asm/arch-$cpu (or $soc)
> $objtree/include/asm/proc -> arch/$arch/include/asm/proc-armv (on arm)
> but because $objtree/include/asm points at $srctree already, the two
> symlinks are created under $srctree.
> 
> To fix this, create a real $objtree/include/asm directory, instead of a
> symlink.  Update cleanup code accordingly.

Thanks for the fix.  A tiny change request, though:

> -	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
> +	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch
> +	@[ ! -h $(obj)include/asm ] || rm -f $(obj)include/asm
> +	@[ ! -d $(obj)include/asm ] || rmdir $(obj)include/asm

Don't make it that complicated. Just change the line into

	@rm -fr$(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm



Also a question: how has this change been tested?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A girl with a future avoids the man with a past.
                                   -- Evan Esar, "The Humor of Humor"

  reply	other threads:[~2010-12-17 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-05  0:52 [U-Boot] [PATCH] Don't add symlink in srctree when using an objtree Loïc Minier
2010-12-17 19:51 ` Wolfgang Denk [this message]
     [not found] ` <20101217195131.321CC15192A@gemini.denx.de>
2010-12-18 16:07   ` Loïc Minier
2011-01-03 15:11     ` Loïc Minier

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=mailman.202.1292617704.8188.u-boot@lists.denx.de \
    --to=wd@denx.de \
    --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