如何在 mac 终端中检查 GNU make 的版本?

How to check version of GNU make in mac terminal?

标题说明了一切。我四处搜索,但只找到了使用 rpm 的方法,我的 mac.

上没有安装它

要显示版本,请在终端中键入以下内容:

make -v

在我的机器上给出了以下输出:

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.

This program built for i386-apple-darwin11.3.0

最简单的方法是 运行 make --version。例如,在我的机器上它输出:

mureinik@computer ~$ make --version 
GNU Make 4.0
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.