debuggers.hg
changeset 16988:0faf620bc749
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Jan 31 09:38:34 2008 +0000 (2008-01-31) |
parents | 0d70e01c0012 |
children | 475f4323b86a |
files | Config.mk config/StdGNU.mk config/SunOS.mk config/x86_64.mk tools/Rules.mk |
line diff
1.1 --- a/Config.mk Thu Jan 31 09:33:26 2008 +0000 1.2 +++ b/Config.mk Thu Jan 31 09:38:34 2008 +0000 1.3 @@ -30,7 +30,7 @@ include $(XEN_ROOT)/config/$(XEN_TARGET_ 1.4 1.5 ifneq ($(EXTRA_PREFIX),) 1.6 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include 1.7 -EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR) 1.8 +EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR) 1.9 endif 1.10 1.11 # cc-option: Check if compiler supports first option, else fall back to second.
2.1 --- a/config/StdGNU.mk Thu Jan 31 09:33:26 2008 +0000 2.2 +++ b/config/StdGNU.mk Thu Jan 31 09:38:34 2008 +0000 2.3 @@ -20,8 +20,10 @@ INSTALL_PROG = $(INSTALL) -m0755 -p 2.4 PREFIX ?= /usr 2.5 BINDIR = $(PREFIX)/bin 2.6 INCLUDEDIR = $(PREFIX)/include 2.7 -LIBDIR = $(PREFIX)/lib 2.8 -LIBDIR_x86_64 = $(PREFIX)/lib64 2.9 +LIBLEAFDIR = lib 2.10 +LIBLEAFDIR_x86_64 = lib64 2.11 +LIBDIR = $(PREFIX)/$(LIBLEAFDIR) 2.12 +LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64) 2.13 MANDIR = $(PREFIX)/share/man 2.14 MAN1DIR = $(MANDIR)/man1 2.15 MAN8DIR = $(MANDIR)/man8
3.1 --- a/config/SunOS.mk Thu Jan 31 09:33:26 2008 +0000 3.2 +++ b/config/SunOS.mk Thu Jan 31 09:38:34 2008 +0000 3.3 @@ -21,8 +21,10 @@ INSTALL_PROG = $(INSTALL) -m0755 -p 3.4 PREFIX ?= /usr 3.5 BINDIR = $(PREFIX)/bin 3.6 INCLUDEDIR = $(PREFIX)/include 3.7 -LIBDIR = $(PREFIX)/lib 3.8 -LIBDIR_x86_64 = $(PREFIX)/lib/amd64 3.9 +LIBLEAFDIR = lib 3.10 +LIBLEAFDIR_x86_64 = lib/amd64 3.11 +LIBDIR = $(PREFIX)/$(LIBLEAFDIR) 3.12 +LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64) 3.13 MANDIR = $(PREFIX)/share/man 3.14 MAN1DIR = $(MANDIR)/man1 3.15 MAN8DIR = $(MANDIR)/man8
4.1 --- a/config/x86_64.mk Thu Jan 31 09:33:26 2008 +0000 4.2 +++ b/config/x86_64.mk Thu Jan 31 09:38:34 2008 +0000 4.3 @@ -10,6 +10,7 @@ CONFIG_IOEMU := y 4.4 4.5 CFLAGS += -m64 4.6 4.7 +LIBLEAFDIR = $(LIBLEAFDIR_x86_64) 4.8 LIBDIR = $(LIBDIR_x86_64) 4.9 4.10 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
5.1 --- a/tools/Rules.mk Thu Jan 31 09:33:26 2008 +0000 5.2 +++ b/tools/Rules.mk Thu Jan 31 09:38:34 2008 +0000 5.3 @@ -22,7 +22,7 @@ LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lx 5.4 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include) 5.5 LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore 5.6 5.7 -X11_LDPATH = -L/usr/X11R6/$(LIBDIR) 5.8 +X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR) 5.9 5.10 CFLAGS += -D__XEN_TOOLS__ 5.11