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

[Xen-changelog] [xen master] mini-os: build fixes



commit bf11bf940f20e7428ed0a9610c66259de341adc6
Author:     Thomas Leonard <talex5@xxxxxxxxx>
AuthorDate: Thu Jun 26 12:28:18 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jun 27 13:38:33 2014 +0100

    mini-os: build fixes
    
    Make .o rules depend on the includes. Before, only the final link step
    depended on setting up the includes directory, making parallel builds
    unreliable.
    
    Make symlinks use explicit make rules instead of using a phony target.
    Avoids unnecessary rebuilds.
    
    [talex5@xxxxxxxxx: bring back "make links", for stubdom]
    Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 extras/mini-os/Makefile |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
index 50d038b..6d6537e 100644
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -50,6 +50,11 @@ flags-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
 
 DEF_CFLAGS += $(flags-y)
 
+# Symlinks and headers that must be created before building the C files
+GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/xen 
include/$(TARGET_ARCH_FAM)/mini-os
+
+EXTRA_DEPS += $(GENERATED_HEADERS)
+
 # Include common mini-os makerules.
 include minios.mk
 
@@ -124,11 +129,18 @@ include/list.h: 
$(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $
        perl $^ --prefix=minios  >$@.new
        $(call move-if-changed,$@.new,$@)
 
+# Used by stubdom's Makefile
 .PHONY: links
-links: include/list.h $(ARCH_LINKS)
-       [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
-       [ -e include/mini-os ] || ln -sf . include/mini-os
-       [ -e include/$(TARGET_ARCH_FAM)/mini-os ] || ln -sf . 
include/$(TARGET_ARCH_FAM)/mini-os
+links: $(GENERATED_HEADERS)
+
+include/xen:
+       ln -sf ../../../xen/include/public $@
+
+include/mini-os:
+       ln -sf . $@
+
+include/$(TARGET_ARCH_FAM)/mini-os:
+       ln -sf . $@
 
 .PHONY: arch_lib
 arch_lib:
@@ -174,7 +186,7 @@ ifneq ($(APP_OBJS),)
 APP_O=$(OBJ_DIR)/$(TARGET)_app.o 
 endif
 
-$(OBJ_DIR)/$(TARGET): links include/list.h $(OBJS) $(APP_O) arch_lib
+$(OBJ_DIR)/$(TARGET): $(OBJS) $(APP_O) arch_lib
        $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) 
-o $@.o
        $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
        $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
@@ -212,4 +224,3 @@ tags:
 .PHONY: TAGS
 TAGS:
        $(all_sources) | xargs etags
-
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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