小编pro*_*ris的帖子

在 Makefile 中我们使用“前缀”还是“PREFIX”?

目前在我的Makefile我有:

prefix ?= /usr/local
Run Code Online (Sandbox Code Playgroud)

这样我就可以prefix在调用时覆盖值make,如下所示:

make prefix="/new_path"
Run Code Online (Sandbox Code Playgroud)

我的问题是:在 Makefile 中是否存在命名此变量的约定,特别是我是否必须调用它prefixPREFIX

这很重要,因为在这种情况下小写或大写都很重要!

请注意,我没有使用autotools,只是一个“简单”Makefile

linux makefile prefix

6
推荐指数
1
解决办法
2184
查看次数

标签 统计

linux ×1

makefile ×1

prefix ×1