aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2005-09-06 03:35:51 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-06 03:35:51 -0400
commitef88b7dba2b47c70037a34a599d383462bb74bd3 (patch)
treef50afe82c446cbf93893880878b97339fbdb8f49
parentf65e77693aa5a1cf688fc378bc6913a56f9ff7b7 (diff)
parentaaebf4332018980fef4e601d1b5a6e52dd9e9ae4 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
-rw-r--r--Documentation/kbuild/makefiles.txt6
-rw-r--r--Makefile160
-rw-r--r--arch/m68knommu/Makefile2
-rw-r--r--arch/mips/Makefile2
-rw-r--r--drivers/block/Kconfig42
-rw-r--r--include/asm-generic/vmlinux.lds.h9
-rw-r--r--init/Kconfig22
-rw-r--r--init/Makefile3
-rw-r--r--scripts/Kbuild.include96
-rw-r--r--scripts/Makefile.build7
-rw-r--r--scripts/Makefile.clean14
-rw-r--r--scripts/Makefile.host3
-rw-r--r--scripts/Makefile.lib99
-rw-r--r--scripts/Makefile.modinst2
-rw-r--r--scripts/Makefile.modpost1
-rw-r--r--scripts/conmakehash.c2
-rw-r--r--scripts/kallsyms.c6
-rw-r--r--scripts/kconfig/lkc.h2
-rw-r--r--scripts/kconfig/menu.c4
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped8
-rw-r--r--scripts/kconfig/zconf.y8
-rwxr-xr-xscripts/kernel-doc8
-rw-r--r--scripts/lxdialog/dialog.h2
-rw-r--r--scripts/lxdialog/inputbox.c4
-rwxr-xr-xscripts/mkcompile_h12
-rw-r--r--scripts/mod/sumversion.c8
-rw-r--r--scripts/package/Makefile24
-rw-r--r--scripts/package/builddeb56
-rw-r--r--scripts/package/buildtar111
-rwxr-xr-xscripts/package/mkspec9
-rw-r--r--scripts/reference_discarded.pl1
-rw-r--r--scripts/reference_init.pl1
-rw-r--r--scripts/setlocalversion56
-rw-r--r--usr/Kconfig46
-rw-r--r--usr/Makefile2
35 files changed, 547 insertions, 291 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 2616a58a5a4b..9a1586590d82 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -872,7 +872,13 @@ When kbuild executes the following steps are followed (roughly):
872 Assignments to $(targets) are without $(obj)/ prefix. 872 Assignments to $(targets) are without $(obj)/ prefix.
873 if_changed may be used in conjunction with custom commands as 873 if_changed may be used in conjunction with custom commands as
874 defined in 6.7 "Custom kbuild commands". 874 defined in 6.7 "Custom kbuild commands".
875
875 Note: It is a typical mistake to forget the FORCE prerequisite. 876 Note: It is a typical mistake to forget the FORCE prerequisite.
877 Another common pitfall is that whitespace is sometimes
878 significant; for instance, the below will fail (note the extra space
879 after the comma):
880 target: source(s) FORCE
881 #WRONG!# $(call if_changed, ld/objcopy/gzip)
876 882
877 ld 883 ld
878 Link target. Often LDFLAGS_$@ is used to set specific options to ld. 884 Link target. Often LDFLAGS_$@ is used to set specific options to ld.
diff --git a/Makefile b/Makefile
index 2d68adbcfa28..63e5c9f0bc7a 100644
--- a/Makefile
+++ b/Makefile
@@ -109,10 +109,9 @@ $(if $(KBUILD_OUTPUT),, \
109.PHONY: $(MAKECMDGOALS) 109.PHONY: $(MAKECMDGOALS)
110 110
111$(filter-out _all,$(MAKECMDGOALS)) _all: 111$(filter-out _all,$(MAKECMDGOALS)) _all:
112 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ 112 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
113 KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ 113 KBUILD_SRC=$(CURDIR) \
114 KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD="$(KBUILD_EXTMOD)" \ 114 KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
115 -f $(CURDIR)/Makefile $@
116 115
117# Leave processing to above invocation of make 116# Leave processing to above invocation of make
118skip-makefile := 1 117skip-makefile := 1
@@ -233,7 +232,7 @@ ifeq ($(MAKECMDGOALS),)
233 KBUILD_MODULES := 1 232 KBUILD_MODULES := 1
234endif 233endif
235 234
236export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE 235export KBUILD_MODULES KBUILD_BUILTIN
237export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD 236export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
238 237
239# Beautify output 238# Beautify output
@@ -309,6 +308,9 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
309# Look for make include files relative to root of kernel src 308# Look for make include files relative to root of kernel src
310MAKEFLAGS += --include-dir=$(srctree) 309MAKEFLAGS += --include-dir=$(srctree)
311 310
311# We need some generic definitions
312include $(srctree)/scripts/Kbuild.include
313
312# For maximum performance (+ possibly random breakage, uncomment 314# For maximum performance (+ possibly random breakage, uncomment
313# the following) 315# the following)
314 316
@@ -348,7 +350,7 @@ LINUXINCLUDE := -Iinclude \
348 350
349CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 351CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
350 352
351CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ 353CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
352 -fno-strict-aliasing -fno-common \ 354 -fno-strict-aliasing -fno-common \
353 -ffreestanding 355 -ffreestanding
354AFLAGS := -D__ASSEMBLY__ 356AFLAGS := -D__ASSEMBLY__
@@ -367,11 +369,6 @@ export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
367# even be read-only. 369# even be read-only.
368export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions 370export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
369 371
370# The temporary file to save gcc -MD generated dependencies must not
371# contain a comma
372comma := ,
373depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
374
375# Files to ignore in find ... statements 372# Files to ignore in find ... statements
376 373
377RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o 374RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o
@@ -551,6 +548,26 @@ export KBUILD_IMAGE ?= vmlinux
551# images. Default is /boot, but you can set it to other values 548# images. Default is /boot, but you can set it to other values
552export INSTALL_PATH ?= /boot 549export INSTALL_PATH ?= /boot
553 550
551# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests
552# and try to determine if the current source tree is a release tree, of any sort,
553# or if is a pure development tree.
554#
555# A 'release tree' is any tree with a git TAG associated
556# with it. The primary goal of this is to make it safe for a native
557# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to
558# continue developing against the current Linus tree, without having the Linus
559# tree overwrite the 2.6.9 tree when installed.
560#
561# Currently, only git is supported.
562# Other SCMs can edit scripts/setlocalversion and add the appropriate
563# checks as needed.
564
565
566ifdef CONFIG_LOCALVERSION_AUTO
567 localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion $(srctree))
568 LOCALVERSION := $(LOCALVERSION)$(localversion-auto)
569endif
570
554# 571#
555# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory 572# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
556# relocations required by build roots. This is not defined in the 573# relocations required by build roots. This is not defined in the
@@ -691,8 +708,10 @@ endef
691 708
692# Update vmlinux version before link 709# Update vmlinux version before link
693# Use + in front of this rule to silent warning about make -j1 710# Use + in front of this rule to silent warning about make -j1
711# First command is ':' to allow us to use + in front of this rule
694cmd_ksym_ld = $(cmd_vmlinux__) 712cmd_ksym_ld = $(cmd_vmlinux__)
695define rule_ksym_ld 713define rule_ksym_ld
714 :
696 +$(call cmd,vmlinux_version) 715 +$(call cmd,vmlinux_version)
697 $(call cmd,vmlinux__) 716 $(call cmd,vmlinux__)
698 $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd 717 $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
@@ -722,6 +741,16 @@ quiet_cmd_kallsyms = KSYM $@
722# Needs to visit scripts/ before $(KALLSYMS) can be used. 741# Needs to visit scripts/ before $(KALLSYMS) can be used.
723$(KALLSYMS): scripts ; 742$(KALLSYMS): scripts ;
724 743
744# Generate some data for debugging strange kallsyms problems
745debug_kallsyms: .tmp_map$(last_kallsyms)
746
747.tmp_map%: .tmp_vmlinux% FORCE
748 ($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) | sort > $@
749
750.tmp_map3: .tmp_map2
751
752.tmp_map2: .tmp_map1
753
725endif # ifdef CONFIG_KALLSYMS 754endif # ifdef CONFIG_KALLSYMS
726 755
727# vmlinux image - including updated kernel symbols 756# vmlinux image - including updated kernel symbols
@@ -757,7 +786,7 @@ $(vmlinux-dirs): prepare-all scripts