Skip to contentSkip to conversation

Makefile: make clean keep bounds.h and asm-offsets.h (previous patch had ws issues)

PATCH New [email protected] 1 participant 1 message Sep 2, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: make clean keep bounds.h and asm-offsets.h (previous patch had ws issues)

make clean is supposed to leave the kernel in a state such that modules may be built against it. However, currently make clean deletes include/linux/bounds.h and include/asm/asm-offsets.h, which are needed to build kernel modules. The following patch filters these two files from the targets to be cleaned.

scripts/Makefile.clean +3 -2
index 6f89fbb..1ad01f8 100644
@@ -40,10 +40,11 @@ subdir-ymn	:= $(addprefix $(obj)/,$(subdir-ymn))
  # build a list of files to remove, usually relative to the current
  # directory
 
-__clean-files	:= $(extra-y) $(always)                  \
+__clean-files	:= $(filter-out $(bounds-file) $(offsets-file), \
+		   $(extra-y) $(always)                  \
  		   $(targets) $(clean-files)             \
  		   $(host-progs)                         \
-		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
+		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-))
 
  # as clean-files is given relative to the current directory, this adds
  # a $(obj) prefix, except for absolute paths