擅长:python、mysql、java
<p>我同意@Philipp使用<code>cwd</code>的解决方案,但作为补充说明,您也可以使用<code>-C</code>选项来:</p>
<pre><code>make -C ../dir1/dir2/dir3/make
</code></pre>
<h3>-C<em>目录</em>,--目录=<em>目录</em></h3>
<blockquote>
<p>Change to directory <em>dir</em> before reading the makefiles or doing anything else. If multiple -C options are specified, each is interpreted relative to the previous one: <code>-C / -C etc</code> is equivalent to <code>-C /etc</code>. This is typically used with recursive invocations of make.</p>
</blockquote>