public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enhance libkvm Makefile
@ 2006-11-03  1:03 Anthony Liguori
       [not found] ` <454A9578.1080100-NZpS4cJIG2HvQtjrzfazuQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2006-11-03  1:03 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

The attached patch allows for DESTDIR/PREFIX to be used with the libkvm 
Makefile as one may expect the should be used.  Also, it lets KERNELDIR 
be specified.

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>

[-- Attachment #2: libkvm-build.diff --]
[-- Type: text/x-patch, Size: 959 bytes --]

diff -r ca0347086805 Makefile
--- a/Makefile	Thu Nov 02 18:59:50 2006 -0600
+++ b/Makefile	Thu Nov 02 19:00:05 2006 -0600
@@ -1,12 +1,11 @@
 
-KERNELDIR = ../kernel
+KERNELDIR ?= ../kernel
+PREFIX ?= /usr/local
 
 CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g
 CXXFLAGS = $(autodepend-flags) 
 
 autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
-
-DESTDIR = /usr/local
 
 ifeq ($(shell uname -m), x86_64)
 LIBDIR = /lib64
@@ -25,10 +24,10 @@ flatfiles: test/simple.flat test/stringi
 	test/irq.flat test/sieve.flat test/bootstrap
 
 install:
-	install -D kvmctl.h $(DESTDIR)/include/kvmctl.h
+	install -D kvmctl.h $(DESTDIR)$(PREFIX)/include/kvmctl.h
 	install -D $(KERNELDIR)/include/linux/kvm.h \
-		$(DESTDIR)/include/linux/kvm.h
-	install -D libkvm.a $(DESTDIR)/$(LIBDIR)/libkvm.a
+		$(DESTDIR)$(PREFIX)/include/linux/kvm.h
+	install -D libkvm.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libkvm.a
 
 %.flat: %.o
 	gcc -nostdlib -o $@ -Wl,-T,flat.lds $^

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Enhance libkvm Makefile
       [not found] ` <454A9578.1080100-NZpS4cJIG2HvQtjrzfazuQ@public.gmane.org>
@ 2006-11-03  6:08   ` Avi Kivity
       [not found]     ` <454ADCE9.7000505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2006-11-03  6:08 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Anthony Liguori wrote:
> The attached patch allows for DESTDIR/PREFIX to be used with the 
> libkvm Makefile as one may expect the should be used.  Also, it lets 
> KERNELDIR be specified.
>

Thanks, this is useful.


> Regards,
>
> Anthony Liguori
>
> Signed-off-by: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
> ------------------------------------------------------------------------
>
> diff -r ca0347086805 Makefile
> --- a/Makefile	Thu Nov 02 18:59:50 2006 -0600
> +++ b/Makefile	Thu Nov 02 19:00:05 2006 -0600
> @@ -1,12 +1,11 @@
>  
> -KERNELDIR = ../kernel
> +KERNELDIR ?= ../kernel
> +PREFIX ?= /usr/local
>   

I dislike '?=' since it makes a simple 'make' depend on environment 
variables, so a build can have different results depending on which 
xterm you happen to be in.

A regular assignment can be overridden on the make command line, but 
that's somewhat tedious.  I think a simple ./configure (NOT the 
autotools thing) is best.



>  
>  CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g
>  CXXFLAGS = $(autodepend-flags) 
>  
>  autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
> -
> -DESTDIR = /usr/local
>  
>   

Ditto.  DESTDIR should be initialized.

>  ifeq ($(shell uname -m), x86_64)
>  LIBDIR = /lib64
> @@ -25,10 +24,10 @@ flatfiles: test/simple.flat test/stringi
>  	test/irq.flat test/sieve.flat test/bootstrap
>  
>  install:
> -	install -D kvmctl.h $(DESTDIR)/include/kvmctl.h
> +	install -D kvmctl.h $(DESTDIR)$(PREFIX)/include/kvmctl.h
>  	install -D $(KERNELDIR)/include/linux/kvm.h \
> -		$(DESTDIR)/include/linux/kvm.h
> -	install -D libkvm.a $(DESTDIR)/$(LIBDIR)/libkvm.a
> +		$(DESTDIR)$(PREFIX)/include/linux/kvm.h
> +	install -D libkvm.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libkvm.a
>  
>  %.flat: %.o
>  	gcc -nostdlib -o $@ -Wl,-T,flat.lds $^
>   


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Enhance libkvm Makefile
       [not found]     ` <454ADCE9.7000505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2006-11-03  6:41       ` Anthony Liguori
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2006-11-03  6:41 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Avi Kivity wrote:
> Anthony Liguori wrote:
>> diff -r ca0347086805 Makefile
>> --- a/Makefile	Thu Nov 02 18:59:50 2006 -0600
>> +++ b/Makefile	Thu Nov 02 19:00:05 2006 -0600
>> @@ -1,12 +1,11 @@
>>  
>> -KERNELDIR = ../kernel
>> +KERNELDIR ?= ../kernel
>> +PREFIX ?= /usr/local
>>   
> 
> I dislike '?=' since it makes a simple 'make' depend on environment 
> variables, so a build can have different results depending on which 
> xterm you happen to be in.
> 
> A regular assignment can be overridden on the make command line, but 
> that's somewhat tedious.  I think a simple ./configure (NOT the 
> autotools thing) is best.

It's a bit late here but I'll take a look at the build tomorrow. 
Personally, I like to avoid autoconf like the plague so I'm happy with a 
  simple configure script :-)

Regards,

Anthony Liguori

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-03  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03  1:03 [PATCH] Enhance libkvm Makefile Anthony Liguori
     [not found] ` <454A9578.1080100-NZpS4cJIG2HvQtjrzfazuQ@public.gmane.org>
2006-11-03  6:08   ` Avi Kivity
     [not found]     ` <454ADCE9.7000505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-03  6:41       ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox