diff options
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -961,6 +961,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) | |||
961 | 961 | ||
962 | # The asm symlink changes when $(ARCH) changes. | 962 | # The asm symlink changes when $(ARCH) changes. |
963 | # Detect this and ask user to run make mrproper | 963 | # Detect this and ask user to run make mrproper |
964 | # If asm is a stale symlink (point to dir that does not exist) remove it | ||
964 | define check-symlink | 965 | define check-symlink |
965 | set -e; \ | 966 | set -e; \ |
966 | if [ -L include/asm ]; then \ | 967 | if [ -L include/asm ]; then \ |
@@ -970,6 +971,10 @@ define check-symlink | |||
970 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ | 971 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ |
971 | exit 1; \ | 972 | exit 1; \ |
972 | fi; \ | 973 | fi; \ |
974 | test -e $$asmlink || rm include/asm; \ | ||
975 | elif [ -d include/asm ]; then \ | ||
976 | echo "ERROR: $@ is a directory but a symlink was expected";\ | ||
977 | exit 1; \ | ||
973 | fi | 978 | fi |
974 | endef | 979 | endef |
975 | 980 | ||