On 06/27/2011 11:12 PM, Ralf Wildenhues wrote: > Hi Michael, > > * Michael Haubenwallner wrote on Mon, Jun 27, 2011 at 04:28:38PM CEST: >> Concatening commands breaks when export_symbols_cmds starts with something >> like "dump", which does not need another shell expansion step. Instead, it >> is merged with "\$concat_cmds" to "$concat_cmdsdump" for within the eval.
> How can that be? > >> + Correctly concat commands when export_symbols_cmds starts with 'word'. >> + * libltdl/config/ltmain.m4sh: When export_symbols_cmd starts with some >> + 'word', 'word' is joined with 'concat_cmds' to 'concat_cmdsword' due to >> + different expansion time: Need to embrace concat_cmds variable for >> + export_symbols_cmds too as for reload_cmds and old_archive_cmds. > > When $concat_cmds is nonempty, it gets a '~' at the end. That can never > be part of a shell word, if I see correctly. Can you give an example? The content of $concat_cmds is irrelevant due to its later expansion time compared to $export_symbols_cmds (actually, $concat_cmds is empty): Sample 1 (with current value): export_symbols_cmds='$NM ...' Step 0: eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" # the original line Step 1: eval 'concat_cmds=$concat_cmds$NM ...' # concat_cmds not expanded yet Step 2: concat_cmds="$concat_cmds$NM ..." # concat_cmds is expanded now Step 3: concat_cmds="nm ..." Sample 2 (which breaks): export_symbols_cmds='dump ...' Step 0: eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" # the original line Step 1: eval 'concat_cmds=$concat_cmdsdump ...' # concat_cmds not expanded yet Step 2: concat_cmds="$concat_cmdsdump ..." # there is no $concat_cmdsdump Step 3: concat_cmds="" Sample 3 (with patch): export_symbols_cmds='dump ...' Step 0: eval concat_cmds=\"\${concat_cmds}$export_symbols_cmds\" # the fixed line Step 1: eval 'concat_cmds=${concat_cmds}dump ...' # concat_cmds not expanded yet Step 2: concat_cmds="${concat_cmds}dump ..." # concat_cmds is expanded now Step 3: concat_cmds="dump ..." >> @@ -7636,7 +7636,7 @@ EOF >> - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" >> + eval concat_cmds=\"\${concat_cmds}$export_symbols_cmds\" Thank you! /haubi/