More work on getting DESTDIR to work

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24091 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2006-11-15 16:12:12 +00:00
parent 26de0fd832
commit ff74ce1db4
5 changed files with 54 additions and 16 deletions

View file

@ -1,3 +1,10 @@
2006-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* common.make (INSTALL_ROOT_DIR): If DESTDIR is set, then
set INSTALL_ROOT_DIR from it.
* spec-rules.template: Use DESTDIR instead of INSTALL_ROOT_DIR.
* spec-debug-rules.template: Same change.
2006-10-29 Richard Frith-Macdonald <rfm@gnu.org>
* common.make: Disable warnings about #import as it is now recommended

View file

@ -182,12 +182,20 @@
# If we have been called with something like
#
# make DESTDIR=/var/tmp/package-build filelist=yes install
#
# we are being called inside the rpm installation stage, and we need
# to produce the file list from the installed files.
#
# PS: The old way of doing that used to be --
#
# make INSTALL_ROOT_DIR=/var/tmp/package-build/ \
# GNUSTEP_INSTALLATION_DIR=/var/tmp/package-build/usr/GNUstep/Local \
# filelist=yes install
#
# we are being called inside the rpm installation stage, and we need
# to produce the file list from the installed files.
# We still support that as well, but using DESTDIR is recommended
# (since it's a widely accepted GNU standard); INSTALL_ROOT_DIR is
# deprecated.
GNUSTEP_FILE_LIST = $(GNUSTEP_OBJ_DIR)/file-list
@ -203,18 +211,21 @@ ifeq ($(filelist),yes)
# install - done by other GNUmakefiles - NB: must install everything inside
# GNUSTEP_INSTALLATION_DIR, or prefix all installation dirs with
# $INSTALL_ROOT_DIR such as
# $(INSTALL_DATA) page.html $(INSTALL_ROOT_DIR)/usr/local/MySoftware/
# $DESTDIR such as
# $(INSTALL_DATA) page.html $(DESTDIR)/usr/local/MySoftware/
# instead of $(INSTALL_DATA) page.html /usr/local/MySoftware/
#
# Please note that INSTALL_ROOT_DIR is similar to DESTDIR, but does not
# affect GNUSTEP_INSTALLATION_DIR, which is supposed to already include
# INSTALL_ROOT_DIR. Ie, make INSTALL_ROOT_DIR=/tmp won't affect
# GNUSTEP_INSTALLATION_DIR and so wouldn't install everything in /tmp.
# You'd rather need make INSTALL_ROOT_DIR=/tmp GNUSTEP_INSTALLATION_DIR=/tmp/usr/GNUstep/Local
# Please note that (the now deprecated) INSTALL_ROOT_DIR is similar to DESTDIR, but does not
# affect GNUSTEP_INSTALLATION_DIR, which is supposed to already
# include INSTALL_ROOT_DIR. Ie, make INSTALL_ROOT_DIR=/tmp won't
# affect GNUSTEP_INSTALLATION_DIR and so wouldn't install everything
# in /tmp, while make DESTDIR=/tmp would.
#
# FIXME - we now support DESTDIR, if DESTDIR is set,
# INSTALL_ROOT_DIR should automatically be set in some related way!
# We now support DESTDIR, so if DESTDIR is set,
# INSTALL_ROOT_DIR is automatically set to be the same as DESTDIR
# in common.make. To remove support for INSTALL_ROOT_DIR, just replace
# INSTALL_ROOT_DIR with DESTDIR everywhere in this file.
# Get the list of files inside INSTALL_ROOT_DIR
internal-after-install::

View file

@ -238,6 +238,26 @@ endif
# Make it public and available to all submakes invocations
export GNUSTEP_INSTALLATION_DIR
#
# INSTALL_ROOT_DIR is the obsolete way of relocating stuff. It used
# to only affect stuff that is not installed using
# GNUSTEP_INSTALLATION_DIR (DESTDIR instead also affects stuff
# installed using GNUSTEP_INSTALLATION_DIR). We prefer DESTDIR
# because it is a widely accepted GNU standard, and makes packaging
# easier.
#
# So all instances of INSTALL_ROOT_DIR in user's makefiles should be
# replaced with DESTDIR.
#
# Anyway, until all makefiles have been updated, we set INSTALL_ROOT_DIR for backwards
# compatibility.
#
ifneq ($(DESTDIR),)
ifeq ($(INSTALL_ROOT_DIR),)
INSTALL_ROOT_DIR = $(DESTDIR)
endif
endif
#
# Variables specifying the installation directory paths.
#

View file

@ -24,8 +24,8 @@ if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
. %{gs_root}/Library/Makefiles/GNUstep.sh
fi
make debug=yes \
INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \
DESTDIR=$RPM_BUILD_ROOT \
GNUSTEP_INSTALLATION_DIR=%{gs_install_dir} \
filelist=yes install
#

View file

@ -24,9 +24,9 @@ if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
. %{gs_root}/Library/Makefiles/GNUstep.sh
fi
make INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \
filelist=yes install
make DESTDIR=$RPM_BUILD_ROOT \
GNUSTEP_INSTALLATION_DIR=%{gs_install_dir} \
filelist=yes install
#
# Clean commands