From: Gary V. Vaughan Date: Sun, 24 Oct 2004 15:17:23 +0000 (+0000) Subject: * config/ltmain.m4sh (opt_silent): Whether --silent was given. X-Git-Tag: release-2-1b~888 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e61a75643dd6d3ef3952e712eccb2a9a18530b;p=thirdparty%2Flibtool.git * config/ltmain.m4sh (opt_silent): Whether --silent was given. (run, show): Deleted. All callers converted to opt_dry_run, opt_silent or calls to func_show_eval. * tests/mdemo-dryrun.test: Adjust. --- diff --git a/ChangeLog b/ChangeLog index 3db1a113d..3014447c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-10-24 Gary V. Vaughan + * config/ltmain.m4sh (opt_silent): Whether --silent was given. + (run, show): Deleted. All callers converted to opt_dry_run, + opt_silent or calls to func_show_eval. + * tests/mdemo-dryrun.test: Adjust. + * HACKING: Fix a typo in the gpg --verify instructions. * Makefile.maint (cvs-dist): Generate signatures and directives diff --git a/config/ltmain.m4sh b/config/ltmain.m4sh index 5f41f0443..ebc7d57ad 100644 --- a/config/ltmain.m4sh +++ b/config/ltmain.m4sh @@ -111,14 +111,13 @@ magic="%%%MAGIC variable%%%" # Global variables. mode=$default_mode nonopt= -run= -show="$ECHO" execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -opt_dry_run=${run-false} ## inherit $run when mdemo-dryrun.test sets it above +opt_dry_run=false opt_duplicate_deps=false +opt_silent=false # 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 @@ -446,10 +445,7 @@ Otherwise, only FILE itself is deleted using RM." shift ;; - --dry-run | -n) opt_dry_run=: - run=: - ;; - + --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; @@ -480,7 +476,7 @@ Otherwise, only FILE itself is deleted using RM." opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" - show=: + opt_silent=: ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break @@ -699,13 +695,12 @@ func_generate_dlsyms () { # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" - $show "$RM $nlist ${nlist}S ${nlist}T" - $run $RM "$nlist" "${nlist}S" "${nlist}T" + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_echo "creating $output_objdir/$my_dlsyms" - test -z "$run" && $ECHO > "$output_objdir/$my_dlsyms" "\ + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ @@ -719,57 +714,67 @@ extern \"C\" { if test "$dlself" = yes; then func_echo "generating symbol list for \`$output'" - test -z "$run" && $ECHO ': @PROGRAM@ ' > "$nlist" + $opt_dry_run || $ECHO ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_echo "extracting global C symbols from \`$progfile'" - $run eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$MV "$nlist"T "$nlist"' + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } fi if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$MV "$nlist"T "$nlist"' + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" - $run $RM $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$output.def"' - ;; - esac + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$output.def"' + ;; + esac + } else - $run eval "${SED} -e 's/\([[]][[.*^$]]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - case $host in - *cygwin | *mingw* ) - $run eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"' - $run eval 'cat "$output_objdir/$output.exp" >> "$output_objdir/$output.def"' - ;; - esac - $run eval '$GREP -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' - $run eval '$MV "$nlist"T "$nlist"' + $opt_dry_run || { + eval "${SED} -e 's/\([[]][[.*^$]]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + case $host in + *cygwin | *mingw* ) + eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"' + eval 'cat "$output_objdir/$output.exp" >> "$output_objdir/$output.def"' + ;; + esac + eval '$GREP -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } fi fi for dlprefile in $dlprefiles; do func_echo "extracting global C symbols from \`$dlprefile'" name=`$ECHO "X$dlprefile" | $Xsed -e 's%^.*/%%'` - $run eval '$ECHO ": $name " >> "$nlist"' - $run eval "$NM $dlprefile | $global_symbol_pipe >> '$nlist'" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile | $global_symbol_pipe >> '$nlist'" + } done - if test -z "$run"; then + $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" @@ -843,7 +848,7 @@ static const void *lt_preloaded_setup() { } #endif\ " - fi + } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in @@ -869,12 +874,10 @@ static const void *lt_preloaded_setup() { esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$my_dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' || exit $? + func_show_eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - $show "$RM $output_objdir/$my_dlsyms $nlist ${nlist}S ${nlist}T" - $run $RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" @@ -933,7 +936,7 @@ func_extract_archives () { *-darwin*) func_echo "Extracting $my_xabs" # Do not bother doing anything if just a dry run - if test -z "$run"; then + $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs @@ -969,14 +972,14 @@ func_extract_archives () { cd $darwin_orig_dir (cd $my_xdir && $AR x $my_xabs) || exit $? fi # $darwin_arches - fi # $run + } # !$opt_dry_run ;; *) # We will extract separately just the conflicting names and we will # no longer touch any unique names. It is faster to leave these # extract automatically by $AR in one run. - $show "(cd $my_xdir && $AR x $my_xabs)" - $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? + func_show_eval '(cd $my_xdir && $AR x $my_xabs)' 'exit $?' + if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then : else @@ -994,8 +997,7 @@ func_extract_archives () { do name_to=`$ECHO "X$name_to" | $Xsed -e "s/\([[^.]]*\)/\1-$i/"` done - $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $MV '$name' '$name_to')" - $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $MV '$name' '$name_to')" || exit $? + func_show_eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $MV '$name' '$name_to')" 'exit $?' i=`expr $i + 1` done done @@ -1183,8 +1185,8 @@ func_mode_compile () removelist="$lobj $libobj ${libobj}T" fi - $run $RM $removelist - trap "$run $RM $removelist; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || $RM $removelist + trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in @@ -1203,7 +1205,7 @@ func_mode_compile () output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[[^.]]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" - trap "$run $RM $removelist; exit $EXIT_FAILURE" 1 2 15 + trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no @@ -1213,7 +1215,7 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done @@ -1230,7 +1232,7 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $RM $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi $ECHO $srcfile > "$lockfile" @@ -1240,11 +1242,11 @@ compiler." eval srcfile=\"$fix_srcfile_path\" fi - $run $RM "$libobj" "${libobj}T" + $opt_dry_run || $RM "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T < ${libobj}T </dev/null`" != "X$srcfile"; then @@ -1298,23 +1296,18 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $RM $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$MV $output_obj $lobj" - if $run $MV $output_obj $lobj; then : - else - error=$? - $run $RM $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then @@ -1370,24 +1359,19 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $RM $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$MV $output_obj $obj" - if $run $MV $output_obj $obj; then : - else - error=$? - $run $RM $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <> ${libobj}T <> ${libobj}T < conftest.c < \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$MV \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$MV "${export_symbols}T" "$export_symbols"' + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$ECHO "X$include_expsyms" | $SP2NL >> "$export_symbols"' + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= @@ -4957,7 +4924,7 @@ EOF # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then - $run eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. @@ -5058,7 +5025,7 @@ EOF if ${skipped_export-false}; then func_echo "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" - $run $RM $export_symbols + $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" @@ -5079,13 +5046,18 @@ EOF save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || { + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $RM ${realname}T && $MV ${realname}U $realname)' + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi exit $lt_exit @@ -5137,14 +5109,18 @@ EOF for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - func_quote_for_expand "$cmd" - eval \$show "$func_quote_for_expand_result" - $run eval "$cmd" || { + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $RM ${realname}T && $MV ${realname}U $realname)' + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi exit $lt_exit @@ -5154,12 +5130,11 @@ EOF # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then - $show "${RM}r $gentop" - $run ${RM}r "$gentop" + func_show_eval '${RM}r "$gentop"' fi fi @@ -5169,8 +5144,7 @@ EOF # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $RM $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $RM $linkname && $LN_S $realname $linkname)' || exit $? + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done @@ -5217,7 +5191,7 @@ EOF esac # Delete the old objects. - $run $RM $obj $libobj + $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create @@ -5250,16 +5224,14 @@ EOF for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? + func_show_eval "$cmd" 'exit $?' done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then - $show "${RM}r $gentop" - $run ${RM}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -5267,14 +5239,13 @@ EOF if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then - $show "${RM}r $gentop" - $run ${RM}r $gentop + func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "$ECHO timestamp > $libobj" - # $run eval "$ECHO timestamp > $libobj" || exit $? + # $opt_dry_run || eval "$ECHO timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi @@ -5287,15 +5258,13 @@ EOF for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? + func_show_eval "$cmd" 'exit $?' done IFS="$save_ifs" fi if test -n "$gentop"; then - $show "${RM}r $gentop" - $run ${RM}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -5471,14 +5440,12 @@ EOF link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" + func_show_eval "$link_command" status=$? # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then - $show "$RM $output_objdir/${outputname}S.${objext}" - $run $RM "$output_objdir/${outputname}S.${objext}" + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $status @@ -5546,10 +5513,9 @@ EOF # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. - $run $RM $output + $opt_dry_run || $RM $output # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi @@ -5579,10 +5545,9 @@ EOF link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. - $run $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_echo "creating $output" @@ -5615,8 +5580,8 @@ EOF qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi - # Only actually do things if our run command is non-null. - if test -z "$run"; then + # Only actually do things if not in dry run mode. + $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in @@ -5972,7 +5937,7 @@ EOF # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $RM $output @@ -6150,7 +6115,7 @@ else fi\ " chmod +x $output - fi + } exit $EXIT_SUCCESS ;; esac @@ -6261,16 +6226,13 @@ fi\ for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? + func_show_eval "$cmd" 'exit $?' done IFS="$save_ifs" done - if test -n "$generated"; then - $show "${RM}r$generated" - $run ${RM}r$generated - fi + test -n "$generated" && \ + func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in @@ -6298,7 +6260,7 @@ fi\ fi # Only create the output if not a dry run. - if test -z "$run"; then + $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then @@ -6425,12 +6387,11 @@ libdir='$install_libdir'" relink_command=\"$relink_command\"" fi done - fi + } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $RM $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $RM $outputname && $LN_S ../$outputname $outputname)' || exit $? + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS @@ -6518,8 +6479,7 @@ func_mode_uninstall () for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" + func_show_eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi @@ -6534,8 +6494,7 @@ func_mode_uninstall () for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" + func_show_eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi @@ -6598,16 +6557,14 @@ func_mode_uninstall () fi ;; esac - $show "$RM $rmfiles" - $run $RM $rmfiles || exit_status=1 + func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 + func_show_eval "rmdir $dir >/dev/null 2>&1" fi done diff --git a/tests/mdemo-dryrun.test b/tests/mdemo-dryrun.test index 32112a077..d8e8b1668 100755 --- a/tests/mdemo-dryrun.test +++ b/tests/mdemo-dryrun.test @@ -39,7 +39,7 @@ after=$objdir/temp/temp/after # Create a new libtool script that will enter dry run if the environment # variable force_dry_run is set rm -f $objdir/libtool.new -sed 's/^run=$/run=${force_dry_run+:}/' < libtool > $objdir/libtool.new +sed 's/^opt_dry_run=.*$/opt_dry_run=${force_dry_run-false}/' < libtool > $objdir/libtool.new chmod +x $objdir/libtool.new mv libtool $objdir/libtool mv $objdir/libtool.new libtool @@ -51,7 +51,7 @@ func_make main.$objext func_msg "Making object files in mdemo (dry run)" ls -l . $objdir | grep -v total > $before -force_dry_run=yes $MAKE foo1.lo foo2.lo sub.lo || exit $? +force_dry_run=: $MAKE foo1.lo foo2.lo sub.lo || exit $? ls -l . $objdir | grep -v total > $after cmp $before $after > /dev/null || exit 1 # Now really make them @@ -59,7 +59,7 @@ func_make foo1.lo foo2.lo libsub.la func_msg "Making libraries in mdemo (dry run)" ls -l . $objdir | grep -v total > $before -force_dry_run=yes $MAKE foo1.la libfoo2.la || exit $? +force_dry_run=: $MAKE foo1.la libfoo2.la || exit $? ls -l . $objdir | grep -v total > $after cmp $before $after > /dev/null || exit 1 # Now really make them @@ -67,7 +67,7 @@ func_make foo1.la libfoo2.la func_msg "Making programs in ../mdemo (dry run)" ls -l . $objdir | grep -v total > $before -force_dry_run=yes $MAKE mdemo$EXEEXT mdemo_static$EXEEXT 1>&2 || exit $? +force_dry_run=: $MAKE mdemo$EXEEXT mdemo_static$EXEEXT 1>&2 || exit $? ls -l . $objdir | grep -v total > $after cmp $before $after > /dev/null || exit 1 # Now really make them @@ -79,7 +79,7 @@ func_mkdir_p "$prefix/bin" func_mkdir_p "$prefix/lib" ls -l . $objdir | grep -v total > $before ls -lR $prefix | grep -v total >> $before -force_dry_run=yes $MAKE install 1>&2 || exit 1 +force_dry_run=: $MAKE install 1>&2 || exit 1 ls -l . $objdir | grep -v total > $after ls -lR $prefix | grep -v total >> $after cmp $before $after > /dev/null || exit 1 @@ -91,7 +91,7 @@ func_msg "Running $MAKE uninstall in ../mdemo (dry run)" rm -f "$prefix/bin/mdemo$EXEEXT" "$prefix/bin/mdemo_static$EXEEXT" ls -l . $objdir | grep -v total > $before ls -lR $prefix | grep -v total >> $before -force_dry_run=yes $MAKE uninstall 1>&2 || exit $? +force_dry_run=: $MAKE uninstall 1>&2 || exit $? ls -l . $objdir | grep -v total > $after ls -lR $prefix | grep -v total >> $after cmp $before $after > /dev/null || exit 1