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-changelog

[Xen-changelog] [xen-unstable] build: Make PREFIX work by fixing LIBDIR

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] build: Make PREFIX work by fixing LIBDIR
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 01 Feb 2008 08:00:12 -0800
Delivery-date: Fri, 01 Feb 2008 08:00:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201772314 0
# Node ID 0faf620bc74983cce8022fc3bc988a4c2d242162
# Parent  0d70e01c0012a0830334e99ad6e5c4ddac36329a
build: Make PREFIX work by fixing LIBDIR

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.

This 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.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Config.mk        |    2 +-
 config/StdGNU.mk |    6 ++++--
 config/SunOS.mk  |    6 ++++--
 config/x86_64.mk |    1 +
 tools/Rules.mk   |    2 +-
 5 files changed, 11 insertions(+), 6 deletions(-)

diff -r 0d70e01c0012 -r 0faf620bc749 Config.mk
--- a/Config.mk Thu Jan 31 09:33:26 2008 +0000
+++ b/Config.mk Thu Jan 31 09:38:34 2008 +0000
@@ -30,7 +30,7 @@ include $(XEN_ROOT)/config/$(XEN_TARGET_
 
 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.
diff -r 0d70e01c0012 -r 0faf620bc749 config/StdGNU.mk
--- a/config/StdGNU.mk  Thu Jan 31 09:33:26 2008 +0000
+++ b/config/StdGNU.mk  Thu Jan 31 09:38:34 2008 +0000
@@ -20,8 +20,10 @@ PREFIX ?= /usr
 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
diff -r 0d70e01c0012 -r 0faf620bc749 config/SunOS.mk
--- a/config/SunOS.mk   Thu Jan 31 09:33:26 2008 +0000
+++ b/config/SunOS.mk   Thu Jan 31 09:38:34 2008 +0000
@@ -21,8 +21,10 @@ PREFIX ?= /usr
 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
diff -r 0d70e01c0012 -r 0faf620bc749 config/x86_64.mk
--- a/config/x86_64.mk  Thu Jan 31 09:33:26 2008 +0000
+++ b/config/x86_64.mk  Thu Jan 31 09:38:34 2008 +0000
@@ -10,6 +10,7 @@ CONFIG_IOEMU := y
 
 CFLAGS += -m64
 
+LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
 LIBDIR = $(LIBDIR_x86_64)
 
 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
diff -r 0d70e01c0012 -r 0faf620bc749 tools/Rules.mk
--- a/tools/Rules.mk    Thu Jan 31 09:33:26 2008 +0000
+++ b/tools/Rules.mk    Thu Jan 31 09:38:34 2008 +0000
@@ -22,7 +22,7 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE) $
 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] build: Make PREFIX work by fixing LIBDIR, Xen patchbot-unstable <=