From: "Jan Beulich" Subject: [PATCH] x86: fix make logic of final linking steps Date: Wed, 04 Oct 2006 17:14:19 +0200 Message-ID: <4523EBEB.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Make sure that if one of the intermediate steps fails, a subsequent make invocation doesn't think there's nothing to do. This should be viewed as an intermediate step towards splitting up the rule into three independent ones, passing intermediate files from one to the next. Signed-off-by: Jan Beulich Index: 2006-10-04/xen/arch/x86/Makefile =================================================================== --- 2006-10-04.orig/xen/arch/x86/Makefile 2006-10-04 08:49:29.000000000 +0200 +++ 2006-10-04/xen/arch/x86/Makefile 2006-10-04 09:25:01.000000000 +0200 @@ -49,22 +49,22 @@ $(TARGET): $(TARGET)-syms boot/mkelf32 `$(NM) $(TARGET)-syms | sort | tail -n 1 | \ sed -e 's/^\([^ ]*\).*/0x\1/'` -$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds +$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds Makefile $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o $(LD) $(LDFLAGS) -T xen.lds -N \ boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \ - $(BASEDIR)/common/symbols-dummy.o -o $@ - $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S + $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 + $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o $(LD) $(LDFLAGS) -T xen.lds -N \ boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \ - $(BASEDIR)/xen-syms.o -o $@ - $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S + $(BASEDIR)/xen-syms.o -o $(@D)/.$(@F).1 + $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o $(LD) $(LDFLAGS) -T xen.lds -N \ boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \ $(BASEDIR)/xen-syms.o -o $@ - rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o + rm -f $(BASEDIR)/xen-syms.[So] $(@D)/.$(@F).[0-9] asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS) $(CC) $(CFLAGS) -S -o $@ $< @@ -78,3 +78,4 @@ boot/mkelf32: boot/mkelf32.c .PHONY: clean clean:: rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32 + rm -f $(BASEDIR)/xen-syms.[So] $(BASEDIR)/.xen-syms.[0-9]