diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 09:43:54 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 10:06:11 -0400 |
commit | 7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch) | |
tree | 5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /Makefile | |
parent | 7d754596756240fa918b94cd0c3011c77a638987 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) |
Merge 'Linux v3.0' into Litmus
Some notes:
* Litmus^RT scheduling class is the topmost scheduling class
(above stop_sched_class).
* scheduler_ipi() function (e.g., in smp_reschedule_interrupt())
may increase IPI latencies.
* Added path into schedule() to quickly re-evaluate scheduling
decision without becoming preemptive again. This used to be
a standard path before the removal of BKL.
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/smp.c
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/printk.c
kernel/sched.c
kernel/sched_fair.c
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 160 |
1 files changed, 104 insertions, 56 deletions
@@ -1,8 +1,8 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 3 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 0 |
3 | SUBLEVEL = 36 | 3 | SUBLEVEL = 0 |
4 | EXTRAVERSION =-litmus2010 | 4 | EXTRAVERSION =-litmus |
5 | NAME = Flesh-Eating Bats with Fangs | 5 | NAME = Sneaky Weasel |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
@@ -102,6 +102,10 @@ ifeq ("$(origin O)", "command line") | |||
102 | KBUILD_OUTPUT := $(O) | 102 | KBUILD_OUTPUT := $(O) |
103 | endif | 103 | endif |
104 | 104 | ||
105 | ifeq ("$(origin W)", "command line") | ||
106 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) | ||
107 | endif | ||
108 | |||
105 | # That's our default target when none is given on the command line | 109 | # That's our default target when none is given on the command line |
106 | PHONY := _all | 110 | PHONY := _all |
107 | _all: | 111 | _all: |
@@ -204,6 +208,9 @@ ifeq ($(ARCH),x86_64) | |||
204 | endif | 208 | endif |
205 | 209 | ||
206 | # Additional ARCH settings for sparc | 210 | # Additional ARCH settings for sparc |
211 | ifeq ($(ARCH),sparc32) | ||
212 | SRCARCH := sparc | ||
213 | endif | ||
207 | ifeq ($(ARCH),sparc64) | 214 | ifeq ($(ARCH),sparc64) |
208 | SRCARCH := sparc | 215 | SRCARCH := sparc |
209 | endif | 216 | endif |
@@ -213,6 +220,14 @@ ifeq ($(ARCH),sh64) | |||
213 | SRCARCH := sh | 220 | SRCARCH := sh |
214 | endif | 221 | endif |
215 | 222 | ||
223 | # Additional ARCH settings for tile | ||
224 | ifeq ($(ARCH),tilepro) | ||
225 | SRCARCH := tile | ||
226 | endif | ||
227 | ifeq ($(ARCH),tilegx) | ||
228 | SRCARCH := tile | ||
229 | endif | ||
230 | |||
216 | # Where to locate arch specific headers | 231 | # Where to locate arch specific headers |
217 | hdr-arch := $(SRCARCH) | 232 | hdr-arch := $(SRCARCH) |
218 | 233 | ||
@@ -221,6 +236,7 @@ ifeq ($(ARCH),m68knommu) | |||
221 | endif | 236 | endif |
222 | 237 | ||
223 | KCONFIG_CONFIG ?= .config | 238 | KCONFIG_CONFIG ?= .config |
239 | export KCONFIG_CONFIG | ||
224 | 240 | ||
225 | # SHELL used by kbuild | 241 | # SHELL used by kbuild |
226 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 242 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
@@ -341,7 +357,8 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage | |||
341 | 357 | ||
342 | # Use LINUXINCLUDE when you must reference the include/ directory. | 358 | # Use LINUXINCLUDE when you must reference the include/ directory. |
343 | # Needed to be compatible with the O= option | 359 | # Needed to be compatible with the O= option |
344 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \ | 360 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \ |
361 | -Iarch/$(hdr-arch)/include/generated -Iinclude \ | ||
345 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 362 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
346 | -include include/generated/autoconf.h | 363 | -include include/generated/autoconf.h |
347 | 364 | ||
@@ -361,7 +378,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds | |||
361 | 378 | ||
362 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 379 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
363 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | 380 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
364 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 381 | KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) |
365 | 382 | ||
366 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 383 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
367 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 384 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
@@ -374,6 +391,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV | |||
374 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 391 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
375 | export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE | 392 | export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE |
376 | export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL | 393 | export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL |
394 | export KBUILD_ARFLAGS | ||
377 | 395 | ||
378 | # When compiling out-of-tree modules, put MODVERDIR in the module | 396 | # When compiling out-of-tree modules, put MODVERDIR in the module |
379 | # tree rather than in the kernel tree. The kernel tree might | 397 | # tree rather than in the kernel tree. The kernel tree might |
@@ -408,6 +426,12 @@ ifneq ($(KBUILD_SRC),) | |||
408 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) | 426 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) |
409 | endif | 427 | endif |
410 | 428 | ||
429 | # Support for using generic headers in asm-generic | ||
430 | PHONY += asm-generic | ||
431 | asm-generic: | ||
432 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ | ||
433 | obj=arch/$(SRCARCH)/include/generated/asm | ||
434 | |||
411 | # To make sure we do not include .config for any of the *config targets | 435 | # To make sure we do not include .config for any of the *config targets |
412 | # catch them early, and hand them over to scripts/kconfig/Makefile | 436 | # catch them early, and hand them over to scripts/kconfig/Makefile |
413 | # It is allowed to specify more targets when calling make, including | 437 | # It is allowed to specify more targets when calling make, including |
@@ -417,7 +441,7 @@ endif | |||
417 | # of make so .config is not included in this case either (for *config). | 441 | # of make so .config is not included in this case either (for *config). |
418 | 442 | ||
419 | no-dot-config-targets := clean mrproper distclean \ | 443 | no-dot-config-targets := clean mrproper distclean \ |
420 | cscope TAGS tags help %docs check% coccicheck \ | 444 | cscope gtags TAGS tags help %docs check% coccicheck \ |
421 | include/linux/version.h headers_% \ | 445 | include/linux/version.h headers_% \ |
422 | kernelversion %src-pkg | 446 | kernelversion %src-pkg |
423 | 447 | ||
@@ -551,11 +575,22 @@ ifndef CONFIG_CC_STACKPROTECTOR | |||
551 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) | 575 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
552 | endif | 576 | endif |
553 | 577 | ||
578 | # This warning generated too much noise in a regular build. | ||
579 | # Use make W=1 to enable this warning (see scripts/Makefile.build) | ||
580 | KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) | ||
581 | |||
554 | ifdef CONFIG_FRAME_POINTER | 582 | ifdef CONFIG_FRAME_POINTER |
555 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 583 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls |
556 | else | 584 | else |
585 | # Some targets (ARM with Thumb2, for example), can't be built with frame | ||
586 | # pointers. For those, we don't have FUNCTION_TRACER automatically | ||
587 | # select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is | ||
588 | # incompatible with -fomit-frame-pointer with current GCC, so we don't use | ||
589 | # -fomit-frame-pointer with FUNCTION_TRACER. | ||
590 | ifndef CONFIG_FUNCTION_TRACER | ||
557 | KBUILD_CFLAGS += -fomit-frame-pointer | 591 | KBUILD_CFLAGS += -fomit-frame-pointer |
558 | endif | 592 | endif |
593 | endif | ||
559 | 594 | ||
560 | ifdef CONFIG_DEBUG_INFO | 595 | ifdef CONFIG_DEBUG_INFO |
561 | KBUILD_CFLAGS += -g | 596 | KBUILD_CFLAGS += -g |
@@ -568,6 +603,12 @@ endif | |||
568 | 603 | ||
569 | ifdef CONFIG_FUNCTION_TRACER | 604 | ifdef CONFIG_FUNCTION_TRACER |
570 | KBUILD_CFLAGS += -pg | 605 | KBUILD_CFLAGS += -pg |
606 | ifdef CONFIG_DYNAMIC_FTRACE | ||
607 | ifdef CONFIG_HAVE_C_RECORDMCOUNT | ||
608 | BUILD_C_RECORDMCOUNT := y | ||
609 | export BUILD_C_RECORDMCOUNT | ||
610 | endif | ||
611 | endif | ||
571 | endif | 612 | endif |
572 | 613 | ||
573 | # We trigger additional mismatches with less inlining | 614 | # We trigger additional mismatches with less inlining |
@@ -583,7 +624,7 @@ CHECKFLAGS += $(NOSTDINC_FLAGS) | |||
583 | KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) | 624 | KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
584 | 625 | ||
585 | # disable pointer signed / unsigned warnings in gcc 4.0 | 626 | # disable pointer signed / unsigned warnings in gcc 4.0 |
586 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) | 627 | KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) |
587 | 628 | ||
588 | # disable invalid "can't wrap" optimizations for signed / pointers | 629 | # disable invalid "can't wrap" optimizations for signed / pointers |
589 | KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) | 630 | KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) |
@@ -591,6 +632,14 @@ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) | |||
591 | # conserve stack if available | 632 | # conserve stack if available |
592 | KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) | 633 | KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) |
593 | 634 | ||
635 | # use the deterministic mode of AR if available | ||
636 | KBUILD_ARFLAGS := $(call ar-option,D) | ||
637 | |||
638 | # check for 'asm goto' | ||
639 | ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y) | ||
640 | KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO | ||
641 | endif | ||
642 | |||
594 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 643 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
595 | # But warn user when we do so | 644 | # But warn user when we do so |
596 | warn-assign = \ | 645 | warn-assign = \ |
@@ -644,7 +693,7 @@ export MODLIB | |||
644 | # INSTALL_MOD_STRIP, if defined, will cause modules to be | 693 | # INSTALL_MOD_STRIP, if defined, will cause modules to be |
645 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | 694 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
646 | # the default option --strip-debug will be used. Otherwise, | 695 | # the default option --strip-debug will be used. Otherwise, |
647 | # INSTALL_MOD_STRIP will used as the options to the strip command. | 696 | # INSTALL_MOD_STRIP value will be used as the options to the strip command. |
648 | 697 | ||
649 | ifdef INSTALL_MOD_STRIP | 698 | ifdef INSTALL_MOD_STRIP |
650 | ifeq ($(INSTALL_MOD_STRIP),1) | 699 | ifeq ($(INSTALL_MOD_STRIP),1) |
@@ -771,15 +820,17 @@ ifdef CONFIG_KALLSYMS | |||
771 | # o The correct .tmp_kallsyms2.o is linked into the final vmlinux. | 820 | # o The correct .tmp_kallsyms2.o is linked into the final vmlinux. |
772 | # o Verify that the System.map from vmlinux matches the map from | 821 | # o Verify that the System.map from vmlinux matches the map from |
773 | # .tmp_vmlinux2, just in case we did not generate kallsyms correctly. | 822 | # .tmp_vmlinux2, just in case we did not generate kallsyms correctly. |
774 | # o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using | 823 | # o If 'make KALLSYMS_EXTRA_PASS=1" was used, do an extra pass using |
775 | # .tmp_vmlinux3 and .tmp_kallsyms3.o. This is only meant as a | 824 | # .tmp_vmlinux3 and .tmp_kallsyms3.o. This is only meant as a |
776 | # temporary bypass to allow the kernel to be built while the | 825 | # temporary bypass to allow the kernel to be built while the |
777 | # maintainers work out what went wrong with kallsyms. | 826 | # maintainers work out what went wrong with kallsyms. |
778 | 827 | ||
779 | ifdef CONFIG_KALLSYMS_EXTRA_PASS | ||
780 | last_kallsyms := 3 | ||
781 | else | ||
782 | last_kallsyms := 2 | 828 | last_kallsyms := 2 |
829 | |||
830 | ifdef KALLSYMS_EXTRA_PASS | ||
831 | ifneq ($(KALLSYMS_EXTRA_PASS),0) | ||
832 | last_kallsyms := 3 | ||
833 | endif | ||
783 | endif | 834 | endif |
784 | 835 | ||
785 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o | 836 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o |
@@ -790,7 +841,8 @@ define verify_kallsyms | |||
790 | $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map | 841 | $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map |
791 | $(Q)cmp -s System.map .tmp_System.map || \ | 842 | $(Q)cmp -s System.map .tmp_System.map || \ |
792 | (echo Inconsistent kallsyms data; \ | 843 | (echo Inconsistent kallsyms data; \ |
793 | echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \ | 844 | echo This is a bug - please report about it; \ |
845 | echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround; \ | ||
794 | rm .tmp_kallsyms* ; /bin/false ) | 846 | rm .tmp_kallsyms* ; /bin/false ) |
795 | endef | 847 | endef |
796 | 848 | ||
@@ -921,7 +973,7 @@ ifneq ($(KBUILD_SRC),) | |||
921 | endif | 973 | endif |
922 | 974 | ||
923 | # prepare2 creates a makefile if using a separate output directory | 975 | # prepare2 creates a makefile if using a separate output directory |
924 | prepare2: prepare3 outputmakefile | 976 | prepare2: prepare3 outputmakefile asm-generic |
925 | 977 | ||
926 | prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ | 978 | prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ |
927 | include/config/auto.conf | 979 | include/config/auto.conf |
@@ -953,7 +1005,7 @@ endef | |||
953 | 1005 | ||
954 | define filechk_version.h | 1006 | define filechk_version.h |
955 | (echo \#define LINUX_VERSION_CODE $(shell \ | 1007 | (echo \#define LINUX_VERSION_CODE $(shell \ |
956 | expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ | 1008 | expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ |
957 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) | 1009 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) |
958 | endef | 1010 | endef |
959 | 1011 | ||
@@ -965,7 +1017,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE | |||
965 | 1017 | ||
966 | PHONY += headerdep | 1018 | PHONY += headerdep |
967 | headerdep: | 1019 | headerdep: |
968 | $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl | 1020 | $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \ |
1021 | $(srctree)/scripts/headerdep.pl -I$(srctree)/include | ||
969 | 1022 | ||
970 | # --------------------------------------------------------------------------- | 1023 | # --------------------------------------------------------------------------- |
971 | 1024 | ||
@@ -995,8 +1048,8 @@ hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj | |||
995 | hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) | 1048 | hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) |
996 | 1049 | ||
997 | PHONY += __headers | 1050 | PHONY += __headers |
998 | __headers: include/linux/version.h scripts_basic FORCE | 1051 | __headers: include/linux/version.h scripts_basic asm-generic FORCE |
999 | $(Q)$(MAKE) $(build)=scripts scripts/unifdef | 1052 | $(Q)$(MAKE) $(build)=scripts build_unifdef |
1000 | 1053 | ||
1001 | PHONY += headers_install_all | 1054 | PHONY += headers_install_all |
1002 | headers_install_all: | 1055 | headers_install_all: |
@@ -1057,11 +1110,6 @@ modules_install: _modinst_ _modinst_post | |||
1057 | 1110 | ||
1058 | PHONY += _modinst_ | 1111 | PHONY += _modinst_ |
1059 | _modinst_: | 1112 | _modinst_: |
1060 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ | ||
1061 | echo "Warning: you may need to install module-init-tools"; \ | ||
1062 | echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ | ||
1063 | sleep 1; \ | ||
1064 | fi | ||
1065 | @rm -rf $(MODLIB)/kernel | 1113 | @rm -rf $(MODLIB)/kernel |
1066 | @rm -f $(MODLIB)/source | 1114 | @rm -f $(MODLIB)/source |
1067 | @mkdir -p $(MODLIB)/kernel | 1115 | @mkdir -p $(MODLIB)/kernel |
@@ -1110,30 +1158,23 @@ CLEAN_FILES += vmlinux System.map \ | |||
1110 | .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map | 1158 | .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map |
1111 | 1159 | ||
1112 | # Directories & files removed with 'make mrproper' | 1160 | # Directories & files removed with 'make mrproper' |
1113 | MRPROPER_DIRS += include/config usr/include include/generated | 1161 | MRPROPER_DIRS += include/config usr/include include/generated \ |
1162 | arch/*/include/generated | ||
1114 | MRPROPER_FILES += .config .config.old .version .old_version \ | 1163 | MRPROPER_FILES += .config .config.old .version .old_version \ |
1115 | include/linux/version.h \ | 1164 | include/linux/version.h \ |
1116 | Module.symvers tags TAGS cscope* | 1165 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS |
1117 | 1166 | ||
1118 | # clean - Delete most, but leave enough to build external modules | 1167 | # clean - Delete most, but leave enough to build external modules |
1119 | # | 1168 | # |
1120 | clean: rm-dirs := $(CLEAN_DIRS) | 1169 | clean: rm-dirs := $(CLEAN_DIRS) |
1121 | clean: rm-files := $(CLEAN_FILES) | 1170 | clean: rm-files := $(CLEAN_FILES) |
1122 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) | 1171 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
1123 | 1172 | ||
1124 | PHONY += $(clean-dirs) clean archclean | 1173 | PHONY += $(clean-dirs) clean archclean |
1125 | $(clean-dirs): | 1174 | $(clean-dirs): |
1126 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1175 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1127 | 1176 | ||
1128 | clean: archclean $(clean-dirs) | 1177 | clean: archclean |
1129 | $(call cmd,rmdirs) | ||
1130 | $(call cmd,rmfiles) | ||
1131 | @find . $(RCS_FIND_IGNORE) \ | ||
1132 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1133 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1134 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1135 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1136 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1137 | 1178 | ||
1138 | # mrproper - Delete all generated files, including .config | 1179 | # mrproper - Delete all generated files, including .config |
1139 | # | 1180 | # |
@@ -1208,6 +1249,7 @@ help: | |||
1208 | @echo ' modules_prepare - Set up for building external modules' | 1249 | @echo ' modules_prepare - Set up for building external modules' |
1209 | @echo ' tags/TAGS - Generate tags file for editors' | 1250 | @echo ' tags/TAGS - Generate tags file for editors' |
1210 | @echo ' cscope - Generate cscope index' | 1251 | @echo ' cscope - Generate cscope index' |
1252 | @echo ' gtags - Generate GNU GLOBAL index' | ||
1211 | @echo ' kernelrelease - Output the release version string' | 1253 | @echo ' kernelrelease - Output the release version string' |
1212 | @echo ' kernelversion - Output the version stored in Makefile' | 1254 | @echo ' kernelversion - Output the version stored in Makefile' |
1213 | @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ | 1255 | @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ |
@@ -1248,6 +1290,12 @@ help: | |||
1248 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' | 1290 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' |
1249 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' | 1291 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' |
1250 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' | 1292 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' |
1293 | @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where' | ||
1294 | @echo ' 1: warnings which may be relevant and do not occur too often' | ||
1295 | @echo ' 2: warnings which occur quite often but may still be relevant' | ||
1296 | @echo ' 3: more obscure warnings, can most likely be ignored' | ||
1297 | @echo ' Multiple levels can be combined with W=12 or W=123' | ||
1298 | @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' | ||
1251 | @echo '' | 1299 | @echo '' |
1252 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | 1300 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' |
1253 | @echo 'For further info see the ./README file' | 1301 | @echo 'For further info see the ./README file' |
@@ -1270,6 +1318,7 @@ $(help-board-dirs): help-%: | |||
1270 | # Documentation targets | 1318 | # Documentation targets |
1271 | # --------------------------------------------------------------------------- | 1319 | # --------------------------------------------------------------------------- |
1272 | %docs: scripts_basic FORCE | 1320 | %docs: scripts_basic FORCE |
1321 | $(Q)$(MAKE) $(build)=scripts build_docproc | ||
1273 | $(Q)$(MAKE) $(build)=Documentation/DocBook $@ | 1322 | $(Q)$(MAKE) $(build)=Documentation/DocBook $@ |
1274 | 1323 | ||
1275 | else # KBUILD_EXTMOD | 1324 | else # KBUILD_EXTMOD |
@@ -1334,16 +1383,7 @@ $(clean-dirs): | |||
1334 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1383 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1335 | 1384 | ||
1336 | clean: rm-dirs := $(MODVERDIR) | 1385 | clean: rm-dirs := $(MODVERDIR) |
1337 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1386 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
1338 | $(KBUILD_EXTMOD)/modules.order \ | ||
1339 | $(KBUILD_EXTMOD)/modules.builtin | ||
1340 | clean: $(clean-dirs) | ||
1341 | $(call cmd,rmdirs) | ||
1342 | $(call cmd,rmfiles) | ||
1343 | @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ | ||
1344 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1345 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1346 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1347 | 1387 | ||
1348 | help: | 1388 | help: |
1349 | @echo ' Building external modules.' | 1389 | @echo ' Building external modules.' |
@@ -1360,24 +1400,36 @@ prepare: ; | |||
1360 | scripts: ; | 1400 | scripts: ; |
1361 | endif # KBUILD_EXTMOD | 1401 | endif # KBUILD_EXTMOD |
1362 | 1402 | ||
1403 | clean: $(clean-dirs) | ||
1404 | $(call cmd,rmdirs) | ||
1405 | $(call cmd,rmfiles) | ||
1406 | @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | ||
1407 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1408 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1409 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1410 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1411 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1412 | |||
1363 | # Generate tags for editors | 1413 | # Generate tags for editors |
1364 | # --------------------------------------------------------------------------- | 1414 | # --------------------------------------------------------------------------- |
1365 | quiet_cmd_tags = GEN $@ | 1415 | quiet_cmd_tags = GEN $@ |
1366 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ | 1416 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ |
1367 | 1417 | ||
1368 | tags TAGS cscope: FORCE | 1418 | tags TAGS cscope gtags: FORCE |
1369 | $(call cmd,tags) | 1419 | $(call cmd,tags) |
1370 | 1420 | ||
1371 | # Scripts to check various things for consistency | 1421 | # Scripts to check various things for consistency |
1372 | # --------------------------------------------------------------------------- | 1422 | # --------------------------------------------------------------------------- |
1373 | 1423 | ||
1424 | PHONY += includecheck versioncheck coccicheck namespacecheck export_report | ||
1425 | |||
1374 | includecheck: | 1426 | includecheck: |
1375 | find * $(RCS_FIND_IGNORE) \ | 1427 | find $(srctree)/* $(RCS_FIND_IGNORE) \ |
1376 | -name '*.[hcS]' -type f -print | sort \ | 1428 | -name '*.[hcS]' -type f -print | sort \ |
1377 | | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl | 1429 | | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl |
1378 | 1430 | ||
1379 | versioncheck: | 1431 | versioncheck: |
1380 | find * $(RCS_FIND_IGNORE) \ | 1432 | find $(srctree)/* $(RCS_FIND_IGNORE) \ |
1381 | -name '*.[hcS]' -type f -print | sort \ | 1433 | -name '*.[hcS]' -type f -print | sort \ |
1382 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl | 1434 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl |
1383 | 1435 | ||
@@ -1474,12 +1526,8 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) | |||
1474 | 1526 | ||
1475 | # Run depmod only if we have System.map and depmod is executable | 1527 | # Run depmod only if we have System.map and depmod is executable |
1476 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | 1528 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) |
1477 | cmd_depmod = \ | 1529 | cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \ |
1478 | if [ -r System.map -a -x $(DEPMOD) ]; then \ | 1530 | $(KERNELRELEASE) |
1479 | $(DEPMOD) -ae -F System.map \ | ||
1480 | $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) ) \ | ||
1481 | $(KERNELRELEASE); \ | ||
1482 | fi | ||
1483 | 1531 | ||
1484 | # Create temporary dir for module support files | 1532 | # Create temporary dir for module support files |
1485 | # clean it up only when building all modules | 1533 | # clean it up only when building all modules |