diff mbox

Makefile: make clean keep bounds.h and asm-offsets.h

Message ID 20090902152956.huh9lx2hcco44coc@imap.linux.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

cndougla@linux.vnet.ibm.com Sept. 2, 2009, 7:29 p.m. UTC
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.

Signed-off-by: Chase Douglas <cndougla@linux.vnet.ibm.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index 6f89fbb..1ad01f8 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -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