From: Kenn H. <ke...@us...> - 2003-03-26 00:06:49
|
Update of /cvsroot/linux-vax/kernel-2.5 In directory sc8-pr-cvs1:/tmp/cvs-serv28285 Modified Files: Makefile Rules.make Log Message: Merge with 2.5.44 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Makefile,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- Makefile 24 Mar 2003 23:47:41 -0000 1.50 +++ Makefile 26 Mar 2003 00:06:43 -0000 1.51 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 43 +SUBLEVEL = 44 EXTRAVERSION = # *DOCUMENTATION* @@ -239,7 +239,7 @@ # If .config doesn't exist - tough luck -.config: arch/$(ARCH)/config.in $(shell find . -name Config.in) +.config: arch/$(ARCH)/config.in # FIXME $(shell find . -name Config.in) @echo '***' @if [ -f $@ ]; then \ echo '*** The tree was updated, so your .config may be'; \ @@ -456,18 +456,23 @@ depend dep: .hdepend -# .hdepend is our (misnomed) marker for whether we've run +# .hdepend is our (misnomed) marker for whether we've # generated module versions -.hdepend: $(if $(filter dep depend,$(MAKECMDGOALS)),FORCE) +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. -include/linux/modversions.h: scripts/fixdep prepare FORCE +include/linux/modversions.h: FORCE @rm -rf .tmp_export-objs @$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) @echo -n ' Generating $@' @@ -661,90 +666,61 @@ defconfig: yes '' | $(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in -# Cleaning up -# --------------------------------------------------------------------------- +### +# Cleaning is done on three levels. +# make clean Delete all automatically generated files, including +# tools and firmware. +# make mrproper Delete the current configuration, and related files +# Any core files spread around is deleted as well +# make distclean Remove editor backup files, patch leftover files and the like -# files removed with 'make clean' -CLEAN_FILES += \ - include/linux/compile.h \ - vmlinux System.map \ - 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 \ - drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \ - drivers/scsi/aic7xxx/aic7xxx_seq.h \ - drivers/scsi/aic7xxx/aic7xxx_reg.h \ - drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \ - drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ - drivers/scsi/aic7xxx/aicasm/y.tab.h \ - drivers/scsi/aic7xxx/aicasm/aicasm \ - 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 clean' +CLEAN_FILES += vmlinux System.map MC* -# files removed with 'make mrproper' +# Files removed with 'make mrproper' MRPROPER_FILES += \ include/linux/autoconf.h include/linux/version.h \ - drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \ - drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \ - drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \ - drivers/net/hamradio/soundmodem/gentbl \ - sound/oss/*_boot.h sound/oss/.*.boot \ - sound/oss/msndinit.c \ - sound/oss/msndperm.c \ - sound/oss/pndsperm.c \ - sound/oss/pndspini.c \ - drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \ - .version .config* config.in config.old \ - scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \ - scripts/lxdialog/*.o scripts/lxdialog/lxdialog \ + .version .config .config.old config.in config.old \ .menuconfig.log \ include/asm \ .hdepend include/linux/modversions.h \ tags TAGS kernel.spec \ .tmp* -# directories removed with 'make mrproper' +# Directories removed with 'make mrproper' MRPROPER_DIRS += \ .tmp_export-objs \ include/config \ include/linux/modules -clean: archclean - @echo 'Cleaning up' - @find . $(RCS_FIND_IGNORE) \ - \( -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) - +@$(call descend,Documentation/DocBook,clean) +# clean - Delete all intermediate files +# +clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts -mrproper: clean archmrproper - @echo 'Making mrproper' +$(addprefix _clean_,$(clean-dirs)): + $(MAKE) MAKEFILES= -rR -f scripts/Makefile.clean obj=$(patsubst _clean_%,%,$@) + +quiet_cmd_rmclean = RM $$(CLEAN_FILES) +cmd_rmclean = rm -f $(CLEAN_FILES) +clean: archclean $(addprefix _clean_,$(clean-dirs)) + $(call cmd,rmclean) @find . $(RCS_FIND_IGNORE) \ - \( -name .depend -o -name .\*.cmd \) \ - -type f -print | xargs rm -f - @rm -rf $(MRPROPER_DIRS) - @rm -f $(MRPROPER_FILES) - +@$(call descend,scripts,mrproper) - +@$(call descend,Documentation/DocBook,mrproper) + \( -name '*.[oas]' -o -name '.*.cmd' -o -name '.*.d' \ + -o -name '.*.tmp' \) -type f -print | xargs rm -f -distclean: mrproper - @echo 'Making distclean' +# mrproper - delete configuration + modules + core files +# +quiet_cmd_mrproper = RM $$(MRPROPER_DIRS) + $$(MRPROPER_FILES) +cmd_mrproper = rm -rf $(MRPROPER_DIRS) && rm -f $(MRPROPER_FILES) +mrproper distclean: clean archmrproper + @echo ' Making $@ in the srctree' @find . $(RCS_FIND_IGNORE) \ - \( -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 \ - -print | xargs rm -f + -o -name '.*.rej' -o -size 0 \ + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ + -type f -print | xargs rm -f + $(call cmd,mrproper) # Generate tags for editors # --------------------------------------------------------------------------- Index: Rules.make =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Rules.make,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Rules.make 22 Mar 2003 19:49:05 -0000 1.24 +++ Rules.make 26 Mar 2003 00:06:45 -0000 1.25 @@ -1,3 +1,6 @@ + +ifndef no-rules.make + # # This file contains rules which are shared between multiple Makefiles. # @@ -87,6 +90,7 @@ # Subdirectories we need to descend into subdir-ym := $(sort $(subdir-y) $(subdir-m)) +subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) # export.o is never a composite object, since $(export-objs) has a # fixed meaning (== objects which EXPORT_SYMBOL()) @@ -113,6 +117,10 @@ # Only build module versions for files which are selected to be built export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m)) +host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m))) +host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m))) +host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs)) + # Add subdir path EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS)) @@ -127,12 +135,19 @@ multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y)) multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m)) subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) +subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) +clean-files := $(addprefix $(obj)/,$(clean-files)) +host-progs := $(addprefix $(obj)/,$(host-progs)) +host-progs-single := $(addprefix $(obj)/,$(host-progs-single)) +host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi)) +host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs)) # The temporary file to save gcc -MD generated dependencies must not # contain a comma depfile = $(subst $(comma),_,$(@D)/.$(@F).d) -# We're called for one of three purposes: +# We're called for one of four purposes: +# o subdirclean: Delete intermidiate files in the current directory # o fastdep: build module version files (.ver) for $(export-objs) in # the current directory # o modules_install: install the modules in the current directory @@ -142,6 +157,19 @@ # When targets are given directly (like foo.o), we just build these # targets (That happens when someone does make some/dir/foo.[ois]) +ifeq ($(MAKECMDGOALS),subdirclean) + +__clean-files := $(wildcard $(EXTRA_TARGETS) $(host-progs) $(clean-files)) + +subdirclean: $(subdir-ymn) +ifneq ($(strip $(__clean-files) $(clean-rule)),) + rm -f $(__clean-files) + $(clean-rule) +else + @: +endif + +else ifeq ($(MAKECMDGOALS),fastdep) # =========================================================================== @@ -154,14 +182,14 @@ # --------------------------------------------------------------------------- fastdep: $(subdir-ym) - @/bin/true + @: else # This sets version suffixes on exported symbols # --------------------------------------------------------------------------- -MODVERDIR := include/linux/modules/ +MODVERDIR := include/linux/modules # # Added the SMP separator to stop module accidents between uniprocessor @@ -246,7 +274,7 @@ ifneq ($(obj-m),) $(call cmd,modules_install) else - @/bin/true + @: endif else # ! modules_install @@ -255,23 +283,18 @@ # Building # ========================================================================== -# If a Makefile does define neither O_TARGET nor L_TARGET, -# use a standard O_TARGET named "built-in.o" - -ifndef O_TARGET -ifndef L_TARGET -O_TARGET := $(obj)/built-in.o -endif -endif +# If a Makefile does not define a L_TARGET, link an object called "built-in.o" ifdef L_TARGET L_TARGET := $(obj)/$(L_TARGET) +else +O_TARGET := $(obj)/built-in.o endif first_rule: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \ $(if $(KBUILD_MODULES),$(obj-m)) \ $(subdir-ym) - @/bin/true + @: # define listing_o_c to get compiler listings from .c -> .o compilations listing_o_c = -Wa,-adnhls=$(subst $(comma),_,$(@D)/$(*F)).lst -g @@ -402,14 +425,6 @@ # Compile programs on the host # =========================================================================== -host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m))) -host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m))) -host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs)) -host-progs := $(addprefix $(obj)/,$(host-progs)) -host-progs-single := $(addprefix $(obj)/,$(host-progs-single)) -host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi)) -host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs)) - quiet_cmd_host_cc__c = HOSTCC $(echo_target) cmd_host_cc__c = $(HOSTCC) -Wp,-MD,$(depfile) \ $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ @@ -434,6 +449,7 @@ targets += $(host-progs-single) $(host-progs-multi-objs) $(host-progs-multi) +endif # ! subdirclean endif # ! modules_install endif # ! fastdep @@ -483,9 +499,9 @@ # Descending # --------------------------------------------------------------------------- -.PHONY: $(subdir-ym) +.PHONY: $(subdir-ymn) -$(subdir-ym): +$(subdir-ymn): +@$(call descend,$@,$(MAKECMDGOALS)) # Add FORCE to the prequisites of a target to force it to be always rebuilt. @@ -608,3 +624,5 @@ descend = echo '$(MAKE) -f $(1)/Makefile $(2)'; endif descend += $(MAKE) -f $(1)/Makefile obj=$(1) $(2) + +endif |