X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=1a8272086bce6e1680b8e6fe9ca751b6ee4037fd;hb=37b9e453a7750f55f473d51c91d184b703c2b883;hp=728dadb127b99b821807df4cc99ff3f9050970a8;hpb=af20d436230b2df6d73a406b6f1b31ae000775cb;p=linux-2.6.git diff --git a/Makefile b/Makefile index 728dadb12..1a8272086 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 11 -EXTRAVERSION = .7-vs2.0-pre1 +SUBLEVEL = 12 +EXTRAVERSION = .2-vs2.0-rc7 NAME=Woozy Numbat # *DOCUMENTATION* @@ -18,7 +18,7 @@ MAKEFLAGS += --no-print-directory # # Most importantly: sub-Makefiles should only ever modify files in # their own directory. If in some directory we have a dependency on -# a file in another dir (which doesn't happen often, but it's of +# a file in another dir (which doesn't happen often, but it's often # unavoidable when linking the built-in.o targets which finally # turn into vmlinux), we will call a sub make in that other dir, and # after that we are sure that everything which is in that other dir @@ -67,7 +67,7 @@ endif # kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntax'es are supported. +# To locate output files in a separate directory two syntaxes are supported. # In both cases the working directory must be the root of the kernel src. # 1) O= # Use "make O=dir/to/store/output/files/" @@ -78,7 +78,8 @@ endif # export KBUILD_OUTPUT=dir/to/store/output/files/ # make # -# The O= assigment takes precedence over the KBUILD_OUTPUT environment variable. +# The O= assignment takes precedence over the KBUILD_OUTPUT environment +# variable. # KBUILD_SRC is set on invocation of make in OBJ directory @@ -331,9 +332,7 @@ KALLSYMS = scripts/kallsyms PERL = perl CHECK = sparse -NOSTDINC_FLAGS = -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -CHECKFLAGS += $(NOSTDINC_FLAGS) MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS) @@ -530,6 +529,10 @@ endif include $(srctree)/arch/$(ARCH)/Makefile +# arch Makefile may override CC so keep this after arch Makefile is included +NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) +CHECKFLAGS += $(NOSTDINC_FLAGS) + # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) @@ -539,16 +542,14 @@ CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment -# Also any assingments in arch/$(ARCH)/Makefiel take precedence over +# Also any assignments in arch/$(ARCH)/Makefile take precedence over # this default value export KBUILD_IMAGE ?= vmlinux # # INSTALL_PATH specifies where to place the updated kernel and system map -# images. Uncomment if you want to place them anywhere other than root. -# - -#export INSTALL_PATH=/boot +# images. Default is /boot, but you can set it to other values +export INSTALL_PATH ?= /boot # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory @@ -898,7 +899,7 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r endif .PHONY: _modinst_post _modinst_post: _modinst_ - if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi else # CONFIG_MODULES @@ -1096,9 +1097,17 @@ KBUILD_MODULES := 1 crmodverdir: $(Q)mkdir -p $(MODVERDIR) +.PHONY: $(objtree)/Module.symvers +$(objtree)/Module.symvers: + @test -e $(objtree)/Module.symvers || ( \ + echo; \ + echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \ + echo " is missing; modules will have no dependencies and modversions."; \ + echo ) + module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) .PHONY: $(module-dirs) modules -$(module-dirs): crmodverdir +$(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1136,20 +1145,30 @@ endif # KBUILD_EXTMOD # Generate tags for editors # --------------------------------------------------------------------------- +#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set +#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. +#Adding $(srctree) adds about 20M on i386 to the size of the output file! + +ifeq ($(KBUILD_OUTPUT),) +__srctree = +else +__srctree = $(srctree)/ +endif + define all-sources - ( find $(srctree) $(RCS_FIND_IGNORE) \ + ( find $(__srctree) $(RCS_FIND_IGNORE) \ \( -name include -o -name arch \) -prune -o \ -name '*.[chS]' -print; \ - find $(srctree)/arch/$(ARCH) $(RCS_FIND_IGNORE) \ + find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/security/selinux/include $(RCS_FIND_IGNORE) \ + find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/include $(RCS_FIND_IGNORE) \ + find $(__srctree)include $(RCS_FIND_IGNORE) \ \( -name config -o -name 'asm-*' \) -prune \ -o -name '*.[chS]' -print; \ - find $(srctree)/include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ + find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/include/asm-generic $(RCS_FIND_IGNORE) \ + find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print ) endef @@ -1171,7 +1190,7 @@ cmd_TAGS = $(all-sources) | etags - quiet_cmd_tags = MAKE $@ define cmd_tags rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \ + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \ $(all-sources) | xargs ctags $$CTAGSF -a endef