Skip to contentSkip to conversation

portability: add top level config-$arch files

PATCH In review Christian Ehrhardt 2 participants 2 messages Jan 8, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 portability: add top level config-$arch files

Subject: [PATCH] portability: add top level config-$arch files
From: Christian Ehrhardt <[email protected]>

This allows per arch configuration for the top level Makefile of kvm-userspace e.g. allowing to disable extboot for non x86 or disabling kvmctl build until ported to an architecture.
I'm aware that we now have already 8 config-$arch files in kvm-userspace and this patch adds 4 more so maybe we need some kind of consolidation in the future - comments and approaches to that are very welcome.

 Makefile             |    5 +----
 b/config-i386.mak    |    2 ++
 b/config-ia64.mak    |    2 ++
 b/config-powerpc.mak |    4 ++++
 b/config-x86_64.mak  |    2 ++
 5 files changed, 11 insertions(+), 4 deletions(-)
Makefile +1 -4
diff -r 958dc9839a95 Makefile
@@ -1,5 +1,5 @@
-
 include config.mak
+include config-$(ARCH).mak
 
 DESTDIR=
 
@@ -7,14 +7,11 @@ rpmrelease = devel
 
 .PHONY: kernel user libkvm qemu bios vgabios extboot clean
 
-all: $(if $(WANT_MODULE), kernel) user libkvm qemu
-
 kcmd = $(if $(WANT_MODULE),,@\#)
 
 qemu kernel user libkvm:
 	$(MAKE) -C $@
 
-qemu: libkvm extboot
 user: libkvm
 
 bios:
config-i386.mak new file +2 -0
diff -r 958dc9839a95 config-i386.mak
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot
config-ia64.mak new file +2 -0
diff -r 958dc9839a95 config-ia64.mak
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot
config-powerpc.mak new file +4 -0
diff -r 958dc9839a95 config-powerpc.mak
@@ -0,0 +1,4 @@
+# kvmctl (user) not yet ported to powerpc
+all: $(if $(WANT_MODULE), kernel) libkvm qemu
+# extboot is x86 only
+qemu: libkvm
config-x86_64.mak new file +2 -0
diff -r 958dc9839a95 config-x86_64.mak
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

A message that is not in the archive (sent off-list or not yet received): 11998114633101-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org

#2 lore raw

This is a patch that we do need. Though instead of redefining "qemu" target in every config file. It's best to use a variable and have "qemu" target in the main Makefile use that variable for dependencies.

example:
Makefile

      qemu: $(ARCH_QEMU_DEP)

config-x86
ARCH_QEMU_DEP = libkvm extboot

Same goes for the "all" target. This is how we ended up doing it in the user directory & libkvm dir.

Quoted 72 lines · Christian Ehrhardt

Subject: [PATCH] portability: add top level config-$arch files
From: Christian Ehrhardt <[email protected]>

This allows per arch configuration for the top level Makefile of kvm-userspace e.g. allowing to disable extboot for non x86 or disabling kvmctl build until ported to an architecture.
I'm aware that we now have already 8 config-$arch files in kvm-userspace and this patch adds 4 more so maybe we need some kind of consolidation in the future - comments and approaches to that are very welcome.

 Makefile             |    5 +----
 b/config-i386.mak    |    2 ++
 b/config-ia64.mak    |    2 ++
 b/config-powerpc.mak |    4 ++++
 b/config-x86_64.mak  |    2 ++
 5 files changed, 11 insertions(+), 4 deletions(-)

diff -r 958dc9839a95 Makefile

Makefile +1 -4
@@ -1,5 +1,5 @@
-
 include config.mak
+include config-$(ARCH).mak
 
 DESTDIR=
 
@@ -7,14 +7,11 @@ rpmrelease = devel
 
 .PHONY: kernel user libkvm qemu bios vgabios extboot clean
 
-all: $(if $(WANT_MODULE), kernel) user libkvm qemu
-
 kcmd = $(if $(WANT_MODULE),,@\#)
 
 qemu kernel user libkvm:
 	$(MAKE) -C $@
 
-qemu: libkvm extboot
 user: libkvm
 
 bios:

diff -r 958dc9839a95 config-i386.mak

config-i386.mak new file +2 -0
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot

diff -r 958dc9839a95 config-ia64.mak

config-ia64.mak new file +2 -0
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot

diff -r 958dc9839a95 config-powerpc.mak

config-powerpc.mak new file +4 -0
@@ -0,0 +1,4 @@
+# kvmctl (user) not yet ported to powerpc
+all: $(if $(WANT_MODULE), kernel) libkvm qemu
+# extboot is x86 only
+qemu: libkvm

diff -r 958dc9839a95 config-x86_64.mak

config-x86_64.mak new file +2 -1
@@ -0,0 +1,2 @@
+all: $(if $(WANT_MODULE), kernel) user libkvm qemu
+qemu: libkvm extboot
 
-------------------------------------------------------------------------
Quoted 8 lines

Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace