aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-31 09:38:34 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-31 09:38:34 +0000
commit4c4ca29ff93143cac29b32cb49c58570244a03b7 (patch)
tree37962fa40e67c7cf759bdd788a53fd32a3efde94 /config
parent2179dc47cf8d85b478a71da091ee44cdab12017b (diff)
downloadxen-4c4ca29ff93143cac29b32cb49c58570244a03b7.tar.gz
xen-4c4ca29ff93143cac29b32cb49c58570244a03b7.tar.bz2
xen-4c4ca29ff93143cac29b32cb49c58570244a03b7.zip
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@eu.citrix.com>
Diffstat (limited to 'config')
-rw-r--r--config/StdGNU.mk6
-rw-r--r--config/SunOS.mk6
-rw-r--r--config/x86_64.mk1
3 files changed, 9 insertions, 4 deletions
diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index ed383cf25d..a26ce17c84 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -20,8 +20,10 @@ INSTALL_PROG = $(INSTALL) -m0755 -p
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 --git a/config/SunOS.mk b/config/SunOS.mk
index 16163b6820..d5eba747bf 100644
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -21,8 +21,10 @@ INSTALL_PROG = $(INSTALL) -m0755 -p
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 --git a/config/x86_64.mk b/config/x86_64.mk
index 64291837a4..6f77053df3 100644
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -10,6 +10,7 @@ CONFIG_IOEMU := y
CFLAGS += -m64
+LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
LIBDIR = $(LIBDIR_x86_64)
SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)