From: Kenn H. <ke...@us...> - 2003-02-16 01:05:30
|
Update of /cvsroot/linux-vax/kernel-2.5 In directory sc8-pr-cvs1:/tmp/cvs-serv26756 Modified Files: Makefile Rules.make Log Message: Merge with 2.5.35 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Makefile,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- Makefile 16 Feb 2003 00:11:43 -0000 1.41 +++ Makefile 16 Feb 2003 01:05:23 -0000 1.42 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 34 +SUBLEVEL = 35 EXTRAVERSION = # *DOCUMENTATION* @@ -164,6 +164,9 @@ SUBDIRS := init kernel mm fs ipc lib drivers sound net security +# The temporary file to save gcc -MD generated dependencies must not +# contain a comma +depfile = $(subst $(comma),_,$(@D)/.$(@F).d) noconfig_targets := xconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ @@ -271,7 +274,7 @@ vmlinux-objs := $(HEAD) $(INIT) $(CORE_FILES) $(LIBS) $(DRIVERS) $(NETWORKS) -quiet_cmd_link_vmlinux = LD $@ +quiet_cmd_link_vmlinux = LD $@ cmd_link_vmlinux = $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(HEAD) $(INIT) \ --start-group \ $(CORE_FILES) \ @@ -318,8 +321,12 @@ # This can be used by arch/$ARCH/Makefile to preprocess # their vmlinux.lds.S file -arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S - $(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -P -C -U$(ARCH) $< -o $@ +AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH) + +arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S FORCE + $(call if_changed_dep,as_s_S) + +targets += arch/$(ARCH)/vmlinux.lds.s # Single targets # --------------------------------------------------------------------------- @@ -782,12 +789,33 @@ # FIXME Should go into a make.lib or something # =========================================================================== +a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \ + $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) + +quiet_cmd_as_s_S = CPP $(echo_target) +cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< + # read all saved command lines -cmd_files := $(wildcard .*.cmd) +targets := $(wildcard $(sort $(targets))) +cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) + ifneq ($(cmd_files),) include $(cmd_files) endif + +# execute the command and also postprocess generated .d dependencies +# file + +if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ + $(filter-out $(cmd_$(1)),$(cmd_$@))\ + $(filter-out $(cmd_$@),$(cmd_$(1)))),\ + @set -e; \ + $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ + $(cmd_$(1)); \ + $(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ + rm -f $(depfile); \ + mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) # Usage: $(call if_changed_rule,foo) # will check if $(cmd_foo) changed, or any of the prequisites changed, Index: Rules.make =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Rules.make,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Rules.make 9 Feb 2003 21:34:06 -0000 1.18 +++ Rules.make 16 Feb 2003 01:05:23 -0000 1.19 @@ -174,7 +174,7 @@ # files (fix-dep filters them), so touch modversions.h if any of the .ver # files changes -quiet_cmd_cc_ver_c = MKVER include/linux/modules/$(RELDIR)/$*.ver +quiet_cmd_cc_ver_c = MKVER include/linux/modules/$(RELDIR)/$*.ver cmd_cc_ver_c = $(CPP) $(c_flags) $< | $(GENKSYMS) $(genksyms_smp_prefix) \ -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp @@ -274,26 +274,26 @@ -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \ $(export_flags) -quiet_cmd_cc_s_c = CC $(echo_target) +quiet_cmd_cc_s_c = CC $(echo_target) cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $< %.s: %.c FORCE $(call if_changed_dep,cc_s_c) -quiet_cmd_cc_i_c = CPP $(echo_target) +quiet_cmd_cc_i_c = CPP $(echo_target) cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< %.i: %.c FORCE $(call if_changed_dep,cc_i_c) -quiet_cmd_cc_o_c = CC $(echo_target) +quiet_cmd_cc_o_c = CC $(echo_target) cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< $(listing_o_c) %.o: %.c FORCE $(call if_changed_dep,cc_o_c) -quiet_cmd_cc_lst_c = ' Generating $(echo_target)' -cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && $(TOPDIR)/scripts/makelst $*.o $(TOPDIR)/System.map $(OBJDUMP) > $@ +quiet_cmd_cc_lst_c = MKLST $(echo_target) +cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && $(TOPDIR)/scripts/makelst $*.o $(TOPDIR)/System.map $(OBJDUMP) > $@ %.lst: %.c FORCE $(call if_changed_dep,cc_lst_c) @@ -309,13 +309,13 @@ a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) -quiet_cmd_as_s_S = CPP $(echo_target) +quiet_cmd_as_s_S = CPP $(echo_target) cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< %.s: %.S FORCE $(call if_changed_dep,as_s_S) -quiet_cmd_as_o_S = AS $(echo_target) +quiet_cmd_as_o_S = AS $(echo_target) cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< %.o: %.S FORCE @@ -333,7 +333,7 @@ # Rule to compile a set of .o files into one .o file # ifdef O_TARGET -quiet_cmd_link_o_target = LD $(echo_target) +quiet_cmd_link_o_target = LD $(echo_target) # If the list of objects to link is empty, just create an empty O_TARGET cmd_link_o_target = $(if $(strip $(obj-y)),\ $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^),\ @@ -349,7 +349,7 @@ # Rule to compile a set of .o files into one .a file # ifdef L_TARGET -quiet_cmd_link_l_target = AR $(echo_target) +quiet_cmd_link_l_target = AR $(echo_target) cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(obj-y) $(L_TARGET): $(obj-y) FORCE @@ -362,7 +362,7 @@ # Rule to link composite objects # -quiet_cmd_link_multi = LD $(echo_target) +quiet_cmd_link_multi = LD $(echo_target) cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $($(basename $@)-objs),$^) # We would rather have a list of rules like @@ -384,7 +384,7 @@ host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m))) host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs)) -quiet_cmd_host_cc__c = HOSTCC $(echo_target) +quiet_cmd_host_cc__c = HOSTCC $(echo_target) cmd_host_cc__c = $(HOSTCC) -Wp,-MD,$(depfile) \ $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ $(HOST_LOADLIBES) -o $@ $< @@ -392,14 +392,14 @@ $(host-progs-single): %: %.c FORCE $(call if_changed_dep,host_cc__c) -quiet_cmd_host_cc_o_c = HOSTCC $(echo_target) +quiet_cmd_host_cc_o_c = HOSTCC $(echo_target) cmd_host_cc_o_c = $(HOSTCC) -Wp,-MD,$(depfile) \ $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $< $(host-progs-multi-objs): %.o: %.c FORCE $(call if_changed_dep,host_cc_o_c) -quiet_cmd_host_cc__o = HOSTLD $(echo_target) +quiet_cmd_host_cc__o = HOSTLD $(echo_target) cmd_host_cc__o = $(HOSTCC) $(HOSTLDFLAGS) -o $@ $($@-objs) \ $(HOST_LOADLIBES) @@ -414,9 +414,11 @@ # Shipped files # =========================================================================== +quiet_cmd_shipped = SHIPPED $(echo_target) +cmd_shipped = cat $< > $@ + %:: %_shipped - @echo ' CP $(echo_target)' - @cp $< $@ + $(call cmd,shipped) # Commands useful for building a boot image # =========================================================================== @@ -424,7 +426,7 @@ # Use as following: # # target: source(s) FORCE -# $(if_changed,ld/objcopy) +# $(if_changed,ld/objcopy/gzip) # # and add target to EXTRA_TARGETS so that we know we have to # read in the saved command line @@ -432,20 +434,20 @@ # Linking # --------------------------------------------------------------------------- -quiet_cmd_ld = LD $(echo_target) +quiet_cmd_ld = LD $(echo_target) cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$@) \ $(filter-out FORCE,$^) -o $@ # Objcopy # --------------------------------------------------------------------------- -quiet_cmd_objcopy = OBJCPY $(echo_target) +quiet_cmd_objcopy = OBJCOPY $(echo_target) cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ # Gzip # --------------------------------------------------------------------------- -quiet_cmd_gzip = GZIP $(echo_target) +quiet_cmd_gzip = GZIP $(echo_target) cmd_gzip = gzip -f -9 < $< > $@ # =========================================================================== |