From 4c4ca29ff93143cac29b32cb49c58570244a03b7 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 31 Jan 2008 09:38:34 +0000 Subject: 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 --- tools/Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/Rules.mk') diff --git a/tools/Rules.mk b/tools/Rules.mk index 1b16c9230c..ceb616981e 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -22,7 +22,7 @@ LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest 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__ -- cgit v1.2.3