From: James S. <jsi...@us...> - 2002-06-22 17:51:00
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv25751/linux Modified Files: Makefile Log Message: Synced to 2.5.24 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- Makefile 18 Jun 2002 18:51:54 -0000 1.64 +++ Makefile 22 Jun 2002 17:50:57 -0000 1.65 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 22 +SUBLEVEL = 24 EXTRAVERSION = -ruby # We are using a recursive build, so we need to do a little thinking @@ -48,11 +48,35 @@ KBUILD_VERBOSE = 1 endif -# Decide whether to build built-in, modular, or both +# Decide whether to build built-in, modular, or both. +# Normally, just do built-in. -KBUILD_MODULES := 1 +KBUILD_MODULES := KBUILD_BUILTIN := 1 +# If we have only "make modules", don't compile built-in objects. + +ifeq ($(MAKECMDGOALS),modules) + KBUILD_BUILTIN := +endif + +# If we have "make <whatever> modules", compile modules +# in addition to whatever we do anyway. + +ifneq ($(filter modules,$(MAKECMDGOALS)),) + KBUILD_MODULES := 1 +endif + +# Just "make" or "make all" shall build modules as well + +ifeq ($(MAKECMDGOALS),) + KBUILD_MODULES := 1 +endif + +ifneq ($(filter all,$(MAKECMDGOALS)),) + KBUILD_MODULES := 1 +endif + export KBUILD_MODULES KBUILD_BUILTIN # Beautify output @@ -120,6 +144,8 @@ export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE +SUBDIRS := init kernel mm fs ipc lib drivers sound net + noconfig_targets := xconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ clean mrproper distclean \ @@ -145,7 +171,8 @@ .config: @echo '***' @echo '*** You have not yet configured your kernel!' - @echo '*** Please run "make xconfig/menuconfig/config/oldconfig"' + @echo '*** Please run some configurator (do "make xconfig" or' + @echo '*** "make menuconfig" or "make oldconfig" or "make config").' @echo '***' @exit 1 @@ -181,7 +208,7 @@ # Link components for vmlinux # --------------------------------------------------------------------------- -SUBDIRS := init kernel mm fs ipc lib drivers sound net + INIT := init/init.o CORE_FILES := kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o LIBS := lib/lib.a @@ -253,6 +280,7 @@ .PHONY: prepare prepare: include/linux/version.h include/asm include/config/MARKER + @echo ' Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)' # Single targets # --------------------------------------------------------------------------- @@ -330,18 +358,16 @@ # The targets are still named depend / dep for traditional # reasons, but the only thing we do here is generating # the module version checksums. -# FIXME: For now, we are also calling "archdep" from here, -# which should be replaced by a more sensible solution. .PHONY: depend dep $(patsubst %,_sfdep_%,$(SUBDIRS)) depend dep: .hdepend # .hdepend is our (misnomed) marker for whether we've run -# generated module versions and made archdep +# generated module versions .hdepend: $(if $(filter dep depend,$(MAKECMDGOALS)),FORCE) - @$(MAKE) archdep include/linux/modversions.h + @$(MAKE) include/linux/modversions.h @touch $@ ifdef CONFIG_MODVERSIONS @@ -355,7 +381,7 @@ @( echo "#ifndef _LINUX_MODVERSIONS_H";\ echo "#define _LINUX_MODVERSIONS_H"; \ echo "#include <linux/modsetver.h>"; \ - for f in `cd .tmp_export-objs; find modules -name \*.ver -print | sort`; do \ + for f in `cd .tmp_export-objs; find modules -name SCCS -prune -o -name BitKeeper -prune -o -name \*.ver -print | sort`; do \ echo "#include <linux/$${f}>"; \ done; \ echo "#endif"; \ @@ -385,8 +411,7 @@ endif .PHONY: modules -modules: - @$(MAKE) KBUILD_BUILTIN= $(SUBDIRS) +modules: $(SUBDIRS) # Install modules @@ -420,8 +445,8 @@ else # CONFIG_MODULES -# --------------------------------------------------------------------------- # Modules not configured +# --------------------------------------------------------------------------- modules modules_install: FORCE @echo @@ -433,6 +458,25 @@ endif # CONFIG_MODULES +# Generate asm-offsets.h +# --------------------------------------------------------------------------- + +define generate-asm-offsets.h + (set -e; \ + echo "#ifndef __ASM_OFFSETS_H__"; \ + echo "#define __ASM_OFFSETS_H__"; \ + echo "/*"; \ + echo " * DO NOT MODIFY."; \ + echo " *"; \ + echo " * This file was generated by arch/$(ARCH)/Makefile"; \ + echo " *"; \ + echo " */"; \ + echo ""; \ + sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ + echo ""; \ + echo "#endif" ) +endef + # RPM target # --------------------------------------------------------------------------- @@ -448,7 +492,9 @@ # will become invalid rpm: clean spec - find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f + find . -name SCCS -prune -o -name BitKeeper -prune -o \ + \( -size 0 -o -name .depend -o -name .hdepend \) \ + -type f -print | xargs rm -f set -e; \ cd $(TOPDIR)/.. ; \ ln -sf $(TOPDIR) $(KERNELPATH) ; \ @@ -461,6 +507,8 @@ else # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) +ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) + # Targets which don't need .config # =========================================================================== # @@ -519,23 +567,6 @@ defconfig: yes '' | $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in -# How we generate .config depends on which *config the -# user chose when calling make - -.config: $(filter oldconfig xconfig menuconfig config,$(MAKECMDGOALS)) ; - -# If the user gave commands from both the need / need not -# .config sections, we need to call make again after -# .config is generated, now to take care of the remaining -# targets we know nothing about in this section - -remaining_targets := $(filter-out $(noconfig_targets),$(MAKECMDGOALS)) - -$(remaining_targets) : make_with_config - -make_with_config: .config - @$(MAKE) $(remaining_targets) - # Cleaning up # --------------------------------------------------------------------------- @@ -546,6 +577,7 @@ drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \ drivers/char/conmakehash \ drivers/char/drm/*-mod.c \ + drivers/char/defkeymap.c drivers/char/qtronixmap.c \ drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \ drivers/zorro/devlist.h drivers/zorro/gen-devlist \ sound/oss/bin2hex sound/oss/hex2hex \ @@ -556,9 +588,12 @@ drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ drivers/scsi/aic7xxx/aicasm/y.tab.h \ drivers/scsi/aic7xxx/aicasm/aicasm \ - drivers/scsi/53c700_d.h \ - net/khttpd/make_times_h \ - net/khttpd/times.h \ + drivers/scsi/53c700_d.h drivers/scsi/sim710_d.h \ + drivers/scsi/53c7xx_d.h drivers/scsi/53c7xx_u.h \ + drivers/scsi/53c8xx_d.h drivers/scsi/53c8xx_u.h \ + net/802/cl2llc.c net/802/transit/pdutr.h net/802/transit/timertr.h \ + net/802/pseudo/pseudocode.h \ + net/khttpd/make_times_h net/khttpd/times.h \ submenu* # files removed with 'make mrproper' @@ -596,22 +631,26 @@ clean: archclean @echo 'Cleaning up' - @find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \ - -name .\*.tmp -o -name .\*.d \) -type f -print \ + @find . -name SCCS -prune -o -name BitKeeper -prune -o \ + \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \ + -name .\*.tmp -o -name .\*.d \) -type f -print \ | grep -v lxdialog/ | xargs rm -f @rm -f $(CLEAN_FILES) @$(MAKE) -C Documentation/DocBook clean mrproper: clean archmrproper @echo 'Making mrproper' - @find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f + @find . -name SCCS -prune -o -name BitKeeper -prune -o \ + \( -name .depend -o -name .\*.cmd \) \ + -type f -print | xargs rm -f @rm -f $(MRPROPER_FILES) @rm -rf $(MRPROPER_DIRS) @$(MAKE) -C Documentation/DocBook mrproper distclean: mrproper @echo 'Making distclean' - @find . \( -not -type d \) -and \ + @find . -name SCCS -prune -o -name BitKeeper -prune -o \ + \( -not -type d \) -and \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f \ @@ -621,16 +660,24 @@ # --------------------------------------------------------------------------- TAGS: FORCE - { find include/asm-${ARCH} -name '*.h' -print ; \ - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \ - find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | etags - + { find include/asm-${ARCH} -name SCCS -prune -o -name BitKeeper -prune \ + -o -name '*.h' -print ; \ + find include -name SCCS -prune -o -name BitKeeper -prune -o \ + -type d \( -name "asm-*" -o -name config \) -prune -o \ + -name '*.h' -print ; \ + find $(SUBDIRS) init arch/${ARCH} \ + -name SCCS -prune -o -name BitKeeper -prune -o \ + -name '*.[chS]' -print ; } | grep -v SCCS | etags - # Exuberant ctags works better with -I tags: FORCE CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ - ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \ - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \ - find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a + ctags $$CTAGSF `find include/asm-$(ARCH) -name SCCS -prune -o -name BitKeeper -prune -o -name '*.h' -print` && \ + find include -name SCCS -prune -o -name BitKeeper -prune -o \ + -type d \( -name "asm-*" -o -name config \) -prune -o \ + -name '*.h' -print | xargs ctags $$CTAGSF -a && \ + find $(SUBDIRS) init -name SCCS -prune -o -name BitKeeper -prune -o \ + -name '*.[ch]' -print | xargs ctags $$CTAGSF -a # Documentation targets # --------------------------------------------------------------------------- @@ -639,19 +686,35 @@ @$(MAKE) -C Documentation/DocBook $@ -endif # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) - # Scripts to check various things for consistency # --------------------------------------------------------------------------- checkconfig: - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl + find * -name SCCS -prune -o -name BitKeeper -prune -o \ + -name '*.[hcS]' -type f -print | sort \ + | xargs $(PERL) -w scripts/checkconfig.pl checkhelp: - find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl + find * -name SCCS -prune -o -name BitKeeper -prune -o \ + -name [cC]onfig.in -print | sort \ + | xargs $(PERL) -w scripts/checkhelp.pl checkincludes: - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl + find * -name SCCS -prune -o -name BitKeeper -prune -o \ + -name '*.[hcS]' -type f -print | sort \ + | xargs $(PERL) -w scripts/checkincludes.pl + +else # ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) + +# We're called with both targets which do and do not need +# .config included. Handle them one after the other. +# =========================================================================== + +%:: FORCE + $(MAKE) $@ + +endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) +endif # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) # FIXME Should go into a make.lib or something # =========================================================================== |