擅长:python、mysql、java
<p>使用Make做这件事没有意义。Make不是为它而设计的。您应该自己发出命令<code>chmod 755 myprogram</code>,然后执行bedone。如果您愿意,可以将此命令封装在脚本或别名中,但不能放在makefile中,然后您可以将<code>myprogram</code>输入到您最喜欢的保留权限的版本控制系统中,这样,如果您在其他地方重新创建它,则会设置权限。制造并不是做这件事的方法。在</p>
<p>但是,如果您必须这样做(例如,因为老板这样说),那么让<code>all</code>依赖<code>myprogram</code>是不正确的。<code>myprogram</code>已经存在,<code>all</code>与{<cd2>}的内容或其修改时间无关。它应该是:</p>
<pre><code>all:
chmod 755 myprogram
</code></pre>