From: Alexandre Oliva Date: Sun, 20 May 2001 18:10:01 +0000 (+0000) Subject: * ltmain.in (exec_cmd): New variable. Don't exec programs within X-Git-Tag: release-1-4-1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3abdc3f02c2808afdcd40748ccae0fde09100dc;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index ae9732201..a8f5221d0 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 e0b7ebf37..a7c575c48 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool +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. diff --git a/ltmain.in b/ltmain.in index 4a9e5347f..e386f659a 100644 --- a/ltmain.in +++ b/ltmain.in @@ -202,6 +202,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. @@ -4369,11 +4374,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 @@ -4576,11 +4580,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 @@ -4745,11 +4746,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 \