diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-10-17 18:00:43 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2009-12-12 07:08:14 -0500 |
commit | f7f16b7799ed68654850ab340ef812895aebcf4c (patch) | |
tree | 84d2e606b2229812fe85a16ff94cdc5963d58ac3 /Makefile | |
parent | c95fa08a3e17c3f2983c4cbf409f5c9ae47b7dec (diff) |
kbuild: drop include/asm
We no longer use this directory for generated files and
all architectures has moved their header files so no
symlink tricks are needed either.
Drop the symlink and drop the ARCH check.
If we really need to check that the SRCARCH has not changed
when we build a kernel we can add this check back - but then we will
find a more convenient way to store the info.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 2 insertions, 38 deletions
@@ -968,7 +968,7 @@ endif | |||
968 | prepare2: prepare3 outputmakefile | 968 | prepare2: prepare3 outputmakefile |
969 | 969 | ||
970 | prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ | 970 | prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ |
971 | include/asm include/config/auto.conf | 971 | include/config/auto.conf |
972 | $(cmd_crmodverdir) | 972 | $(cmd_crmodverdir) |
973 | 973 | ||
974 | archprepare: prepare1 scripts_basic | 974 | archprepare: prepare1 scripts_basic |
@@ -980,42 +980,6 @@ prepare0: archprepare FORCE | |||
980 | # All the preparing.. | 980 | # All the preparing.. |
981 | prepare: prepare0 | 981 | prepare: prepare0 |
982 | 982 | ||
983 | # The asm symlink changes when $(ARCH) changes. | ||
984 | # Detect this and ask user to run make mrproper | ||
985 | # If asm is a stale symlink (point to dir that does not exist) remove it | ||
986 | define check-symlink | ||
987 | set -e; \ | ||
988 | if [ -L include/asm ]; then \ | ||
989 | asmlink=`readlink include/asm | cut -d '-' -f 2`; \ | ||
990 | if [ "$$asmlink" != "$(SRCARCH)" ]; then \ | ||
991 | echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \ | ||
992 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ | ||
993 | exit 1; \ | ||
994 | fi; \ | ||
995 | test -e $$asmlink || rm include/asm; \ | ||
996 | elif [ -d include/asm ]; then \ | ||
997 | echo "ERROR: $@ is a directory but a symlink was expected";\ | ||
998 | exit 1; \ | ||
999 | fi | ||
1000 | endef | ||
1001 | |||
1002 | # We create the target directory of the symlink if it does | ||
1003 | # not exist so the test in check-symlink works and we have a | ||
1004 | # directory for generated filesas used by some architectures. | ||
1005 | define create-symlink | ||
1006 | if [ ! -L include/asm ]; then \ | ||
1007 | $(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ | ||
1008 | if [ ! -d include/asm-$(SRCARCH) ]; then \ | ||
1009 | mkdir -p include/asm-$(SRCARCH); \ | ||
1010 | fi; \ | ||
1011 | ln -fsn asm-$(SRCARCH) $@; \ | ||
1012 | fi | ||
1013 | endef | ||
1014 | |||
1015 | include/asm: FORCE | ||
1016 | $(Q)$(check-symlink) | ||
1017 | $(Q)$(create-symlink) | ||
1018 | |||
1019 | # Generate some files | 983 | # Generate some files |
1020 | # --------------------------------------------------------------------------- | 984 | # --------------------------------------------------------------------------- |
1021 | 985 | ||
@@ -1184,7 +1148,7 @@ CLEAN_FILES += vmlinux System.map \ | |||
1184 | 1148 | ||
1185 | # Directories & files removed with 'make mrproper' | 1149 | # Directories & files removed with 'make mrproper' |
1186 | MRPROPER_DIRS += include/config usr/include include/generated | 1150 | MRPROPER_DIRS += include/config usr/include include/generated |
1187 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ | 1151 | MRPROPER_FILES += .config .config.old .version .old_version \ |
1188 | include/linux/autoconf.h include/linux/version.h \ | 1152 | include/linux/autoconf.h include/linux/version.h \ |
1189 | include/linux/utsrelease.h \ | 1153 | include/linux/utsrelease.h \ |
1190 | Module.symvers Module.markers tags TAGS cscope* | 1154 | Module.symvers Module.markers tags TAGS cscope* |