diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 16:18:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 16:18:15 -0400 |
commit | 2b8dfec8c8fa4ba5bc946a602e94e99861462cad (patch) | |
tree | f73ad3c3224fb835a105c2f8ed5c1857ba5e753e | |
parent | 16b036786a6bd08cf7a91e0cd58219a6717da2a6 (diff) | |
parent | 8d36a62364b6b04dc7b0e9fe09f6968f4e5a1f0a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
-rw-r--r-- | Kbuild | 5 | ||||
-rw-r--r-- | Makefile | 25 | ||||
-rw-r--r-- | scripts/Kbuild.include | 3 | ||||
-rw-r--r-- | scripts/reference_discarded.pl | 7 |
4 files changed, 24 insertions, 16 deletions
@@ -4,7 +4,7 @@ | |||
4 | # 1) Generate asm-offsets.h | 4 | # 1) Generate asm-offsets.h |
5 | 5 | ||
6 | ##### | 6 | ##### |
7 | # 1) Generate asm-offsets.h | 7 | # 1) Generate asm-offsets.h |
8 | # | 8 | # |
9 | 9 | ||
10 | offsets-file := include/asm-$(ARCH)/asm-offsets.h | 10 | offsets-file := include/asm-$(ARCH)/asm-offsets.h |
@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p" | |||
22 | 22 | ||
23 | quiet_cmd_offsets = GEN $@ | 23 | quiet_cmd_offsets = GEN $@ |
24 | define cmd_offsets | 24 | define cmd_offsets |
25 | mkdir -p $(dir $@); \ | ||
25 | cat $< | \ | 26 | cat $< | \ |
26 | (set -e; \ | 27 | (set -e; \ |
27 | echo "#ifndef __ASM_OFFSETS_H__"; \ | 28 | echo "#ifndef __ASM_OFFSETS_H__"; \ |
@@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE | |||
43 | $(Q)mkdir -p $(dir $@) | 44 | $(Q)mkdir -p $(dir $@) |
44 | $(call if_changed_dep,cc_s_c) | 45 | $(call if_changed_dep,cc_s_c) |
45 | 46 | ||
46 | $(srctree)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild | 47 | $(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild |
47 | $(call cmd,offsets) | 48 | $(call cmd,offsets) |
48 | 49 | ||
@@ -334,7 +334,7 @@ KALLSYMS = scripts/kallsyms | |||
334 | PERL = perl | 334 | PERL = perl |
335 | CHECK = sparse | 335 | CHECK = sparse |
336 | 336 | ||
337 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ | 337 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF) |
338 | MODFLAGS = -DMODULE | 338 | MODFLAGS = -DMODULE |
339 | CFLAGS_MODULE = $(MODFLAGS) | 339 | CFLAGS_MODULE = $(MODFLAGS) |
340 | AFLAGS_MODULE = $(MODFLAGS) | 340 | AFLAGS_MODULE = $(MODFLAGS) |
@@ -382,6 +382,9 @@ RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CV | |||
382 | scripts_basic: | 382 | scripts_basic: |
383 | $(Q)$(MAKE) $(build)=scripts/basic | 383 | $(Q)$(MAKE) $(build)=scripts/basic |
384 | 384 | ||
385 | # To avoid any implicit rule to kick in, define an empty command. | ||
386 | scripts/basic/%: scripts_basic ; | ||
387 | |||
385 | .PHONY: outputmakefile | 388 | .PHONY: outputmakefile |
386 | # outputmakefile generate a Makefile to be placed in output directory, if | 389 | # outputmakefile generate a Makefile to be placed in output directory, if |
387 | # using a seperate output directory. This allows convinient use | 390 | # using a seperate output directory. This allows convinient use |
@@ -444,9 +447,8 @@ ifeq ($(config-targets),1) | |||
444 | include $(srctree)/arch/$(ARCH)/Makefile | 447 | include $(srctree)/arch/$(ARCH)/Makefile |
445 | export KBUILD_DEFCONFIG | 448 | export KBUILD_DEFCONFIG |
446 | 449 | ||
447 | config: scripts_basic outputmakefile FORCE | 450 | config %config: scripts_basic outputmakefile FORCE |
448 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 451 | $(Q)mkdir -p include/linux |
449 | %config: scripts_basic outputmakefile FORCE | ||
450 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 452 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
451 | 453 | ||
452 | else | 454 | else |
@@ -641,8 +643,13 @@ quiet_cmd_vmlinux__ ?= LD $@ | |||
641 | # Generate new vmlinux version | 643 | # Generate new vmlinux version |
642 | quiet_cmd_vmlinux_version = GEN .version | 644 | quiet_cmd_vmlinux_version = GEN .version |
643 | cmd_vmlinux_version = set -e; \ | 645 | cmd_vmlinux_version = set -e; \ |
644 | . $(srctree)/scripts/mkversion > .tmp_version; \ | 646 | if [ ! -r .version ]; then \ |
645 | mv -f .tmp_version .version; \ | 647 | rm -f .version; \ |
648 | echo 1 >.version; \ | ||
649 | else \ | ||
650 | mv .version .old_version; \ | ||
651 | expr 0$$(cat .old_version) + 1 >.version; \ | ||
652 | fi; \ | ||
646 | $(MAKE) $(build)=init | 653 | $(MAKE) $(build)=init |
647 | 654 | ||
648 | # Generate System.map | 655 | # Generate System.map |
@@ -756,6 +763,7 @@ endif # ifdef CONFIG_KALLSYMS | |||
756 | # vmlinux image - including updated kernel symbols | 763 | # vmlinux image - including updated kernel symbols |
757 | vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE | 764 | vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE |
758 | $(call if_changed_rule,vmlinux__) | 765 | $(call if_changed_rule,vmlinux__) |
766 | $(Q)rm -f .old_version | ||
759 | 767 | ||
760 | # The actual objects are generated when descending, | 768 | # The actual objects are generated when descending, |
761 | # make sure no implicit rule kicks in | 769 | # make sure no implicit rule kicks in |
@@ -806,7 +814,7 @@ ifneq ($(KBUILD_MODULES),) | |||
806 | endif | 814 | endif |
807 | 815 | ||
808 | prepare0: prepare prepare1 FORCE | 816 | prepare0: prepare prepare1 FORCE |
809 | $(Q)$(MAKE) $(build)=$(srctree) | 817 | $(Q)$(MAKE) $(build)=. |
810 | 818 | ||
811 | # All the preparing.. | 819 | # All the preparing.. |
812 | prepare-all: prepare0 | 820 | prepare-all: prepare0 |
@@ -848,7 +856,7 @@ include/asm: | |||
848 | 856 | ||
849 | # Split autoconf.h into include/linux/config/* | 857 | # Split autoconf.h into include/linux/config/* |
850 | 858 | ||
851 | include/config/MARKER: include/linux/autoconf.h | 859 | include/config/MARKER: scripts/basic/split-include include/linux/autoconf.h |
852 | @echo ' SPLIT include/linux/autoconf.h -> include/config/*' | 860 | @echo ' SPLIT include/linux/autoconf.h -> include/config/*' |
853 | @scripts/basic/split-include include/linux/autoconf.h include/config | 861 | @scripts/basic/split-include include/linux/autoconf.h include/config |
854 | @touch $@ | 862 | @touch $@ |
@@ -1053,6 +1061,7 @@ help: | |||
1053 | @echo ' rpm - Build a kernel as an RPM package' | 1061 | @echo ' rpm - Build a kernel as an RPM package' |
1054 | @echo ' tags/TAGS - Generate tags file for editors' | 1062 | @echo ' tags/TAGS - Generate tags file for editors' |
1055 | @echo ' cscope - Generate cscope index' | 1063 | @echo ' cscope - Generate cscope index' |
1064 | @echo ' kernelrelease - Output the release version string' | ||
1056 | @echo '' | 1065 | @echo '' |
1057 | @echo 'Static analysers' | 1066 | @echo 'Static analysers' |
1058 | @echo ' buildcheck - List dangling references to vmlinux discarded sections' | 1067 | @echo ' buildcheck - List dangling references to vmlinux discarded sections' |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 9087273abf91..db3c708e546b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -49,6 +49,9 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj | |||
49 | cmd = @$(if $($(quiet)cmd_$(1)),\ | 49 | cmd = @$(if $($(quiet)cmd_$(1)),\ |
50 | echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1)) | 50 | echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1)) |
51 | 51 | ||
52 | # Add $(obj)/ for paths that is not absolute | ||
53 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | ||
54 | |||
52 | ### | 55 | ### |
53 | # if_changed - execute command if any prerequisite is newer than | 56 | # if_changed - execute command if any prerequisite is newer than |
54 | # target, or command line has changed | 57 | # target, or command line has changed |
diff --git a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl index f04f62736851..c2d54148a91f 100644 --- a/scripts/reference_discarded.pl +++ b/scripts/reference_discarded.pl | |||
@@ -91,12 +91,7 @@ foreach $object (keys(%object)) { | |||
91 | $from !~ /\.exit\.data$/ && | 91 | $from !~ /\.exit\.data$/ && |
92 | $from !~ /\.altinstructions$/ && | 92 | $from !~ /\.altinstructions$/ && |
93 | $from !~ /\.pdr$/ && | 93 | $from !~ /\.pdr$/ && |
94 | $from !~ /\.debug_info$/ && | 94 | $from !~ /\.debug_.*$/ && |
95 | $from !~ /\.debug_aranges$/ && | ||
96 | $from !~ /\.debug_ranges$/ && | ||
97 | $from !~ /\.debug_line$/ && | ||
98 | $from !~ /\.debug_frame$/ && | ||
99 | $from !~ /\.debug_loc$/ && | ||
100 | $from !~ /\.exitcall\.exit$/ && | 95 | $from !~ /\.exitcall\.exit$/ && |
101 | $from !~ /\.eh_frame$/ && | 96 | $from !~ /\.eh_frame$/ && |
102 | $from !~ /\.stab$/)) { | 97 | $from !~ /\.stab$/)) { |