diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -903,14 +903,24 @@ prepare: prepare0 | |||
903 | 903 | ||
904 | export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) | 904 | export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) |
905 | 905 | ||
906 | # FIXME: The asm symlink changes when $(ARCH) changes. That's | 906 | # The asm symlink changes when $(ARCH) changes. |
907 | # hard to detect, but I suppose "make mrproper" is a good idea | 907 | # Detect this and ask user to run make mrproper |
908 | # before switching between archs anyway. | 908 | |
909 | 909 | include/asm: FORCE | |
910 | include/asm: | 910 | $(Q)set -e; asmlink=`readlink include/asm | cut -d '-' -f 2`; \ |
911 | @echo ' SYMLINK $@ -> include/asm-$(SRCARCH)' | 911 | if [ -L include/asm ]; then \ |
912 | $(Q)if [ ! -d include ]; then mkdir -p include; fi; | 912 | if [ "$$asmlink" != "$(SRCARCH)" ]; then \ |
913 | @ln -fsn asm-$(SRCARCH) $@ | 913 | echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \ |
914 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ | ||
915 | exit 1; \ | ||
916 | fi; \ | ||
917 | else \ | ||
918 | echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ | ||
919 | if [ ! -d include ]; then \ | ||
920 | mkdir -p include; \ | ||
921 | fi; \ | ||
922 | ln -fsn asm-$(SRCARCH) $@; \ | ||
923 | fi | ||
914 | 924 | ||
915 | # Generate some files | 925 | # Generate some files |
916 | # --------------------------------------------------------------------------- | 926 | # --------------------------------------------------------------------------- |