我怎样才能让 clearmake 默认为 GNU 兼容模式?

How can I have clearmake default to GNU compatibility mode?

在我正在(不幸地)处理的 ClearCase 代码库中,我使用

clearmake -C gnu

建造。我能否以某种方式使 GNU 成为默认兼容模式,这样我就不必记住输入额外的参数?

clearmake man page包括:

Alternatively, you can use environment variable CCASE_MAKE_COMPAT in a BOS file or in the environment to specify a compatibility mode.

所以:

export CCASE_MAKE_COMPAT=gnu

如果构建系统需要 GNU make 兼容性选项,我发现最可靠的方法是创建一个 Makefile.options 文件(在与 Makefile 相同的目录中),内容如下:

CCASE_MAKE_COMPAT=gnu

这是一个build options specification文件,在读取Makefile时会自动读取。这应该添加到源代码管理中,以便使用 clearmake.

传播给每个用户