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] Make PREFIX work by fixing LIBDIR

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Make PREFIX work by fixing LIBDIR
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 30 Jan 2008 16:49:56 +0000
Delivery-date: Wed, 30 Jan 2008 08:52:22 -0800
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
In the current tree, setting PREFIX does not work very well.  This is
because of confusion about the meaning of LIBDIR.  In some places it
is the pathname tail of directories containing libraries (lib, lib64
or lib/amd64).  But in other places it is a destination pathname
(implicitly, including any PREFIX).  This can result in PREFIX or /usr
being added the wrong number of times.

The attached patch splits LIBDIR into two variables, LIBLEAFDIR and
LIBDIR.  LIBDIR is the directory into which Xen libraries and other
similar code is to be placed, and includes any PREFIX.  LIBLEAFDIR is
just the library tail and can be appended to various different
prefixes; for example, to construct the X11 library directory for -L.

Neither variable contains the value of DESTDIR, which is of course
used only to redirect the results of `make install' when desired.

Ian.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Index: xen-unstable.hg/Config.mk
===================================================================
--- xen-unstable.hg.orig/Config.mk      2008-01-30 15:41:01.000000000 +0000
+++ xen-unstable.hg/Config.mk   2008-01-30 15:54:21.000000000 +0000
@@ -30,7 +30,7 @@
 
 ifneq ($(EXTRA_PREFIX),)
 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
-EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
+EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
 endif
 
 # cc-option: Check if compiler supports first option, else fall back to second.
Index: xen-unstable.hg/config/StdGNU.mk
===================================================================
--- xen-unstable.hg.orig/config/StdGNU.mk       2008-01-30 15:55:13.000000000 
+0000
+++ xen-unstable.hg/config/StdGNU.mk    2008-01-30 15:56:23.000000000 +0000
@@ -20,8 +20,10 @@
 PREFIX ?= /usr
 BINDIR = $(PREFIX)/bin
 INCLUDEDIR = $(PREFIX)/include
-LIBDIR = $(PREFIX)/lib
-LIBDIR_x86_64 = $(PREFIX)/lib64
+LIBLEAFDIR = lib
+LIBLEAFDIR_x86_64 = lib64
+LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
+LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
 MANDIR = $(PREFIX)/share/man
 MAN1DIR = $(MANDIR)/man1
 MAN8DIR = $(MANDIR)/man8
Index: xen-unstable.hg/config/SunOS.mk
===================================================================
--- xen-unstable.hg.orig/config/SunOS.mk        2008-01-30 15:58:23.000000000 
+0000
+++ xen-unstable.hg/config/SunOS.mk     2008-01-30 15:58:30.000000000 +0000
@@ -21,8 +21,10 @@
 PREFIX ?= /usr
 BINDIR = $(PREFIX)/bin
 INCLUDEDIR = $(PREFIX)/include
-LIBDIR = $(PREFIX)/lib
-LIBDIR_x86_64 = $(PREFIX)/lib/amd64
+LIBLEAFDIR = lib
+LIBLEAFDIR_x86_64 = lib/amd64
+LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
+LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
 MANDIR = $(PREFIX)/share/man
 MAN1DIR = $(MANDIR)/man1
 MAN8DIR = $(MANDIR)/man8
Index: xen-unstable.hg/config/x86_64.mk
===================================================================
--- xen-unstable.hg.orig/config/x86_64.mk       2008-01-30 15:58:37.000000000 
+0000
+++ xen-unstable.hg/config/x86_64.mk    2008-01-30 15:59:13.000000000 +0000
@@ -10,6 +10,7 @@
 
 CFLAGS += -m64
 
+LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
 LIBDIR = $(LIBDIR_x86_64)
 
 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
Index: xen-unstable.hg/tools/Rules.mk
===================================================================
--- xen-unstable.hg.orig/tools/Rules.mk 2008-01-30 15:41:26.000000000 +0000
+++ xen-unstable.hg/tools/Rules.mk      2008-01-30 15:59:50.000000000 +0000
@@ -22,7 +22,7 @@
 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
 LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
 
-X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
+X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
 
 CFLAGS += -D__XEN_TOOLS__
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Make PREFIX work by fixing LIBDIR, Ian Jackson <=