X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=blobdiff_plain;f=Makefile;h=ffac7126c944b6db510aec55fd9d794de22dd8b6;hp=a7f20687d8e55e9f099740b4b8d00554d0a9db33;hb=dcc2da1a9693807096e9ac5137b499a829c51268;hpb=46dca86cb93db80992a45e4b55737ff2b2f61cd0 diff --git a/Makefile b/Makefile index a7f2068..ffac712 100644 --- a/Makefile +++ b/Makefile @@ -961,6 +961,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) # The asm symlink changes when $(ARCH) changes. # Detect this and ask user to run make mrproper +# If asm is a stale symlink (point to dir that does not exist) remove it define check-symlink set -e; \ if [ -L include/asm ]; then \ @@ -970,6 +971,10 @@ define check-symlink echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ exit 1; \ fi; \ + test -e $$asmlink || rm include/asm; \ + elif [ -d include/asm ]; then \ + echo "ERROR: $@ is a directory but a symlink was expected";\ + exit 1; \ fi endef