On Wed, Dec 8, 2010 at 5:29 AM, Warlich, Christof
<[email protected]> wrote:
> I tried to use environment variables in the example above, which doesn't seem 
> to work (why?), but there may be better ways ?!

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

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to