On Thu, Dec 20, 2007 at 06:21:30PM +0000, Patrick Welche wrote: > On Sun, Dec 16, 2007 at 10:04:59AM +0100, Ralf Wildenhues wrote: > > Hello, > > > > * Patrick Welche wrote on Fri, Dec 14, 2007 at 08:58:51PM CET: > > > On Fri, Dec 14, 2007 at 12:27:48PM -0700, Eric Blake wrote: > > > > > > > > The general idiom for this is 'rm -f dummy $files', so that even if > > > > $files > > > > is empty, you are still passing an argument to rm, and the -f avoids > > > > failure on the dummy argument. > > > > > > Elegant! > > > > Only if you have a dummy file to remove. In libtool it's easier to just > > add > > test -z "$files" || $RM $files > > > > as appropriate. Which tests are failing for you, Patrick? I assume > > this is NetBSD? > > In fact it seems to come from line 6202/6203 in libltdl/config/ltmain.m4sh: > > 6194 if ${skipped_export-false}; then > 6195 func_echo "generating symbol list for \`$libname.la'" > 6196 export_symbols="$output_objdir/$libname.exp" > 6197 $opt_dry_run || $RM $export_symbols > 6198 libobjs=$output > 6199 # Append the command to create the export file. > 6200 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ > 6201 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" > 6202 if test -n "$output"; then > 6203 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" > 6204 fi > 6205 fi > > > Do we want to delete $output or $last_robj?
I think that question still stands, but my rm -f is actually from just above that spot: 6183 # Handle the remaining objects by creating one last 6184 # reloadable object file. All subsequent reloadable object 6185 # files will link in the last one created. 6186 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 6187 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj~\$RM $last_robj\" 6188 delfiles="$delfiles $output" In line 6187, $last_robj is empty for me. (Why not just add it to delfiles?) Cheers, Patrick _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool