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

In message <[email protected]> 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: [email protected]
A girl with a future avoids the man with a past.
                                   -- Evan Esar, "The Humor of Humor"
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to