From 8c035746ccd41ce9a7ca7f54ef4ff3e2497a7b67 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 18 Feb 2002 14:11:44 -0500 Subject: [svn-r4987] Purpose: Bug Fix Description: When doing an install of dynamic executables on some platforms, the "mktemp" command may fail which causes the contents of "tmpdir" to go away. If it's a failure, we still need the previous value of tmpdir. Solution: I replicated some code so that tmpdir's old value before the mktemp call is regen'ed if the mktemp call failed. Platforms tested: HP-UX SysV --- bin/ltmain.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/ltmain.sh b/bin/ltmain.sh index 00ca40b..f912832 100644 --- a/bin/ltmain.sh +++ b/bin/ltmain.sh @@ -3483,6 +3483,11 @@ libdir='$install_libdir'\ tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` if test $? = 0 ; then : else + ## HACK: Added the following two lines. The "mktemp" line + ## above overwrites "tmpdir" on a failure. So, we need to + ## regen the "tmpdir" value on a failure...Hence... + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" fi if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : -- cgit v0.12