小编tso*_*tso的帖子

makefile中的版本号比较

在makefile中,我想定义一个变量,指定当前的redhat-release是否大于5.3.(此变量将作为#define传递给gcc)

到目前为止,我想出了:

# Find out which version of Red-Hat we're running
RH_VER_NUM = $(shell /bin/grep -o [0-9].[0-9] /etc/redhat-release)
RH_GT_5_3 = $RH_VER_NUM > '5.3'
Run Code Online (Sandbox Code Playgroud)

定义RH_GT_5_3的正确方法是什么?

makefile gnu-make

14
推荐指数
3
解决办法
2万
查看次数

标签 统计

gnu-make ×1

makefile ×1