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

[Xen-changelog] [xen-unstable] hvmloader: Fix build dependency (rombios.o depends on roms.inc)



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1303099279 -3600
# Node ID 07d832ad23021445bc56fafaeb2843c94d868005
# Parent  f728acaed4815b89cf458718cddea538bb2d67d2
hvmloader: Fix build dependency (rombios.o depends on roms.inc)

Also, generate roms.inc file in a scratch location and then move in
place. This is more reliable if make is terminated at an arbitrary
point.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r f728acaed481 -r 07d832ad2302 tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile Sat Apr 16 20:12:05 2011 +0100
+++ b/tools/firmware/hvmloader/Makefile Mon Apr 18 05:01:19 2011 +0100
@@ -54,7 +54,7 @@
 all: subdirs-all
        $(MAKE) hvmloader
 
-hvmloader.o: roms.inc
+rombios.o hvmloader.o: roms.inc
 smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\""
 
 hvmloader: $(OBJS) acpi/acpi.a
@@ -63,32 +63,34 @@
        rm -f hvmloader.tmp
 
 roms.inc: $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) ../etherboot/eb-roms.h
-       echo "/* Autogenerated file. DO NOT EDIT */" > roms.inc
+       echo "/* Autogenerated file. DO NOT EDIT */" > $@.new
 
 ifneq ($(ROMBIOS_ROM),)
-       echo "#ifdef ROM_INCLUDE_ROMBIOS" >> roms.inc
-       sh ./mkhex rombios $(ROMBIOS_ROM) >> roms.inc
-       echo "#endif" >> roms.inc
+       echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
+       sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new
+       echo "#endif" >> $@.new
 endif
 
 ifneq ($(STDVGA_ROM),)
-       echo "#ifdef ROM_INCLUDE_VGABIOS" >> roms.inc
-       sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> roms.inc
-       echo "#endif" >> roms.inc
+       echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
+       sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
+       echo "#endif" >> $@.new
 endif
 ifneq ($(CIRRUSVGA_ROM),)
-       echo "#ifdef ROM_INCLUDE_VGABIOS" >> roms.inc
-       sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> roms.inc
-       echo "#endif" >> roms.inc
+       echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
+       sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
+       echo "#endif" >> $@.new
 endif
 
-       echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> roms.inc
-       cat ../etherboot/eb-roms.h >> roms.inc
-       echo "#endif" >> roms.inc
+       echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
+       cat ../etherboot/eb-roms.h >> $@.new
+       echo "#endif" >> $@.new
+
+       mv $@.new $@
 
 .PHONY: clean
 clean: subdirs-clean
-       rm -f roms.inc acpi.h
+       rm -f roms.inc roms.inc.new acpi.h
        rm -f hvmloader hvmloader.tmp *.o $(DEPS)
 
 -include $(DEPS)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.