diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 107 |
1 files changed, 35 insertions, 72 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 32 | 3 | SUBLEVEL = 33 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = -rc4 |
5 | NAME = Man-Eating Seals of Antiquity | 5 | NAME = Man-Eating Seals of Antiquity |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -16,6 +16,13 @@ NAME = Man-Eating Seals of Antiquity | |||
16 | # o print "Entering directory ..."; | 16 | # o print "Entering directory ..."; |
17 | MAKEFLAGS += -rR --no-print-directory | 17 | MAKEFLAGS += -rR --no-print-directory |
18 | 18 | ||
19 | # Avoid funny character set dependencies | ||
20 | unexport LC_ALL | ||
21 | LC_CTYPE=C | ||
22 | LC_COLLATE=C | ||
23 | LC_NUMERIC=C | ||
24 | export LC_CTYPE LC_COLLATE LC_NUMERIC | ||
25 | |||
19 | # We are using a recursive build, so we need to do a little thinking | 26 | # We are using a recursive build, so we need to do a little thinking |
20 | # to get the ordering right. | 27 | # to get the ordering right. |
21 | # | 28 | # |
@@ -334,10 +341,9 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage | |||
334 | 341 | ||
335 | # Use LINUXINCLUDE when you must reference the include/ directory. | 342 | # Use LINUXINCLUDE when you must reference the include/ directory. |
336 | # Needed to be compatible with the O= option | 343 | # Needed to be compatible with the O= option |
337 | LINUXINCLUDE := -Iinclude \ | 344 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \ |
338 | $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \ | 345 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
339 | -I$(srctree)/arch/$(hdr-arch)/include \ | 346 | -include include/generated/autoconf.h |
340 | -include include/linux/autoconf.h | ||
341 | 347 | ||
342 | KBUILD_CPPFLAGS := -D__KERNEL__ | 348 | KBUILD_CPPFLAGS := -D__KERNEL__ |
343 | 349 | ||
@@ -465,7 +471,7 @@ ifeq ($(KBUILD_EXTMOD),) | |||
465 | # Carefully list dependencies so we do not try to build scripts twice | 471 | # Carefully list dependencies so we do not try to build scripts twice |
466 | # in parallel | 472 | # in parallel |
467 | PHONY += scripts | 473 | PHONY += scripts |
468 | scripts: scripts_basic include/config/auto.conf | 474 | scripts: scripts_basic include/config/auto.conf include/config/tristate.conf |
469 | $(Q)$(MAKE) $(build)=$(@) | 475 | $(Q)$(MAKE) $(build)=$(@) |
470 | 476 | ||
471 | # Objects we will link into vmlinux / subdirs we need to visit | 477 | # Objects we will link into vmlinux / subdirs we need to visit |
@@ -492,18 +498,18 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; | |||
492 | # with it and forgot to run make oldconfig. | 498 | # with it and forgot to run make oldconfig. |
493 | # if auto.conf.cmd is missing then we are probably in a cleaned tree so | 499 | # if auto.conf.cmd is missing then we are probably in a cleaned tree so |
494 | # we execute the config step to be sure to catch updated Kconfig files | 500 | # we execute the config step to be sure to catch updated Kconfig files |
495 | include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd | 501 | include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd |
496 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig | 502 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig |
497 | else | 503 | else |
498 | # external modules needs include/linux/autoconf.h and include/config/auto.conf | 504 | # external modules needs include/generated/autoconf.h and include/config/auto.conf |
499 | # but do not care if they are up-to-date. Use auto.conf to trigger the test | 505 | # but do not care if they are up-to-date. Use auto.conf to trigger the test |
500 | PHONY += include/config/auto.conf | 506 | PHONY += include/config/auto.conf |
501 | 507 | ||
502 | include/config/auto.conf: | 508 | include/config/auto.conf: |
503 | $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \ | 509 | $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \ |
504 | echo; \ | 510 | echo; \ |
505 | echo " ERROR: Kernel configuration is invalid."; \ | 511 | echo " ERROR: Kernel configuration is invalid."; \ |
506 | echo " include/linux/autoconf.h or $@ are missing."; \ | 512 | echo " include/generated/autoconf.h or $@ are missing.";\ |
507 | echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ | 513 | echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ |
508 | echo; \ | 514 | echo; \ |
509 | /bin/false) | 515 | /bin/false) |
@@ -877,6 +883,9 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; | |||
877 | PHONY += $(vmlinux-dirs) | 883 | PHONY += $(vmlinux-dirs) |
878 | $(vmlinux-dirs): prepare scripts | 884 | $(vmlinux-dirs): prepare scripts |
879 | $(Q)$(MAKE) $(build)=$@ | 885 | $(Q)$(MAKE) $(build)=$@ |
886 | ifdef CONFIG_MODULES | ||
887 | $(Q)$(MAKE) $(modbuiltin)=$@ | ||
888 | endif | ||
880 | 889 | ||
881 | # Build the kernel release string | 890 | # Build the kernel release string |
882 | # | 891 | # |
@@ -955,7 +964,6 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 | |||
955 | # prepare3 is used to check if we are building in a separate output directory, | 964 | # prepare3 is used to check if we are building in a separate output directory, |
956 | # and if so do: | 965 | # and if so do: |
957 | # 1) Check that make has not been executed in the kernel src $(srctree) | 966 | # 1) Check that make has not been executed in the kernel src $(srctree) |
958 | # 2) Create the include2 directory, used for the second asm symlink | ||
959 | prepare3: include/config/kernel.release | 967 | prepare3: include/config/kernel.release |
960 | ifneq ($(KBUILD_SRC),) | 968 | ifneq ($(KBUILD_SRC),) |
961 | @$(kecho) ' Using $(srctree) as source for kernel' | 969 | @$(kecho) ' Using $(srctree) as source for kernel' |
@@ -964,17 +972,13 @@ ifneq ($(KBUILD_SRC),) | |||
964 | echo " in the '$(srctree)' directory.";\ | 972 | echo " in the '$(srctree)' directory.";\ |
965 | /bin/false; \ | 973 | /bin/false; \ |
966 | fi; | 974 | fi; |
967 | $(Q)if [ ! -d include2 ]; then \ | ||
968 | mkdir -p include2; \ | ||
969 | ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ | ||
970 | fi | ||
971 | endif | 975 | endif |
972 | 976 | ||
973 | # prepare2 creates a makefile if using a separate output directory | 977 | # prepare2 creates a makefile if using a separate output directory |
974 | prepare2: prepare3 outputmakefile | 978 | prepare2: prepare3 outputmakefile |
975 | 979 | ||
976 | prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ | 980 | prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ |
977 | include/asm include/config/auto.conf | 981 | include/config/auto.conf |
978 | $(cmd_crmodverdir) | 982 | $(cmd_crmodverdir) |
979 | 983 | ||
980 | archprepare: prepare1 scripts_basic | 984 | archprepare: prepare1 scripts_basic |
@@ -986,42 +990,6 @@ prepare0: archprepare FORCE | |||
986 | # All the preparing.. | 990 | # All the preparing.. |
987 | prepare: prepare0 | 991 | prepare: prepare0 |
988 | 992 | ||
989 | # The asm symlink changes when $(ARCH) changes. | ||
990 | # Detect this and ask user to run make mrproper | ||
991 | # If asm is a stale symlink (point to dir that does not exist) remove it | ||
992 | define check-symlink | ||
993 | set -e; \ | ||
994 | if [ -L include/asm ]; then \ | ||
995 | asmlink=`readlink include/asm | cut -d '-' -f 2`; \ | ||
996 | if [ "$$asmlink" != "$(SRCARCH)" ]; then \ | ||
997 | echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \ | ||
998 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ | ||
999 | exit 1; \ | ||
1000 | fi; \ | ||
1001 | test -e $$asmlink || rm include/asm; \ | ||
1002 | elif [ -d include/asm ]; then \ | ||
1003 | echo "ERROR: $@ is a directory but a symlink was expected";\ | ||
1004 | exit 1; \ | ||
1005 | fi | ||
1006 | endef | ||
1007 | |||
1008 | # We create the target directory of the symlink if it does | ||
1009 | # not exist so the test in check-symlink works and we have a | ||
1010 | # directory for generated filesas used by some architectures. | ||
1011 | define create-symlink | ||
1012 | if [ ! -L include/asm ]; then \ | ||
1013 | $(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ | ||
1014 | if [ ! -d include/asm-$(SRCARCH) ]; then \ | ||
1015 | mkdir -p include/asm-$(SRCARCH); \ | ||
1016 | fi; \ | ||
1017 | ln -fsn asm-$(SRCARCH) $@; \ | ||
1018 | fi | ||
1019 | endef | ||
1020 | |||
1021 | include/asm: FORCE | ||
1022 | $(Q)$(check-symlink) | ||
1023 | $(Q)$(create-symlink) | ||
1024 | |||
1025 | # Generate some files | 993 | # Generate some files |
1026 | # --------------------------------------------------------------------------- | 994 | # --------------------------------------------------------------------------- |
1027 | 995 | ||
@@ -1046,7 +1014,7 @@ endef | |||
1046 | include/linux/version.h: $(srctree)/Makefile FORCE | 1014 | include/linux/version.h: $(srctree)/Makefile FORCE |
1047 | $(call filechk,version.h) | 1015 | $(call filechk,version.h) |
1048 | 1016 | ||
1049 | include/linux/utsrelease.h: include/config/kernel.release FORCE | 1017 | include/generated/utsrelease.h: include/config/kernel.release FORCE |
1050 | $(call filechk,utsrelease.h) | 1018 | $(call filechk,utsrelease.h) |
1051 | 1019 | ||
1052 | PHONY += headerdep | 1020 | PHONY += headerdep |
@@ -1076,11 +1044,6 @@ firmware_install: FORCE | |||
1076 | export INSTALL_HDR_PATH = $(objtree)/usr | 1044 | export INSTALL_HDR_PATH = $(objtree)/usr |
1077 | 1045 | ||
1078 | hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj | 1046 | hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj |
1079 | # Find out where the Kbuild file is located to support | ||
1080 | # arch/$(ARCH)/include/asm | ||
1081 | hdr-dir = $(strip \ | ||
1082 | $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/asm/Kbuild), \ | ||
1083 | arch/$(hdr-arch)/include/asm, include/asm-$(hdr-arch))) | ||
1084 | 1047 | ||
1085 | # If we do an all arch process set dst to asm-$(hdr-arch) | 1048 | # If we do an all arch process set dst to asm-$(hdr-arch) |
1086 | hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) | 1049 | hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) |
@@ -1095,10 +1058,10 @@ headers_install_all: | |||
1095 | 1058 | ||
1096 | PHONY += headers_install | 1059 | PHONY += headers_install |
1097 | headers_install: __headers | 1060 | headers_install: __headers |
1098 | $(if $(wildcard $(srctree)/$(hdr-dir)/Kbuild),, \ | 1061 | $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/asm/Kbuild),, \ |
1099 | $(error Headers not exportable for the $(SRCARCH) architecture)) | 1062 | $(error Headers not exportable for the $(SRCARCH) architecture)) |
1100 | $(Q)$(MAKE) $(hdr-inst)=include | 1063 | $(Q)$(MAKE) $(hdr-inst)=include |
1101 | $(Q)$(MAKE) $(hdr-inst)=$(hdr-dir) $(hdr-dst) | 1064 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst) |
1102 | 1065 | ||
1103 | PHONY += headers_check_all | 1066 | PHONY += headers_check_all |
1104 | headers_check_all: headers_install_all | 1067 | headers_check_all: headers_install_all |
@@ -1107,7 +1070,7 @@ headers_check_all: headers_install_all | |||
1107 | PHONY += headers_check | 1070 | PHONY += headers_check |
1108 | headers_check: headers_install | 1071 | headers_check: headers_install |
1109 | $(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1 | 1072 | $(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1 |
1110 | $(Q)$(MAKE) $(hdr-inst)=$(hdr-dir) $(hdr-dst) HDRCHECK=1 | 1073 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst) HDRCHECK=1 |
1111 | 1074 | ||
1112 | # --------------------------------------------------------------------------- | 1075 | # --------------------------------------------------------------------------- |
1113 | # Modules | 1076 | # Modules |
@@ -1127,6 +1090,7 @@ all: modules | |||
1127 | PHONY += modules | 1090 | PHONY += modules |
1128 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) | 1091 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) |
1129 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order | 1092 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order |
1093 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.builtin) > $(objtree)/modules.builtin | ||
1130 | @$(kecho) ' Building modules, stage 2.'; | 1094 | @$(kecho) ' Building modules, stage 2.'; |
1131 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1095 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1132 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild | 1096 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild |
@@ -1156,6 +1120,7 @@ _modinst_: | |||
1156 | ln -s $(objtree) $(MODLIB)/build ; \ | 1120 | ln -s $(objtree) $(MODLIB)/build ; \ |
1157 | fi | 1121 | fi |
1158 | @cp -f $(objtree)/modules.order $(MODLIB)/ | 1122 | @cp -f $(objtree)/modules.order $(MODLIB)/ |
1123 | @cp -f $(objtree)/modules.builtin $(MODLIB)/ | ||
1159 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst | 1124 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst |
1160 | 1125 | ||
1161 | # This depmod is only for convenience to give the initial | 1126 | # This depmod is only for convenience to give the initial |
@@ -1194,12 +1159,10 @@ CLEAN_FILES += vmlinux System.map \ | |||
1194 | .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map | 1159 | .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map |
1195 | 1160 | ||
1196 | # Directories & files removed with 'make mrproper' | 1161 | # Directories & files removed with 'make mrproper' |
1197 | MRPROPER_DIRS += include/config include2 usr/include include/generated | 1162 | MRPROPER_DIRS += include/config usr/include include/generated |
1198 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ | 1163 | MRPROPER_FILES += .config .config.old .version .old_version \ |
1199 | include/linux/autoconf.h include/linux/version.h \ | 1164 | include/linux/version.h \ |
1200 | include/linux/utsrelease.h \ | 1165 | Module.symvers tags TAGS cscope* |
1201 | include/linux/bounds.h include/asm*/asm-offsets.h \ | ||
1202 | Module.symvers Module.markers tags TAGS cscope* | ||
1203 | 1166 | ||
1204 | # clean - Delete most, but leave enough to build external modules | 1167 | # clean - Delete most, but leave enough to build external modules |
1205 | # | 1168 | # |
@@ -1218,7 +1181,7 @@ clean: archclean $(clean-dirs) | |||
1218 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | 1181 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ |
1219 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | 1182 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ |
1220 | -o -name '*.symtypes' -o -name 'modules.order' \ | 1183 | -o -name '*.symtypes' -o -name 'modules.order' \ |
1221 | -o -name 'Module.markers' -o -name '.tmp_*.o.*' \ | 1184 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ |
1222 | -o -name '*.gcno' \) -type f -print | xargs rm -f | 1185 | -o -name '*.gcno' \) -type f -print | xargs rm -f |
1223 | 1186 | ||
1224 | # mrproper - Delete all generated files, including .config | 1187 | # mrproper - Delete all generated files, including .config |
@@ -1416,8 +1379,8 @@ $(clean-dirs): | |||
1416 | 1379 | ||
1417 | clean: rm-dirs := $(MODVERDIR) | 1380 | clean: rm-dirs := $(MODVERDIR) |
1418 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1381 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ |
1419 | $(KBUILD_EXTMOD)/Module.markers \ | 1382 | $(KBUILD_EXTMOD)/modules.order \ |
1420 | $(KBUILD_EXTMOD)/modules.order | 1383 | $(KBUILD_EXTMOD)/modules.builtin |
1421 | clean: $(clean-dirs) | 1384 | clean: $(clean-dirs) |
1422 | $(call cmd,rmdirs) | 1385 | $(call cmd,rmdirs) |
1423 | $(call cmd,rmfiles) | 1386 | $(call cmd,rmfiles) |