ia64/xen-unstable

changeset 19477:b3daeb123b6f

build: Get rid of some more hardcoded install paths
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 13:30:50 2009 +0100 (2009-03-31)
parents 0faf7b884711
children 011f4fbf46b2
files Config.mk config/StdGNU.mk tools/pygrub/Makefile tools/python/Makefile
line diff
     1.1 --- a/Config.mk	Tue Mar 31 13:28:45 2009 +0100
     1.2 +++ b/Config.mk	Tue Mar 31 13:30:50 2009 +0100
     1.3 @@ -19,8 +19,6 @@ HOSTCFLAGS += -fno-strict-aliasing
     1.4  
     1.5  DISTDIR     ?= $(XEN_ROOT)/dist
     1.6  DESTDIR     ?= /
     1.7 -DOCDIR      ?= /usr/share/doc/xen
     1.8 -MANDIR      ?= /usr/share/man
     1.9  
    1.10  # Allow phony attribute to be listed as dependency rather than fake target
    1.11  .PHONY: .phony
    1.12 @@ -28,6 +26,10 @@ MANDIR      ?= /usr/share/man
    1.13  include $(XEN_ROOT)/config/$(XEN_OS).mk
    1.14  include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
    1.15  
    1.16 +SHAREDIR    ?= $(PREFIX)/share
    1.17 +DOCDIR      ?= $(SHAREDIR)/doc/xen
    1.18 +MANDIR      ?= $(SHAREDIR)/man
    1.19 +
    1.20  ifneq ($(EXTRA_PREFIX),)
    1.21  EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
    1.22  EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
     2.1 --- a/config/StdGNU.mk	Tue Mar 31 13:28:45 2009 +0100
     2.2 +++ b/config/StdGNU.mk	Tue Mar 31 13:30:50 2009 +0100
     2.3 @@ -31,7 +31,8 @@ LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
     2.4  LIBDIR_x86_32 = $(PREFIX)/$(LIBLEAFDIR_x86_32)
     2.5  LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
     2.6  LIBEXEC = $(LIBDIR_x86_32)/xen/bin
     2.7 -MANDIR = $(PREFIX)/share/man
     2.8 +SHAREDIR = $(PREFIX)/share
     2.9 +MANDIR = $(SHAREDIR)/man
    2.10  MAN1DIR = $(MANDIR)/man1
    2.11  MAN8DIR = $(MANDIR)/man8
    2.12  SBINDIR = $(PREFIX)/sbin
     3.1 --- a/tools/pygrub/Makefile	Tue Mar 31 13:28:45 2009 +0100
     3.2 +++ b/tools/pygrub/Makefile	Tue Mar 31 13:30:50 2009 +0100
     3.3 @@ -12,7 +12,7 @@ build:
     3.4  ifndef XEN_PYTHON_NATIVE_INSTALL
     3.5  install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
     3.6  install: all
     3.7 -	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
     3.8 +	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)$(PREFIX)" --prefix="" --install-lib="$(DESTDIR)$(LIBDIR)/python"
     3.9  	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
    3.10  else
    3.11  install: all
     4.1 --- a/tools/python/Makefile	Tue Mar 31 13:28:45 2009 +0100
     4.2 +++ b/tools/python/Makefile	Tue Mar 31 13:30:50 2009 +0100
     4.3 @@ -12,7 +12,7 @@ PODIR := xen/xm/messages
     4.4  POTFILE := $(PODIR)/xen-xm.pot
     4.5  I18NSRCFILES = $(shell find xen/xm/ -name '*.py')
     4.6  CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
     4.7 -NLSDIR = /usr/share/locale
     4.8 +NLSDIR = $(SHAREDIR)/locale
     4.9  
    4.10  .PHONY: build buildpy
    4.11  buildpy: 
    4.12 @@ -57,19 +57,19 @@ refresh-po: $(POTFILE)
    4.13  ifndef XEN_PYTHON_NATIVE_INSTALL
    4.14  install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
    4.15  install: install-messages install-dtd
    4.16 -	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
    4.17 +	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)$(PREFIX)" --prefix="" --force --install-lib="$(DESTDIR)$(LIBDIR)/python"
    4.18  else
    4.19  install: install-messages install-dtd
    4.20  	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
    4.21  endif
    4.22  
    4.23  install-dtd: all
    4.24 -	$(INSTALL_DIR) $(DESTDIR)/usr/share/xen
    4.25 -	$(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen
    4.26 +	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
    4.27 +	$(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(DOCDIR)
    4.28  
    4.29  install-messages: all
    4.30  	set -e; if which $(MSGFMT) >/dev/null ; then \
    4.31 -		mkdir -p $(DESTDIR)$(NLSDIR); \
    4.32 +		$(INSTALL_DIR) $(DESTDIR)$(NLSDIR); \
    4.33  		for l in $(LINGUAS); do \
    4.34  			$(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
    4.35  			$(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \