WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 8/8] tools/firmware - Use generic subdirs rules

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 8/8] tools/firmware - Use generic subdirs rules
From: Bastian Blank <bastian@xxxxxxxxxxxx>
Date: Fri, 21 Mar 2008 14:02:36 +0100
Delivery-date: Fri, 21 Mar 2008 06:05:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
# HG changeset patch
# User Bastian Blank <waldi@xxxxxxxxxx>
# Date 1206103830 -3600
# Node ID d80f5d24af7a3f0f5b05b75e046c1269f67c46b9
# Parent  771c3ebe0c8c0bea6a6c81271cd7462fb31f4f19
Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>

diff -r 771c3ebe0c8c -r d80f5d24af7a tools/firmware/Makefile
--- a/tools/firmware/Makefile   Fri Mar 21 13:50:30 2008 +0100
+++ b/tools/firmware/Makefile   Fri Mar 21 13:50:30 2008 +0100
@@ -7,7 +7,7 @@ INST_DIR := $(DESTDIR)/usr/lib/xen/boot
 INST_DIR := $(DESTDIR)/usr/lib/xen/boot
 
 SUBDIRS :=
-SUBDIRS += rombios rombios/32bit
+SUBDIRS += rombios
 SUBDIRS += vgabios
 SUBDIRS += extboot
 #SUBDIRS += etherboot
@@ -21,9 +21,7 @@ all:
        echo "(visit http://www.cix.co.uk/~mayday for more information)"; \
        echo "***********************************************************"; \
        else \
-       for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done; \
+       $(MAKE) subdirs-$@; \
        fi
 
 
@@ -33,7 +31,4 @@ install: all
        [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
 
 .PHONY: clean
-clean: 
-       @set -e; for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done
+clean: subdirs-clean
diff -r 771c3ebe0c8c -r d80f5d24af7a tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile Fri Mar 21 13:50:30 2008 +0100
+++ b/tools/firmware/hvmloader/Makefile Fri Mar 21 13:50:30 2008 +0100
@@ -23,6 +23,8 @@ CFLAGS :=
 CFLAGS :=
 include $(XEN_ROOT)/tools/Rules.mk
 
+SUBDIRS := acpi
+
 # The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x100000
 
@@ -38,17 +40,13 @@ OBJS = $(patsubst %.c,%.o,$(SRCS))
 OBJS = $(patsubst %.c,%.o,$(SRCS))
 
 .PHONY: all
-all: hvmloader
+all: subdirs-all hvmloader
 
 hvmloader: roms.h acpi/acpi.a $(SRCS)
        $(CC) $(CFLAGS) -c $(SRCS)
        $(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o hvmloader.tmp $(OBJS) 
acpi/acpi.a
        $(OBJCOPY) hvmloader.tmp hvmloader
        rm -f hvmloader.tmp
-
-.PHONY: acpi/acpi.a
-acpi/acpi.a:
-       $(MAKE) -C acpi
 
 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin 
../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h 
../extboot/extboot.bin
        sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
@@ -58,7 +56,6 @@ roms.h: ../rombios/BIOS-bochs-latest ../
        sh ./mkhex extboot ../extboot/extboot.bin >> roms.h
 
 .PHONY: clean
-clean:
+clean: subdirs-clean
        rm -f roms.h acpi.h
        rm -f hvmloader hvmloader.tmp *.o
-       $(MAKE) -C acpi clean
diff -r 771c3ebe0c8c -r d80f5d24af7a tools/firmware/rombios/32bit/Makefile
--- a/tools/firmware/rombios/32bit/Makefile     Fri Mar 21 13:50:30 2008 +0100
+++ b/tools/firmware/rombios/32bit/Makefile     Fri Mar 21 13:50:30 2008 +0100
@@ -18,20 +18,12 @@ MODULES = tcgbios/tcgbiosext.o
 
 .PHONY: all subdirs clean
 
-subdirs:
-       @set -e; for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir all; \
-       done;
+all: subdirs-all $(TARGET)
 
-all: $(TARGET)
+clean: subdirs-clean
+       rm -rf *.o $(TARGET)
 
-clean:
-       rm -rf *.o $(TARGET)
-       @for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done;
-
-$(TARGET): subdirs 32bitbios.o util.o
+$(TARGET): 32bitbios.o util.o
        $(LD) $(LDFLAGS_DIRECT) -s -r 32bitbios.o $(MODULES) util.o -o 
32bitbios_all.o
        @nm 32bitbios_all.o |                                \
          egrep '^ +U ' >/dev/null && {                      \
diff -r 771c3ebe0c8c -r d80f5d24af7a tools/firmware/rombios/Makefile
--- a/tools/firmware/rombios/Makefile   Fri Mar 21 13:50:30 2008 +0100
+++ b/tools/firmware/rombios/Makefile   Fri Mar 21 13:50:30 2008 +0100
@@ -1,12 +1,16 @@
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+SUBDIRS := 32bit
 
 .PHONY: all
-all: bios
+all: subdirs-all bios
 
 .PHONY: bios
 bios: biossums BIOS-bochs-latest
 
 .PHONY: clean
-clean:
+clean: subdirs-clean
        rm -f  *.o *.a *.s rombios.bin _rombios*_.c
        rm -f  as86-sym.txt ld86-sym.txt 
        rm -f  rombios*.txt rombios*.sym usage biossums
-- 
The sight of death frightens them [Earthers].
                -- Kras the Klingon, "Friday's Child", stardate 3497.2

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 8/8] tools/firmware - Use generic subdirs rules, Bastian Blank <=