From: Daniel Kiper Subject: [PATCH v2] x86/boot: fix reloc.S build dependencies Date: Tue, 21 Oct 2014 23:09:06 +0200 Message-ID: <1413925748-10087-1-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xggi0-00007w-JF for xen-devel@lists.xenproject.org; Tue, 21 Oct 2014 21:11:12 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, Daniel Kiper , keir@xen.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org reloc.S is not rebuild if header included in reloc.c is updated. Fix this issue. Additionally, remove reloc.S build dependency on head.S because anything from reloc.S does not depend on head.S. Add reloc.c dependency to reloc.o build rule for consistency. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - do not use export and pass variable to make command line directly (suggested by Jan Beulich), - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/Makefile | 8 ++++---- xen/arch/x86/boot/build32.mk | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 13f4a66..5fdb5ae 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y += head.o -head.o: reloc.S +RELOC_DEPS = $(BASEDIR)/include/asm-x86/config.h $(BASEDIR)/include/xen/multiboot.h -%.S: %.c - $(MAKE) -f build32.mk $@ +head.o: reloc.S -reloc.S: head.S +reloc.S: reloc.c $(RELOC_DEPS) + $(MAKE) -f build32.mk $@ RELOC_DEPS="$(RELOC_DEPS)" diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index a36f620..c208249 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk @@ -30,5 +30,6 @@ CFLAGS := $(filter-out -flto,$(CFLAGS)) esac; \ done -reloc.o: $(BASEDIR)/include/asm-x86/config.h +reloc.o: reloc.c $(RELOC_DEPS) + .PRECIOUS: %.bin %.lnk -- 1.7.10.4