From: James Hunt Subject: [PATCH] kvmtool: Makefile: remove static dependency files when make clean Date: Tue, 10 Nov 2015 12:01:36 +0000 Message-ID: <1447156896-24110-1-git-send-email-james.o.hunt@intel.com> To: kvm@vger.kernel.org Return-path: Received: from mga11.intel.com ([192.55.52.93]:10036 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbbKJMBm (ORCPT ); Tue, 10 Nov 2015 07:01:42 -0500 Sender: kvm-owner@vger.kernel.org List-ID: After make lkvm-static & make clean, the dependency files for static objects (.xxx.static.o.d) are not removed. Signed-off-by: Xiaochen Shen Signed-off-by: Dimitri John Ledkov Signed-off-by: James Hunt --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9138942..f8fdc66 100644 --- a/Makefile +++ b/Makefile @@ -369,6 +369,9 @@ c_flags = -Wp,-MD,$(depfile) $(CFLAGS) # STATIC_OBJS = $(patsubst %.o,%.static.o,$(OBJS) $(OBJS_STATOPT)) +STATIC_DEPS := $(foreach obj,$(STATIC_OBJS),\ + $(subst $(comma),_,$(dir $(obj)).$(notdir $(obj)).d)) + $(PROGRAM)-static: $(STATIC_OBJS) $(OTHEROBJS) $(GUEST_INIT) $(GUEST_PRE_INIT) $(E) " LINK " $@ $(Q) $(CC) -static $(CFLAGS) $(STATIC_OBJS) $(OTHEROBJS) $(GUEST_OBJS) $(LDFLAGS) $(LIBS) $(LIBS_STATOPT) -o $@ @@ -489,7 +492,7 @@ clean: $(Q) rm -f x86/bios/bios-rom.h $(Q) rm -f tests/boot/boot_test.iso $(Q) rm -rf tests/boot/rootfs/ - $(Q) rm -f $(DEPS) $(OBJS) $(OTHEROBJS) $(OBJS_DYNOPT) $(STATIC_OBJS) $(PROGRAM) $(PROGRAM_ALIAS) $(PROGRAM)-static $(GUEST_INIT) $(GUEST_PRE_INIT) $(GUEST_OBJS) + $(Q) rm -f $(DEPS) $(STATIC_DEPS) $(OBJS) $(OTHEROBJS) $(OBJS_DYNOPT) $(STATIC_OBJS) $(PROGRAM) $(PROGRAM_ALIAS) $(PROGRAM)-static $(GUEST_INIT) $(GUEST_PRE_INIT) $(GUEST_OBJS) $(Q) rm -f cscope.* $(Q) rm -f tags $(Q) rm -f TAGS -- 2.5.0 --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.