linux 中 make 和 gmake的关系

 

001、

'gmake'特指GNU make。 'make'是指系统默认的make实现;在大多数Linux发行版中,这是GNU make,但是在其他unix中,它可以指代make的某些其他实现,例如BSD make或各种商业unix的make实现。

GNU make接受的语言是传统make实用程序支持的语言的超集。

通过特别使用'gmake',您可以使用GNU make扩展,而不用担心它们被某些其他make实现所误解。

 

gmake是GNU Make的缩写。 Linux系统环境下的make就是GNU Make,之所以有gmake,是因为在别的平台上,make一般被占用,GNU make只好叫gmake了。 比如在安装二进制文件进行编译时要使用make命令,但如果在Solaris或其他非GNU系统中运行,必须使用GNU make,而不是使用系统自带的make版本,这时要用gmake代替make进行编译。

002、在centos7中测试

a、系统

[root@pc1 home]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

 

b、比较make和gmake

复制代码
[root@pc1 home]# make --version                       ## make版本
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  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.
[root@pc1 home]# make --version | md5sum              ##生成MD5
10f8de4abad85725f858eaf7aa46e707  -
[root@pc1 home]# gmake --version                     ## gmake版本
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  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.
[root@pc1 home]# gmake --version | md5sum            ## 生成MD5
10f8de4abad85725f858eaf7aa46e707  -
复制代码

 

 

结论:

01、在绝大多数情况下,gmake = make

02、gmake是make的超集, 在make不好用的情况下,可以尝试gmake解决。

 

posted @   小鲨鱼2018  阅读(716)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-10-10 关闭anaconda3 默认自动启动的命令
2022-10-10 github.com[0: 192.30.255.113]: errno=Connection refused
2022-10-10 centos7 中安装java8
2022-10-10 configure: error: HTSlib development files not found
2022-10-10 configure: error: htscodecs submodule files not present.
2022-10-10 utils.c:33:18: fatal error: zlib.h: No such file or directory
2021-10-10 ubuntu中root用户在图形界面登录
点击右上角即可分享
微信分享提示