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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

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

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

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux