Re: [U-Boot] [PATCH V2 1/2] Don't add symlink in srctree when using an objtree

2011-01-21 Thread Wolfgang Denk
Dear =?UTF-8?q?Lo=C3=AFc=20Minier?=,

In message 1295439390-16238-1-git-send-email-loic.min...@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.
 
 Signed-off-by: Loïc Minier loic.min...@linaro.org
 ---
  Makefile |2 +-
  mkconfig |3 +--
  2 files changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.

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: w...@denx.de
If a train station is a place where a train stops,
   then what's a workstation?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V2 1/2] Don't add symlink in srctree when using an objtree

2011-01-19 Thread Loïc Minier
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.

Signed-off-by: Loïc Minier loic.min...@linaro.org
---
 Makefile |2 +-
 mkconfig |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9055028..7c02096 100644
--- a/Makefile
+++ b/Makefile
@@ -1243,7 +1243,7 @@ clobber:  clean
@rm -f $(obj)u-boot.imx
@rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
@rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
-   @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
+   @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
@rm -fr $(obj)include/generated
@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name * -type l 
-print | xargs rm -f
@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name * -type l 
-print | xargs rm -f
diff --git a/mkconfig b/mkconfig
index db69336..6ff533f 100755
--- a/mkconfig
+++ b/mkconfig
@@ -98,8 +98,7 @@ if [ $SRCTREE != $OBJTREE ] ; then
ln -s ${SRCTREE}/arch/${arch}/include/asm asm
LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
cd ../include
-   rm -f asm
-   ln -s ${SRCTREE}/arch/${arch}/include/asm asm
+   mkdir -p asm
 else
cd ./include
rm -f asm
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot