diff options
author | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
commit | b2576e1d4408e134e2188c967b1f28af39cd79d4 (patch) | |
tree | 004f3c82faab760f304ce031d6d2f572e7746a50 /Makefile | |
parent | 3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff) | |
parent | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff) |
Merge branch 'linus' into release
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 222 |
1 files changed, 75 insertions, 147 deletions
@@ -205,13 +205,14 @@ ifeq ($(ARCH),x86_64) | |||
205 | SRCARCH := x86 | 205 | SRCARCH := x86 |
206 | endif | 206 | endif |
207 | 207 | ||
208 | # Where to locate arch specific headers | 208 | # Additional ARCH settings for sparc |
209 | ifeq ($(ARCH),sparc64) | 209 | ifeq ($(ARCH),sparc64) |
210 | hdr-arch := sparc | 210 | SRCARCH := sparc |
211 | else | ||
212 | hdr-arch := $(SRCARCH) | ||
213 | endif | 211 | endif |
214 | 212 | ||
213 | # Where to locate arch specific headers | ||
214 | hdr-arch := $(SRCARCH) | ||
215 | |||
215 | KCONFIG_CONFIG ?= .config | 216 | KCONFIG_CONFIG ?= .config |
216 | 217 | ||
217 | # SHELL used by kbuild | 218 | # SHELL used by kbuild |
@@ -320,7 +321,8 @@ KALLSYMS = scripts/kallsyms | |||
320 | PERL = perl | 321 | PERL = perl |
321 | CHECK = sparse | 322 | CHECK = sparse |
322 | 323 | ||
323 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF) | 324 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
325 | -Wbitwise -Wno-return-void $(CF) | ||
324 | MODFLAGS = -DMODULE | 326 | MODFLAGS = -DMODULE |
325 | CFLAGS_MODULE = $(MODFLAGS) | 327 | CFLAGS_MODULE = $(MODFLAGS) |
326 | AFLAGS_MODULE = $(MODFLAGS) | 328 | AFLAGS_MODULE = $(MODFLAGS) |
@@ -336,7 +338,7 @@ LINUXINCLUDE := -Iinclude \ | |||
336 | -I$(srctree)/arch/$(hdr-arch)/include \ | 338 | -I$(srctree)/arch/$(hdr-arch)/include \ |
337 | -include include/linux/autoconf.h | 339 | -include include/linux/autoconf.h |
338 | 340 | ||
339 | KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | 341 | KBUILD_CPPFLAGS := -D__KERNEL__ |
340 | 342 | ||
341 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 343 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
342 | -fno-strict-aliasing -fno-common \ | 344 | -fno-strict-aliasing -fno-common \ |
@@ -439,7 +441,11 @@ ifeq ($(config-targets),1) | |||
439 | include $(srctree)/arch/$(SRCARCH)/Makefile | 441 | include $(srctree)/arch/$(SRCARCH)/Makefile |
440 | export KBUILD_DEFCONFIG KBUILD_KCONFIG | 442 | export KBUILD_DEFCONFIG KBUILD_KCONFIG |
441 | 443 | ||
442 | config %config: scripts_basic outputmakefile FORCE | 444 | config: scripts_basic outputmakefile FORCE |
445 | $(Q)mkdir -p include/linux include/config | ||
446 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | ||
447 | |||
448 | %config: scripts_basic outputmakefile FORCE | ||
443 | $(Q)mkdir -p include/linux include/config | 449 | $(Q)mkdir -p include/linux include/config |
444 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 450 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
445 | 451 | ||
@@ -600,20 +606,25 @@ export INSTALL_PATH ?= /boot | |||
600 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | 606 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
601 | export MODLIB | 607 | export MODLIB |
602 | 608 | ||
603 | # | 609 | strip-symbols := $(srctree)/scripts/strip-symbols \ |
604 | # INSTALL_MOD_STRIP, if defined, will cause modules to be | 610 | $(wildcard $(srctree)/arch/$(ARCH)/scripts/strip-symbols) |
605 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | ||
606 | # the default option --strip-debug will be used. Otherwise, | ||
607 | # INSTALL_MOD_STRIP will used as the options to the strip command. | ||
608 | 611 | ||
612 | # | ||
613 | # INSTALL_MOD_STRIP, if defined, will cause modules to be stripped while | ||
614 | # they get installed. If INSTALL_MOD_STRIP is '1', then the default | ||
615 | # options (see below) will be used. Otherwise, INSTALL_MOD_STRIP will | ||
616 | # be used as the option(s) to the objcopy command. | ||
609 | ifdef INSTALL_MOD_STRIP | 617 | ifdef INSTALL_MOD_STRIP |
610 | ifeq ($(INSTALL_MOD_STRIP),1) | 618 | ifeq ($(INSTALL_MOD_STRIP),1) |
611 | mod_strip_cmd = $(STRIP) --strip-debug | 619 | mod_strip_cmd = $(OBJCOPY) --strip-debug |
620 | ifeq ($(CONFIG_KALLSYMS_ALL),$(CONFIG_KALLSYMS_STRIP_GENERATED)) | ||
621 | mod_strip_cmd += --wildcard $(addprefix --strip-symbols ,$(strip-symbols)) | ||
622 | endif | ||
612 | else | 623 | else |
613 | mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP) | 624 | mod_strip_cmd = $(OBJCOPY) $(INSTALL_MOD_STRIP) |
614 | endif # INSTALL_MOD_STRIP=1 | 625 | endif # INSTALL_MOD_STRIP=1 |
615 | else | 626 | else |
616 | mod_strip_cmd = true | 627 | mod_strip_cmd = false |
617 | endif # INSTALL_MOD_STRIP | 628 | endif # INSTALL_MOD_STRIP |
618 | export mod_strip_cmd | 629 | export mod_strip_cmd |
619 | 630 | ||
@@ -743,6 +754,7 @@ last_kallsyms := 2 | |||
743 | endif | 754 | endif |
744 | 755 | ||
745 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o | 756 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o |
757 | kallsyms.h := $(wildcard include/config/kallsyms/*.h) $(wildcard include/config/kallsyms/*/*.h) | ||
746 | 758 | ||
747 | define verify_kallsyms | 759 | define verify_kallsyms |
748 | $(Q)$(if $($(quiet)cmd_sysmap), \ | 760 | $(Q)$(if $($(quiet)cmd_sysmap), \ |
@@ -767,24 +779,41 @@ endef | |||
767 | 779 | ||
768 | # Generate .S file with all kernel symbols | 780 | # Generate .S file with all kernel symbols |
769 | quiet_cmd_kallsyms = KSYM $@ | 781 | quiet_cmd_kallsyms = KSYM $@ |
770 | cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \ | 782 | cmd_kallsyms = { test $* -eq 0 || $(NM) -n $<; } \ |
771 | $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ | 783 | | $(KALLSYMS) $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) >$@ |
784 | |||
785 | quiet_cmd_kstrip = STRIP $@ | ||
786 | cmd_kstrip = $(OBJCOPY) --wildcard $(addprefix --strip$(if $(CONFIG_RELOCATABLE),-unneeded)-symbols ,$(filter %/scripts/strip-symbols,$^)) $< $@ | ||
772 | 787 | ||
773 | .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE | 788 | $(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): KBUILD_AFLAGS += -Wa,--strip-local-absolute |
789 | $(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): %.o: %.S scripts FORCE | ||
774 | $(call if_changed_dep,as_o_S) | 790 | $(call if_changed_dep,as_o_S) |
775 | 791 | ||
776 | .tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) | 792 | ifeq ($(CONFIG_KALLSYMS_STRIP_GENERATED),y) |
793 | strip-ext := .stripped | ||
794 | endif | ||
795 | |||
796 | .tmp_kallsyms%.S: .tmp_vmlinux%$(strip-ext) $(KALLSYMS) $(kallsyms.h) | ||
777 | $(call cmd,kallsyms) | 797 | $(call cmd,kallsyms) |
778 | 798 | ||
799 | # make -jN seems to have problems with intermediate files, see bug #3330. | ||
800 | .SECONDARY: $(foreach n,1 2 3,.tmp_vmlinux$(n).stripped) | ||
801 | .tmp_vmlinux%.stripped: .tmp_vmlinux% $(strip-symbols) $(kallsyms.h) | ||
802 | $(call cmd,kstrip) | ||
803 | |||
804 | ifneq ($(CONFIG_DEBUG_INFO),y) | ||
805 | .tmp_vmlinux%: LDFLAGS_vmlinux += -S | ||
806 | endif | ||
779 | # .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version | 807 | # .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version |
780 | .tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE | 808 | .tmp_vmlinux%: $(vmlinux-lds) $(vmlinux-all) FORCE |
781 | $(call if_changed_rule,ksym_ld) | 809 | $(if $(filter 1,$*),$(call if_changed_rule,ksym_ld),$(call if_changed,vmlinux__)) |
782 | 810 | ||
783 | .tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE | 811 | .tmp_vmlinux0$(strip-ext): |
784 | $(call if_changed,vmlinux__) | 812 | $(Q)echo "placeholder" >$@ |
785 | 813 | ||
786 | .tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE | 814 | .tmp_vmlinux1: .tmp_kallsyms0.o |
787 | $(call if_changed,vmlinux__) | 815 | .tmp_vmlinux2: .tmp_kallsyms1.o |
816 | .tmp_vmlinux3: .tmp_kallsyms2.o | ||
788 | 817 | ||
789 | # Needs to visit scripts/ before $(KALLSYMS) can be used. | 818 | # Needs to visit scripts/ before $(KALLSYMS) can be used. |
790 | $(KALLSYMS): scripts ; | 819 | $(KALLSYMS): scripts ; |
@@ -926,7 +955,7 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 | |||
926 | # 2) Create the include2 directory, used for the second asm symlink | 955 | # 2) Create the include2 directory, used for the second asm symlink |
927 | prepare3: include/config/kernel.release | 956 | prepare3: include/config/kernel.release |
928 | ifneq ($(KBUILD_SRC),) | 957 | ifneq ($(KBUILD_SRC),) |
929 | @echo ' Using $(srctree) as source for kernel' | 958 | @$(kecho) ' Using $(srctree) as source for kernel' |
930 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ | 959 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ |
931 | echo " $(srctree) is not clean, please run 'make mrproper'";\ | 960 | echo " $(srctree) is not clean, please run 'make mrproper'";\ |
932 | echo " in the '$(srctree)' directory.";\ | 961 | echo " in the '$(srctree)' directory.";\ |
@@ -936,6 +965,7 @@ ifneq ($(KBUILD_SRC),) | |||
936 | mkdir -p include2; \ | 965 | mkdir -p include2; \ |
937 | ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ | 966 | ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ |
938 | fi | 967 | fi |
968 | ln -fsn $(srctree) source | ||
939 | endif | 969 | endif |
940 | 970 | ||
941 | # prepare2 creates a makefile if using a separate output directory | 971 | # prepare2 creates a makefile if using a separate output directory |
@@ -979,11 +1009,11 @@ define check-symlink | |||
979 | endef | 1009 | endef |
980 | 1010 | ||
981 | # We create the target directory of the symlink if it does | 1011 | # We create the target directory of the symlink if it does |
982 | # not exist so the test in chack-symlink works and we have a | 1012 | # not exist so the test in check-symlink works and we have a |
983 | # directory for generated filesas used by some architectures. | 1013 | # directory for generated filesas used by some architectures. |
984 | define create-symlink | 1014 | define create-symlink |
985 | if [ ! -L include/asm ]; then \ | 1015 | if [ ! -L include/asm ]; then \ |
986 | echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ | 1016 | $(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ |
987 | if [ ! -d include/asm-$(SRCARCH) ]; then \ | 1017 | if [ ! -d include/asm-$(SRCARCH) ]; then \ |
988 | mkdir -p include/asm-$(SRCARCH); \ | 1018 | mkdir -p include/asm-$(SRCARCH); \ |
989 | fi; \ | 1019 | fi; \ |
@@ -1022,6 +1052,10 @@ include/linux/version.h: $(srctree)/Makefile FORCE | |||
1022 | include/linux/utsrelease.h: include/config/kernel.release FORCE | 1052 | include/linux/utsrelease.h: include/config/kernel.release FORCE |
1023 | $(call filechk,utsrelease.h) | 1053 | $(call filechk,utsrelease.h) |
1024 | 1054 | ||
1055 | PHONY += headerdep | ||
1056 | headerdep: | ||
1057 | $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl | ||
1058 | |||
1025 | # --------------------------------------------------------------------------- | 1059 | # --------------------------------------------------------------------------- |
1026 | 1060 | ||
1027 | PHONY += depend dep | 1061 | PHONY += depend dep |
@@ -1096,7 +1130,7 @@ all: modules | |||
1096 | PHONY += modules | 1130 | PHONY += modules |
1097 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) | 1131 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) |
1098 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order | 1132 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order |
1099 | @echo ' Building modules, stage 2.'; | 1133 | @$(kecho) ' Building modules, stage 2.'; |
1100 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1134 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1101 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild | 1135 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild |
1102 | 1136 | ||
@@ -1270,7 +1304,8 @@ help: | |||
1270 | @echo ' versioncheck - Sanity check on version.h usage' | 1304 | @echo ' versioncheck - Sanity check on version.h usage' |
1271 | @echo ' includecheck - Check for duplicate included header files' | 1305 | @echo ' includecheck - Check for duplicate included header files' |
1272 | @echo ' export_report - List the usages of all exported symbols' | 1306 | @echo ' export_report - List the usages of all exported symbols' |
1273 | @echo ' headers_check - Sanity check on exported headers'; \ | 1307 | @echo ' headers_check - Sanity check on exported headers' |
1308 | @echo ' headerdep - Detect inclusion cycles in headers'; \ | ||
1274 | echo '' | 1309 | echo '' |
1275 | @echo 'Kernel packaging:' | 1310 | @echo 'Kernel packaging:' |
1276 | @$(MAKE) $(build)=$(package-dir) help | 1311 | @$(MAKE) $(build)=$(package-dir) help |
@@ -1360,7 +1395,7 @@ $(module-dirs): crmodverdir $(objtree)/Module.symvers | |||
1360 | $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) | 1395 | $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) |
1361 | 1396 | ||
1362 | modules: $(module-dirs) | 1397 | modules: $(module-dirs) |
1363 | @echo ' Building modules, stage 2.'; | 1398 | @$(kecho) ' Building modules, stage 2.'; |
1364 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1399 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1365 | 1400 | ||
1366 | PHONY += modules_install | 1401 | PHONY += modules_install |
@@ -1409,123 +1444,12 @@ endif # KBUILD_EXTMOD | |||
1409 | 1444 | ||
1410 | # Generate tags for editors | 1445 | # Generate tags for editors |
1411 | # --------------------------------------------------------------------------- | 1446 | # --------------------------------------------------------------------------- |
1447 | quiet_cmd_tags = GEN $@ | ||
1448 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ | ||
1412 | 1449 | ||
1413 | #We want __srctree to totally vanish out when KBUILD_OUTPUT is not set | 1450 | tags TAGS cscope: FORCE |
1414 | #(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. | ||
1415 | #Adding $(srctree) adds about 20M on i386 to the size of the output file! | ||
1416 | |||
1417 | ifeq ($(src),$(obj)) | ||
1418 | __srctree = | ||
1419 | else | ||
1420 | __srctree = $(srctree)/ | ||
1421 | endif | ||
1422 | |||
1423 | ifeq ($(ALLSOURCE_ARCHS),) | ||
1424 | ifeq ($(ARCH),um) | ||
1425 | ALLINCLUDE_ARCHS := $(ARCH) $(SUBARCH) | ||
1426 | else | ||
1427 | ALLINCLUDE_ARCHS := $(SRCARCH) | ||
1428 | endif | ||
1429 | else | ||
1430 | #Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behaviour. | ||
1431 | ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS) | ||
1432 | endif | ||
1433 | |||
1434 | ALLSOURCE_ARCHS := $(SRCARCH) | ||
1435 | |||
1436 | define find-sources | ||
1437 | ( for arch in $(ALLSOURCE_ARCHS) ; do \ | ||
1438 | find $(__srctree)arch/$${arch} $(RCS_FIND_IGNORE) \ | ||
1439 | -wholename $(__srctree)arch/$${arch}/include/asm -type d -prune \ | ||
1440 | -o -name $1 -print; \ | ||
1441 | done ; \ | ||
1442 | find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ | ||
1443 | -name $1 -print; \ | ||
1444 | find $(__srctree)include $(RCS_FIND_IGNORE) \ | ||
1445 | \( -name config -o -name 'asm-*' \) -prune \ | ||
1446 | -o -name $1 -print; \ | ||
1447 | for arch in $(ALLINCLUDE_ARCHS) ; do \ | ||
1448 | test -e $(__srctree)include/asm-$${arch} && \ | ||
1449 | find $(__srctree)include/asm-$${arch} $(RCS_FIND_IGNORE) \ | ||
1450 | -name $1 -print; \ | ||
1451 | test -e $(__srctree)arch/$${arch}/include/asm && \ | ||
1452 | find $(__srctree)arch/$${arch}/include/asm $(RCS_FIND_IGNORE) \ | ||
1453 | -name $1 -print; \ | ||
1454 | done ; \ | ||
1455 | find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ | ||
1456 | -name $1 -print; \ | ||
1457 | find $(__srctree) $(RCS_FIND_IGNORE) \ | ||
1458 | \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ | ||
1459 | -name $1 -print; \ | ||
1460 | ) | ||
1461 | endef | ||
1462 | |||
1463 | define all-sources | ||
1464 | $(call find-sources,'*.[chS]') | ||
1465 | endef | ||
1466 | define all-kconfigs | ||
1467 | $(call find-sources,'Kconfig*') | ||
1468 | endef | ||
1469 | define all-defconfigs | ||
1470 | $(call find-sources,'defconfig') | ||
1471 | endef | ||
1472 | |||
1473 | define xtags | ||
1474 | if $1 --version 2>&1 | grep -iq exuberant; then \ | ||
1475 | $(all-sources) | xargs $1 -a \ | ||
1476 | -I __initdata,__exitdata,__acquires,__releases \ | ||
1477 | -I __read_mostly,____cacheline_aligned,____cacheline_aligned_in_smp,____cacheline_internodealigned_in_smp \ | ||
1478 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | ||
1479 | --extra=+f --c-kinds=+px \ | ||
1480 | --regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \ | ||
1481 | $(all-kconfigs) | xargs $1 -a \ | ||
1482 | --langdef=kconfig \ | ||
1483 | --language-force=kconfig \ | ||
1484 | --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/'; \ | ||
1485 | $(all-defconfigs) | xargs -r $1 -a \ | ||
1486 | --langdef=dotconfig \ | ||
1487 | --language-force=dotconfig \ | ||
1488 | --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \ | ||
1489 | elif $1 --version 2>&1 | grep -iq emacs; then \ | ||
1490 | $(all-sources) | xargs $1 -a; \ | ||
1491 | $(all-kconfigs) | xargs $1 -a \ | ||
1492 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \ | ||
1493 | $(all-defconfigs) | xargs -r $1 -a \ | ||
1494 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ | ||
1495 | else \ | ||
1496 | $(all-sources) | xargs $1 -a; \ | ||
1497 | fi | ||
1498 | endef | ||
1499 | |||
1500 | quiet_cmd_cscope-file = FILELST cscope.files | ||
1501 | cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files | ||
1502 | |||
1503 | quiet_cmd_cscope = MAKE cscope.out | ||
1504 | cmd_cscope = cscope -b -f cscope.out | ||
1505 | |||
1506 | cscope: FORCE | ||
1507 | $(call cmd,cscope-file) | ||
1508 | $(call cmd,cscope) | ||
1509 | |||
1510 | quiet_cmd_TAGS = MAKE $@ | ||
1511 | define cmd_TAGS | ||
1512 | rm -f $@; \ | ||
1513 | $(call xtags,etags) | ||
1514 | endef | ||
1515 | |||
1516 | TAGS: FORCE | ||
1517 | $(call cmd,TAGS) | ||
1518 | |||
1519 | quiet_cmd_tags = MAKE $@ | ||
1520 | define cmd_tags | ||
1521 | rm -f $@; \ | ||
1522 | $(call xtags,ctags) | ||
1523 | endef | ||
1524 | |||
1525 | tags: FORCE | ||
1526 | $(call cmd,tags) | 1451 | $(call cmd,tags) |
1527 | 1452 | ||
1528 | |||
1529 | # Scripts to check various things for consistency | 1453 | # Scripts to check various things for consistency |
1530 | # --------------------------------------------------------------------------- | 1454 | # --------------------------------------------------------------------------- |
1531 | 1455 | ||
@@ -1604,7 +1528,11 @@ endif | |||
1604 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1528 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1605 | 1529 | ||
1606 | # Modules | 1530 | # Modules |
1607 | / %/: prepare scripts FORCE | 1531 | /: prepare scripts FORCE |
1532 | $(cmd_crmodverdir) | ||
1533 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | ||
1534 | $(build)=$(build-dir) | ||
1535 | %/: prepare scripts FORCE | ||
1608 | $(cmd_crmodverdir) | 1536 | $(cmd_crmodverdir) |
1609 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1537 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1610 | $(build)=$(build-dir) | 1538 | $(build)=$(build-dir) |
@@ -1638,7 +1566,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \ | |||
1638 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) | 1566 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) |
1639 | 1567 | ||
1640 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ | 1568 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ |
1641 | $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ | 1569 | $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ |
1642 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) | 1570 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
1643 | 1571 | ||
1644 | quiet_cmd_as_o_S = AS $@ | 1572 | quiet_cmd_as_o_S = AS $@ |