export environment variable from a makefile to the system
<p>For one of my project, I need to add something to an env var from a makefile.</p>

<p>Here's a the sandboxed problem :</p>

<p>First, the makefile </p>

<pre><code>all:
    $(shell source &lt;(echo export MYVAR=$(MYVAR):otherstuff))
</code></pre>

<p>And what I'm trying to achieve </p>

<pre><code>export MYVAR=stuff
make
echo $MYVAR
</code></pre>

<p>So technically, MYVAR should contains stuff:otherstuff. But instead of that I got a bash error </p>

<pre><code>/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `source &lt;(echo export MYVAR=$MYVAR:otherstuff)'
</code></pre>

<p>I don't know what I did wrong, the command worked outside of the makefile.</p>

<p>Thanks!</p>