[Sam Ravnborg] > Nice. Thanks.
> > Does not support CPP or CC -S ... do those even work? > Could you please elaborate - what do you impose by CPP and CC -s? > Maybe it just too late in my timezone... I'm talking about the built-in rules for .c->.i (preprocessing), .S->.s (preprocessing), and .c->.s (compiling but not assembling). My mechanism didn't support those rules, so they always just printed 'CPP obj.i', etc, whether or not -DMODULE is defined. Interestingly, those rules seem to work fine now. I could have sworn yesterday that they didn't work at all. Weird. So, since they are working for me now, here is a better patch. Peter --- 2.5.45/scripts/Makefile.build~ 2002-11-03 07:44:20.000000000 -0600 +++ 2.5.45/scripts/Makefile.build 2002-11-03 21:04:26.000000000 -0600 @@ -68,19 +68,22 @@ -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \ $(export_flags) -quiet_cmd_cc_s_c = CC $@ +targ2obj = $(patsubst %.s,%.o,$(patsubst %.i,%.o,$@)) +quiet_modtag = $(if $(filter $(targ2obj),$(obj-m)),[M],$(if $(filter +$(targ2obj),$(real-objs-m)),(M), )) + +quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ 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 $@ +quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< %.i: %.c FORCE $(call if_changed_dep,cc_i_c) -quiet_cmd_cc_o_c = CC $@ +quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< %.o: %.c FORCE @@ -103,13 +106,13 @@ a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) -quiet_cmd_as_s_S = CPP $@ +quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< %.s: %.S FORCE $(call if_changed_dep,as_s_S) -quiet_cmd_as_o_S = AS $@ +quiet_cmd_as_o_S = AS $(quiet_modtag) $@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< %.o: %.S FORCE @@ -156,7 +159,7 @@ # Rule to link composite objects # -quiet_cmd_link_multi = LD $@ +quiet_cmd_link_multi = LD $(quiet_modtag) $@ cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(addprefix $(obj)/,$($(subst $(obj)/,,$(@:.o=-objs))) $($(subst $(obj)/,,$(@:.o=-y)))),$^) # We would rather have a list of rules like ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel