[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
support for DESTDIR
From: |
Bruno Haible |
Subject: |
support for DESTDIR |
Date: |
Sat, 29 Mar 2003 13:17:54 +0100 (CET) |
Hi,
The GNU standards mention a semi-standard way to support installation of
packages in relocated directories: Use of $(DESTDIR)$(prefix) instead of
$(prefix) during installation. Here is a patch that adds support for this
to libtool.
I don't think it is possible to make DESTDIR work with shared library
installation on AIX, but since DESTDIR is mostly used by people on
Linux and FreeBSD, this is not a big problem in practice.
2002-02-02 Bruno Haible <address@hidden>
* ltmain.sh: Add DESTDIR support on ELF systems.
*** libtool-1.4.3/ltmain.sh 2002-10-23 04:26:24.000000000 +0200
--- ltmain.sh 2003-02-18 21:53:41.000000000 +0100
***************
*** 1903,1909 ****
add="-l$name"
else
# We cannot seem to hardcode it, guess we'll fake it.
! add_dir="-L$libdir"
add="-l$name"
fi
--- 1907,1917 ----
add="-l$name"
else
# We cannot seem to hardcode it, guess we'll fake it.
! if test "X$installed" = Xyes; then
! add_dir="-L$libdir"
! else
! add_dir="-L$DESTDIR$libdir"
! fi
add="-l$name"
fi
***************
*** 4211,4222 ****
--- 4220,4240 ----
esac
# Add the libdir to current_libdirs if it is the destination.
+ DESTDIR=
if test "X$destdir" = "X$libdir"; then
case "$current_libdirs " in
*" $libdir "*) ;;
*) current_libdirs="$current_libdirs $libdir" ;;
esac
else
+ case "$destdir" in
+ *"$libdir")
+ DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
+ if test "X$destdir" != "X$DESTDIR$libdir"; then
+ DESTDIR=
+ fi
+ ;;
+ esac
# Note the libdir as a future libdir.
case "$future_libdirs " in
*" $libdir "*) ;;
***************
*** 4230,4235 ****
--- 4248,4254 ----
if test -n "$relink_command"; then
$echo "$modename: warning: relinking \`$file'" 1>&2
+ export DESTDIR
$show "$relink_command"
if $run eval "$relink_command"; then :
else
***************
*** 4237,4242 ****
--- 4256,4262 ----
continue
fi
fi
+ unset DESTDIR
# See the names of the shared library.
set dummy $library_names
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- support for DESTDIR,
Bruno Haible <=