From: Kenn H. <ke...@us...> - 2003-08-04 12:18:17
|
Update of /cvsroot/linux-vax/kernel-2.5 In directory sc8-pr-cvs1:/tmp/cvs-serv20410 Modified Files: Makefile Log Message: Merge with 2.5.60 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Makefile,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- Makefile 3 Aug 2003 18:28:35 -0000 1.67 +++ Makefile 4 Aug 2003 12:18:14 -0000 1.68 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 59 +SUBLEVEL = 60 EXTRAVERSION = # *DOCUMENTATION* @@ -53,6 +53,8 @@ CROSS_COMPILE = vax-dec-linux- # That's our default target when none is given on the command line +# Note that 'modules' will be added as a prerequisite as well, +# in the CONFIG_MODULES part below all: vmlinux @@ -183,6 +185,8 @@ export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE +export MODVERDIR := .tmp_versions + # The temporary file to save gcc -MD generated dependencies must not # contain a comma depfile = $(subst $(comma),_,$(@D)/.$(@F).d) @@ -190,7 +194,7 @@ noconfig_targets := xconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ clean mrproper distclean \ - help tags TAGS sgmldocs psdocs pdfdocs htmldocs \ + help tags TAGS cscope sgmldocs psdocs pdfdocs htmldocs \ checkconfig checkhelp checkincludes RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o @@ -256,14 +260,22 @@ -include .config.cmd -ifdef CONFIG_MODULES -export EXPORT_FLAGS := -DEXPORT_SYMTAB -endif - ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are uptodate before we record them. + +ifdef CONFIG_MODVERSIONS +ifeq ($(KBUILD_MODULES),1) +ifneq ($(KBUILD_BUILTIN),1) + KBUILD_BUILTIN := 1 +endif +endif +endif + # # INSTALL_PATH specifies where to place the updated kernel and system map # images. Uncomment if you want to place them anywhere other than root. @@ -289,12 +301,12 @@ # normal descending-into-subdirs phase, since at that time # we cannot yet know if we will need to relink vmlinux. # So we descend into init/ inside the rule for vmlinux again. - -vmlinux-objs := $(HEAD) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y) +head-y += $(HEAD) +vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y) quiet_cmd_vmlinux__ = LD $@ define cmd_vmlinux__ - $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(HEAD) $(init-y) \ + $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(head-y) $(init-y) \ --start-group \ $(core-y) \ $(libs-y) \ @@ -384,7 +396,7 @@ # Handle descending into subdirectories listed in $(SUBDIRS) .PHONY: $(SUBDIRS) -$(SUBDIRS): .hdepend prepare +$(SUBDIRS): prepare $(Q)$(MAKE) $(build)=$@ # Things we need done before we descend to build or make @@ -392,6 +404,17 @@ .PHONY: prepare prepare: include/linux/version.h include/asm include/config/MARKER +ifdef CONFIG_MODVERSIONS +ifdef KBUILD_MODULES +ifeq ($(origin SUBDIRS),file) + $(Q)rm -rf $(MODVERDIR) + $(Q)mkdir $(MODVERDIR) +else + @echo '*** Warning: Overriding SUBDIRS on the command line can cause' + @echo '*** inconsistencies with module symbol versions' +endif +endif +endif @echo ' Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)' # We need to build init/vermagic.o before descending since all modules @@ -424,6 +447,8 @@ $(Q)$(MAKE) $(build)=$(@D) $@ %.o: %.c scripts FORCE $(Q)$(MAKE) $(build)=$(@D) $@ +%/: scripts prepare FORCE + $(Q)$(MAKE) $(build)=$(@D) %.ko: scripts FORCE $(Q)$(MAKE) $(build)=$(@D) $@ %.lst: %.c scripts FORCE @@ -475,75 +500,33 @@ ) > $@.tmp @$(update-if-changed) -# Generate module versions # --------------------------------------------------------------------------- -# The targets are still named depend / dep for traditional -# reasons, but the only thing we do here is generating -# the module version checksums. - -.PHONY: depend dep $(patsubst %,_sfdep_%,$(SUBDIRS)) - -depend dep: .hdepend - -# .hdepend is our (misnomed) marker for whether we've -# generated module versions - -make-versions := $(strip $(if $(filter dep depend,$(MAKECMDGOALS)),1) \ - $(if $(wildcard .hdepend),,1)) - -.hdepend: prepare FORCE -ifneq ($(make-versions),) - @$(MAKE) include/linux/modversions.h - @touch $@ -endif - -ifdef CONFIG_MODVERSIONS - -# Update modversions.h, but only if it would change. - -.PHONY: __rm_tmp_export-objs -__rm_tmp_export-objs: - @rm -rf .tmp_export-objs - -include/linux/modversions.h: $(patsubst %,_modver_%,$(SUBDIRS)) - @echo -n ' Generating $@' - @( echo "#ifndef _LINUX_MODVERSIONS_H";\ - echo "#define _LINUX_MODVERSIONS_H"; \ - echo "#include <linux/modsetver.h>"; \ - cd .tmp_export-objs >/dev/null; \ - for f in `find modules -name \*.ver -print | sort`; do \ - echo "#include <linux/$${f}>"; \ - done; \ - echo "#endif"; \ - ) > $@.tmp; \ - $(update-if-changed) - -.PHONY: $(patsubst %, _modver_%, $(SUBDIRS)) -$(patsubst %, _modver_%, $(SUBDIRS)): __rm_tmp_export-objs - $(Q)$(MAKE) -f scripts/Makefile.modver obj=$(patsubst _modver_%,%,$@) - -else # !CONFIG_MODVERSIONS - -.PHONY: include/linux/modversions.h - -include/linux/modversions.h: - -endif # CONFIG_MODVERSIONS +.PHONY: depend dep +depend dep: + @echo '*** Warning: make $@ is unnecessary now.' # --------------------------------------------------------------------------- # Modules ifdef CONFIG_MODULES +# By default, build modules as well + +all: modules + # Build modules +.PHONY: modules __modversions +modules: $(SUBDIRS) __modversions + ifdef CONFIG_MODVERSIONS -MODFLAGS += -include include/linux/modversions.h -endif -.PHONY: modules -modules: $(SUBDIRS) +__modversions: vmlinux $(SUBDIRS) + @echo ' Recording module symbol versions.'; + $(Q)$(MAKE) -rR -f scripts/Makefile.modver + +endif # Install modules @@ -574,6 +557,7 @@ .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS)) $(patsubst %, _modinst_%, $(SUBDIRS)) : $(Q)$(MAKE) -rR -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@) + else # CONFIG_MODULES # Modules not configured @@ -624,7 +608,7 @@ rpm: clean spec find . $(RCS_FIND_IGNORE) \ - \( -size 0 -o -name .depend -o -name .hdepend \) \ + \( -size 0 -o -name .depend -o -name .hdepend\) \ -type f -print | xargs rm -f set -e; \ cd $(TOPDIR)/.. ; \ @@ -718,25 +702,26 @@ .menuconfig.log \ include/asm \ .hdepend include/linux/modversions.h \ - tags TAGS kernel.spec \ + tags TAGS cscope kernel.spec \ .tmp* # Directories removed with 'make mrproper' MRPROPER_DIRS += \ + $(MODVERDIR) \ .tmp_export-objs \ include/config \ include/linux/modules # clean - Delete all intermediate files # -clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts - -$(addprefix _clean_,$(clean-dirs)): +clean-dirs += $(addprefix _clean_,$(ALL_SUBDIRS) Documentation/DocBook scripts) +.PHONY: $(clean-dirs) clean archclean mrproper archmrproper distclean +$(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) quiet_cmd_rmclean = RM $$(CLEAN_FILES) cmd_rmclean = rm -f $(CLEAN_FILES) -clean: archclean $(addprefix _clean_,$(clean-dirs)) +clean: archclean $(clean-dirs) $(call cmd,rmclean) @find . $(RCS_FIND_IGNORE) \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ @@ -776,6 +761,9 @@ -name '*.[chS]' -print ) endef +quiet_cmd_cscope = MAKE $@ +cmd_cscope = $(all-sources) | cscope -k -b -i - + quiet_cmd_TAGS = MAKE $@ cmd_TAGS = $(all-sources) | etags - @@ -787,6 +775,9 @@ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ $(all-sources) | xargs ctags $$CTAGSF -a endef + +cscope: FORCE + $(call cmd,cscope) TAGS: FORCE $(call cmd,TAGS) |