aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 16:18:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 16:18:15 -0400
commit2b8dfec8c8fa4ba5bc946a602e94e99861462cad (patch)
treef73ad3c3224fb835a105c2f8ed5c1857ba5e753e
parent16b036786a6bd08cf7a91e0cd58219a6717da2a6 (diff)
parent8d36a62364b6b04dc7b0e9fe09f6968f4e5a1f0a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
-rw-r--r--Kbuild5
-rw-r--r--Makefile25
-rw-r--r--scripts/Kbuild.include3
-rw-r--r--scripts/reference_discarded.pl7
4 files changed, 24 insertions, 16 deletions
diff --git a/Kbuild b/Kbuild
index 1880e6f760aa..79003918f37f 100644
--- a/Kbuild
+++ b/Kbuild
@@ -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
10offsets-file := include/asm-$(ARCH)/asm-offsets.h 10offsets-file := include/asm-$(ARCH)/asm-offsets.h
@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"
22 22
23quiet_cmd_offsets = GEN $@ 23quiet_cmd_offsets = GEN $@
24define cmd_offsets 24define 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
diff --git a/Makefile b/Makefile
index 2402430c87e6..382298f37adf 100644
--- a/Makefile
+++ b/Makefile
@@ -334,7 +334,7 @@ KALLSYMS = scripts/kallsyms
334PERL = perl 334PERL = perl
335CHECK = sparse 335CHECK = sparse
336 336
337CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ 337CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF)
338MODFLAGS = -DMODULE 338MODFLAGS = -DMODULE
339CFLAGS_MODULE = $(MODFLAGS) 339CFLAGS_MODULE = $(MODFLAGS)
340AFLAGS_MODULE = $(MODFLAGS) 340AFLAGS_MODULE = $(MODFLAGS)
@@ -382,6 +382,9 @@ RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CV
382scripts_basic: 382scripts_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.
386scripts/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)
444include $(srctree)/arch/$(ARCH)/Makefile 447include $(srctree)/arch/$(ARCH)/Makefile
445export KBUILD_DEFCONFIG 448export KBUILD_DEFCONFIG
446 449
447config: scripts_basic outputmakefile FORCE 450config %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
452else 454else
@@ -641,8 +643,13 @@ quiet_cmd_vmlinux__ ?= LD $@
641# Generate new vmlinux version 643# Generate new vmlinux version
642quiet_cmd_vmlinux_version = GEN .version 644quiet_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
757vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE 764vmlinux: $(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),)
806endif 814endif
807 815
808prepare0: prepare prepare1 FORCE 816prepare0: prepare prepare1 FORCE
809 $(Q)$(MAKE) $(build)=$(srctree) 817 $(Q)$(MAKE) $(build)=.
810 818
811# All the preparing.. 819# All the preparing..
812prepare-all: prepare0 820prepare-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
851include/config/MARKER: include/linux/autoconf.h 859include/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
49cmd = @$(if $($(quiet)cmd_$(1)),\ 49cmd = @$(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
53objectify = $(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$/)) {