我试图理解"gmake"和"make"之间的区别?
在我的Linux操作系统上它们是相同的:
% gmake --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
% make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
我猜这不是所有平台都一样吧?使用其中一个是否有很好的理由?
为什么会有这两个名称,是否存在历史上的重要意义?
gcc -o $@ $<
),因为$ <将计算为空字符串而在gmake中没有输入源。更糟糕的组合也存在,可能导致gcc覆盖文件。 - Sean$^
是什么意思?在 GNU Make 中有一个叫做$^
的变量(详见 https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html),根据我了解,它与传统的 Make 兼容。但是,在 BSD Make 中语义是否不同呢?请您解答一下。 - tripleee