aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Moll2012-10-29 06:23:02 -0500
committerMichal Marek2012-12-09 08:52:10 -0600
commitbd1ee804af8bdf2fd5131234330615f8aecbd9ed (patch)
treea267117270f2d2ec14947a465cc2b728ad5a7801 /Makefile
parentfc96b211bc6fa917bfb07a8db4cd898663e5f2c6 (diff)
downloadkernel-video-bd1ee804af8bdf2fd5131234330615f8aecbd9ed.tar.gz
kernel-video-bd1ee804af8bdf2fd5131234330615f8aecbd9ed.tar.xz
kernel-video-bd1ee804af8bdf2fd5131234330615f8aecbd9ed.zip
kbuild: Do not remove vmlinux when cleaning external module
Since commit 1f2bfbd00e466ff3489b2ca5cc75b1cccd14c123 "kbuild: link of vmlinux moved to a script" make clean with M=<dir> argument (so cleaning external module) removes vmlinux, System.map and couple of other files from the *main* kernel build directory! This not what was happening before and almost certainly not what one would expect. This patch moves makes the clean target of the script called only when !KBUILD_EXTMOD. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Cc: stable@vger.kernel.org [v3.5+] Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6744909b345..4781b534873 100644
--- a/Makefile
+++ b/Makefile
@@ -1008,11 +1008,14 @@ clean: rm-dirs := $(CLEAN_DIRS)
1008clean: rm-files := $(CLEAN_FILES) 1008clean: rm-files := $(CLEAN_FILES)
1009clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples) 1009clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
1010 1010
1011PHONY += $(clean-dirs) clean archclean 1011PHONY += $(clean-dirs) clean archclean vmlinuxclean
1012$(clean-dirs): 1012$(clean-dirs):
1013 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1013 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1014 1014
1015clean: archclean 1015vmlinuxclean:
1016 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
1017
1018clean: archclean vmlinuxclean
1016 1019
1017# mrproper - Delete all generated files, including .config 1020# mrproper - Delete all generated files, including .config
1018# 1021#
@@ -1239,7 +1242,6 @@ scripts: ;
1239endif # KBUILD_EXTMOD 1242endif # KBUILD_EXTMOD
1240 1243
1241clean: $(clean-dirs) 1244clean: $(clean-dirs)
1242 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
1243 $(call cmd,rmdirs) 1245 $(call cmd,rmdirs)
1244 $(call cmd,rmfiles) 1246 $(call cmd,rmfiles)
1245 @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ 1247 @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \