aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 09:43:54 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 10:06:11 -0400
commit7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch)
tree5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /Makefile
parent7d754596756240fa918b94cd0c3011c77a638987 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (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--Makefile160
1 files changed, 104 insertions, 56 deletions
diff --git a/Makefile b/Makefile
index 8e53f47a311b..a32772541d0e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
1VERSION = 2 1VERSION = 3
2PATCHLEVEL = 6 2PATCHLEVEL = 0
3SUBLEVEL = 36 3SUBLEVEL = 0
4EXTRAVERSION =-litmus2010 4EXTRAVERSION =-litmus
5NAME = Flesh-Eating Bats with Fangs 5NAME = 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)
103endif 103endif
104 104
105ifeq ("$(origin W)", "command line")
106 export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
107endif
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
106PHONY := _all 110PHONY := _all
107_all: 111_all:
@@ -204,6 +208,9 @@ ifeq ($(ARCH),x86_64)
204endif 208endif
205 209
206# Additional ARCH settings for sparc 210# Additional ARCH settings for sparc
211ifeq ($(ARCH),sparc32)
212 SRCARCH := sparc
213endif
207ifeq ($(ARCH),sparc64) 214ifeq ($(ARCH),sparc64)
208 SRCARCH := sparc 215 SRCARCH := sparc
209endif 216endif
@@ -213,6 +220,14 @@ ifeq ($(ARCH),sh64)
213 SRCARCH := sh 220 SRCARCH := sh
214endif 221endif
215 222
223# Additional ARCH settings for tile
224ifeq ($(ARCH),tilepro)
225 SRCARCH := tile
226endif
227ifeq ($(ARCH),tilegx)
228 SRCARCH := tile
229endif
230
216# Where to locate arch specific headers 231# Where to locate arch specific headers
217hdr-arch := $(SRCARCH) 232hdr-arch := $(SRCARCH)
218 233
@@ -221,6 +236,7 @@ ifeq ($(ARCH),m68knommu)
221endif 236endif
222 237
223KCONFIG_CONFIG ?= .config 238KCONFIG_CONFIG ?= .config
239export KCONFIG_CONFIG
224 240
225# SHELL used by kbuild 241# SHELL used by kbuild
226CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ 242CONFIG_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
344LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \ 360LINUXINCLUDE := -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)
363KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) 380KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
364KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) 381KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
365 382
366export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION 383export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
367export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC 384export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
@@ -374,6 +391,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
374export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 391export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
375export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE 392export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
376export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL 393export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
394export 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)
409endif 427endif
410 428
429# Support for using generic headers in asm-generic
430PHONY += asm-generic
431asm-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
419no-dot-config-targets := clean mrproper distclean \ 443no-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
551KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) 575KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
552endif 576endif
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)
580KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
581
554ifdef CONFIG_FRAME_POINTER 582ifdef CONFIG_FRAME_POINTER
555KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 583KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
556else 584else
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.
590ifndef CONFIG_FUNCTION_TRACER
557KBUILD_CFLAGS += -fomit-frame-pointer 591KBUILD_CFLAGS += -fomit-frame-pointer
558endif 592endif
593endif
559 594
560ifdef CONFIG_DEBUG_INFO 595ifdef CONFIG_DEBUG_INFO
561KBUILD_CFLAGS += -g 596KBUILD_CFLAGS += -g
@@ -568,6 +603,12 @@ endif
568 603
569ifdef CONFIG_FUNCTION_TRACER 604ifdef CONFIG_FUNCTION_TRACER
570KBUILD_CFLAGS += -pg 605KBUILD_CFLAGS += -pg
606ifdef CONFIG_DYNAMIC_FTRACE
607 ifdef CONFIG_HAVE_C_RECORDMCOUNT
608 BUILD_C_RECORDMCOUNT := y
609 export BUILD_C_RECORDMCOUNT
610 endif
611endif
571endif 612endif
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)
583KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 624KBUILD_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
586KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 627KBUILD_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
589KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) 630KBUILD_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
592KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) 633KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
593 634
635# use the deterministic mode of AR if available
636KBUILD_ARFLAGS := $(call ar-option,D)
637
638# check for 'asm goto'
639ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
640 KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
641endif
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
596warn-assign = \ 645warn-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
649ifdef INSTALL_MOD_STRIP 698ifdef INSTALL_MOD_STRIP
650ifeq ($(INSTALL_MOD_STRIP),1) 699ifeq ($(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
779ifdef CONFIG_KALLSYMS_EXTRA_PASS
780last_kallsyms := 3
781else
782last_kallsyms := 2 828last_kallsyms := 2
829
830ifdef KALLSYMS_EXTRA_PASS
831ifneq ($(KALLSYMS_EXTRA_PASS),0)
832last_kallsyms := 3
833endif
783endif 834endif
784 835
785kallsyms.o := .tmp_kallsyms$(last_kallsyms).o 836kallsyms.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 )
795endef 847endef
796 848
@@ -921,7 +973,7 @@ ifneq ($(KBUILD_SRC),)
921endif 973endif
922 974
923# prepare2 creates a makefile if using a separate output directory 975# prepare2 creates a makefile if using a separate output directory
924prepare2: prepare3 outputmakefile 976prepare2: prepare3 outputmakefile asm-generic
925 977
926prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ 978prepare1: 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
954define filechk_version.h 1006define 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))';)
958endef 1010endef
959 1011
@@ -965,7 +1017,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE
965 1017
966PHONY += headerdep 1018PHONY += headerdep
967headerdep: 1019headerdep:
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
995hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) 1048hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
996 1049
997PHONY += __headers 1050PHONY += __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
1001PHONY += headers_install_all 1054PHONY += headers_install_all
1002headers_install_all: 1055headers_install_all:
@@ -1057,11 +1110,6 @@ modules_install: _modinst_ _modinst_post
1057 1110
1058PHONY += _modinst_ 1111PHONY += _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'
1113MRPROPER_DIRS += include/config usr/include include/generated 1161MRPROPER_DIRS += include/config usr/include include/generated \
1162 arch/*/include/generated
1114MRPROPER_FILES += .config .config.old .version .old_version \ 1163MRPROPER_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#
1120clean: rm-dirs := $(CLEAN_DIRS) 1169clean: rm-dirs := $(CLEAN_DIRS)
1121clean: rm-files := $(CLEAN_FILES) 1170clean: rm-files := $(CLEAN_FILES)
1122clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) 1171clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
1123 1172
1124PHONY += $(clean-dirs) clean archclean 1173PHONY += $(clean-dirs) clean archclean
1125$(clean-dirs): 1174$(clean-dirs):
1126 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1175 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1127 1176
1128clean: archclean $(clean-dirs) 1177clean: 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
1275else # KBUILD_EXTMOD 1324else # KBUILD_EXTMOD
@@ -1334,16 +1383,7 @@ $(clean-dirs):
1334 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1383 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1335 1384
1336clean: rm-dirs := $(MODVERDIR) 1385clean: rm-dirs := $(MODVERDIR)
1337clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ 1386clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
1338 $(KBUILD_EXTMOD)/modules.order \
1339 $(KBUILD_EXTMOD)/modules.builtin
1340clean: $(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
1348help: 1388help:
1349 @echo ' Building external modules.' 1389 @echo ' Building external modules.'
@@ -1360,24 +1400,36 @@ prepare: ;
1360scripts: ; 1400scripts: ;
1361endif # KBUILD_EXTMOD 1401endif # KBUILD_EXTMOD
1362 1402
1403clean: $(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# ---------------------------------------------------------------------------
1365quiet_cmd_tags = GEN $@ 1415quiet_cmd_tags = GEN $@
1366 cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ 1416 cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
1367 1417
1368tags TAGS cscope: FORCE 1418tags 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
1424PHONY += includecheck versioncheck coccicheck namespacecheck export_report
1425
1374includecheck: 1426includecheck:
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
1379versioncheck: 1431versioncheck:
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
1476quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) 1528quiet_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