David Boyce wrote:
> You're barking up the wrong tree. Each line of the recipe is passed by
> make to a separate instance of the shell. Each of these processes is
> the child of make, thus making them siblings. Environment variables
> won't work for the same reason you can't inherit a trait from your
> sister.
> 
> If you're using make 3.82 the simplest fix is to add the line
> 
> .ONESHELL:
> 
> to the Makefile. This will cause all lines of each recipe to be
> grafted together and passed to a single shell instance which makes
> communication much easier. If using an older version you need to do
> the grafting manually, e.g.:
> 
> target:
>         line 1 &&\
>         line 2 &&\
>         line3
> 
> And forget eval and escaped $$. Those are completely unrelated.
> 
> -David Boyce

It looks like e-mails that only carbon-copy [email protected] are rejected by 
the list. So again, thanks to everyone.

My misconception was that I thought that exporting the variable would make it 
visible in the subsequent reciepe line, missing the fact that the subsequent 
reciepe is not a sub-shell of the first reciepe.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to