Couldn't you put the tab in the main body?  Also you don't really need eval 
for what you're trying to do:

target:
        cp somefile $(DIR_$(ARCH))

On Tuesday 03 February 2004 08:58 am, Andre Majorel wrote:
> I need something like associative arrays in my makefiles recipes.
> Supposing I have a bunch of vars like
>
>       DIR_i386=/somedir
>       DIR_sparc64=/someotherdir
>
> In shell, I'd do
>
>       target:
>               cp somefile `eval echo \\$DIR_$ARCH`
>
> But since $(eval) does not return anything, I can't seem to find a
> way to do the same in GNU make. In particular,
>
>       target:
>       $(eval<tab>cp somefile $$(DIR_$(ARCH)))
>
> gives me a "missing separator" error as the <tab> is swallowed by
> the parser.
>
> Any help would be appreciated.



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to