Index: linux-2.6.30/Kbuild =================================================================== --- linux-2.6.30.orig/Kbuild +++ linux-2.6.30/Kbuild @@ -10,8 +10,8 @@ bounds-file := include/linux/bounds.h -always := $(bounds-file) -targets := $(bounds-file) kernel/bounds.s +always_noclean := $(bounds-file) +targets := kernel/bounds.s quiet_cmd_bounds = GEN $@ define cmd_bounds @@ -45,8 +45,7 @@ $(obj)/$(bounds-file): kernel/bounds.s K offsets-file := include/asm/asm-offsets.h -always += $(offsets-file) -targets += $(offsets-file) +always_noclean += $(offsets-file) targets += arch/$(SRCARCH)/kernel/asm-offsets.s @@ -93,6 +92,3 @@ quiet_cmd_syscalls = CALL $< PHONY += missing-syscalls missing-syscalls: scripts/checksyscalls.sh FORCE $(call cmd,syscalls) - -# Delete all targets during make clean -clean-files := $(addprefix $(objtree)/,$(filter-out $(bounds-file) $(offsets-file),$(targets))) Index: linux-2.6.30/scripts/Makefile.build =================================================================== --- linux-2.6.30.orig/scripts/Makefile.build +++ linux-2.6.30/scripts/Makefile.build @@ -15,6 +15,7 @@ obj-m := lib-y := lib-m := always := +always_noclean := targets := subdir-y := subdir-m := @@ -92,7 +93,7 @@ modorder-target := $(obj)/modules.order __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ $(if $(KBUILD_MODULES),$(obj-m) $(modorder-target)) \ - $(subdir-ym) $(always) + $(subdir-ym) $(always) $(always_noclean) @: # Linus' kernel sanity checking tool @@ -264,7 +265,7 @@ $(obj)/%.o: $(src)/%.S FORCE $(call if_changed_dep,as_o_S) targets += $(real-objs-y) $(real-objs-m) $(lib-y) -targets += $(extra-y) $(MAKECMDGOALS) $(always) +targets += $(extra-y) $(MAKECMDGOALS) $(always) $(always_noclean) # Linker scripts preprocessor (.lds.S -> .lds) # ---------------------------------------------------------------------------