Makefile: make clean keep bounds.h and asm-offsets.h (previous patch had ws issues)
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.
Signed-off-by Chase Douglas <[email protected]>
scripts/Makefile.clean +3 -2
@@ -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