diff options
author | Loïc Minier <loic.minier@linaro.org> | 2011-01-19 13:16:29 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-01-21 08:53:40 +0100 |
commit | a9d8bc98061c2c4bce312ce4d63cb4c61889fb6d (patch) | |
tree | 31f81a67ae0735a76f90c5365177dcbf41a35c5a | |
parent | 42484788dcbc92cf95dd1e58d3986df2e9202cfa (diff) | |
download | u-boot-imx-a9d8bc98061c2c4bce312ce4d63cb4c61889fb6d.zip u-boot-imx-a9d8bc98061c2c4bce312ce4d63cb4c61889fb6d.tar.gz u-boot-imx-a9d8bc98061c2c4bce312ce4d63cb4c61889fb6d.tar.bz2 |
Don't add symlink in srctree when using an objtree
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.minier@linaro.org>
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | mkconfig | 3 |
2 files changed, 2 insertions, 3 deletions
@@ -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 @@ -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 |