From 824fe6c164dc0e635fefb9cce00de8fd30931968 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sun, 20 May 2001 18:09:56 +0000 Subject: [PATCH] * ltmain.in (exec_cmd): New variable. Don't exec programs within the big `case'; set the variable instead, and exec the cmd afterwards, so that the shell gets a chance to clean up here-doc files. * NEWS: Update. --- ChangeLog | 8 ++++++++ NEWS | 7 +++++++ ltmain.in | 32 ++++++++++++++++++++------------ 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25869b73e..1741a1f65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-05-20 Alexandre Oliva + + * ltmain.in (exec_cmd): New variable. Don't exec programs within + the big `case'; set the variable instead, and exec the cmd + afterwards, so that the shell gets a chance to clean up here-doc + files. + * NEWS: Update. + 2001-05-16 Alan Modra * libtool.m4 (lt_cv_deplibs_check_method): pass_all for hppa*-linux. diff --git a/NEWS b/NEWS index 8df67c7e7..a50c9a22e 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,13 @@ New in 1.4b: 2001-??-??; CVS version 1.4a, Libtool team: * Full support for C++ compiler. * Support for GNU gcj compiler. +New in 1.4.1: 2001-??-??; CVS version 1.4.0a, Libtool team: +* Don't leave here-doc files behind. + +New in 1.4: 2001-04-25; CVS version 1.3e, Libtool team: +* Support for aix5*. +* Bugfixes. + New in 1.3d: 2001-04-02; CVS version 1.3c, Libtool team: * ltconfig is no more. Generation of libtool happens directly from the configure file. diff --git a/ltmain.in b/ltmain.in index 7c26afe9a..1afec11ba 100644 --- a/ltmain.in +++ b/ltmain.in @@ -246,6 +246,11 @@ if test -n "$prevopt"; then exit 1 fi +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + if test -z "$show_help"; then # Infer the operation mode. @@ -4841,11 +4846,10 @@ relink_command=\"$relink_command\"" if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 + exec_cmd='$SHELL $0 --finish$current_libdirs' + else + exit 0 fi - - exit 0 ;; # libtool finish mode @@ -5048,11 +5052,8 @@ relink_command=\"$relink_command\"" LANG="$save_LANG"; export LANG fi - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 + # Now prepare to actually exec the command. + exec_cmd='"$cmd"$args' else # Display what would be done. if test -n "$shlibpath_var"; then @@ -5231,11 +5232,18 @@ relink_command=\"$relink_command\"" ;; esac - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi fi # test -z "$show_help" +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit 1 +fi + # We need to display help for each of the modes. case $mode in "") $echo \ -- 2.47.3