[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86: fix make logic of final linking steps



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 <jbeulich@xxxxxxxxxx>

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]



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.