[3.5.y.z,extended,stable] Patch "kbuild: Do not remove vmlinux when cleaning external" has been added to staging queue

Submitted by Herton Ronaldo Krzesinski on Jan. 8, 2013, 8:56 p.m.


Message ID 1357678616-19625-1-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Jan. 8, 2013, 8:56 p.m.
This is a note to let you know that I have just added a patch titled

    kbuild: Do not remove vmlinux when cleaning external

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 3462153d235ec4aa39c5be84b9ff7817b09545f4 Mon Sep 17 00:00:00 2001
From: Pawel Moll <pawel.moll@arm.com>
Date: Mon, 29 Oct 2012 11:23:02 +0000
Subject: [PATCH 06/27] kbuild: Do not remove vmlinux when cleaning external

commit bd1ee804af8bdf2fd5131234330615f8aecbd9ed upstream.

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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
 Makefile |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index de1e58b..d253746 100644
--- a/Makefile
+++ b/Makefile
@@ -1003,11 +1003,14 @@  clean: rm-dirs  := $(CLEAN_DIRS)
 clean: rm-files := $(CLEAN_FILES)
 clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)

-PHONY += $(clean-dirs) clean archclean
+PHONY += $(clean-dirs) clean archclean vmlinuxclean
 	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)

-clean: archclean
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
+clean: archclean vmlinuxclean

 # mrproper - Delete all generated files, including .config
@@ -1234,7 +1237,6 @@  scripts: ;

 clean: $(clean-dirs)
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
 	$(call cmd,rmdirs)
 	$(call cmd,rmfiles)