Specify makefile command target
<p>Here's my <code>Makefile</code></p>

<pre><code>gitignore-create:
    touch .gitignore ;\
    echo 'node_modules' &gt;&gt; .gitignore ;\
    echo 'npm' &gt;&gt; .gitignore ;\
    echo '.DS_Store' &gt;&gt; .gitignore ;\
</code></pre>

<p>If I run <code>make gitignore-create</code> I get the gitignore file the current directory.</p>

<p>I'm looking for a way to run this makefile command from the same directory but have the target be specified to another. I'd like to not add a <code>cd</code> into the command itself though.</p>

<p>I tried something like this:</p>

<pre><code># make wrap package=my-package command=gitignore-create
wrap:
    pushd packages/$(package)/ &amp;&amp; make -C ${CURDIR} $(command) &amp;&amp; popd
</code></pre>

<p>And it only creates the file in the actual current dir.</p>