gnu make是否有配置文件? [英] Is there a configuration file for gnu make?
问题描述
我想告诉make即使我没有通过命令行指定它,它也将始终使用-j4
选项.通常我会在某些配置文件(即~/.makerc
)中执行此操作.
I want to tell make that it shall always use -j4
option even if I didn't specify it vie command line. Normally i would do this in some configuration file (i.e. ~/.makerc
).
gnu make是否存在这样的文件?
Does such file exist for gnu make?
推荐答案
已阅读有关 $(MAKEFLAGS)变量:
export MAKEFLAGS=j4
但是,这可能会干扰GNU make与子make进行通信的能力,因此可能会干扰基于递归make的构建(不是明智的人仍在使用递归make!).
However this will likely interfere with recursive-make-based builds (not that sensible people are using recursive make anyway!), by interfering with GNU make's ability to communicate with its sub-makes.
因此,更明智的方法可能是包装脚本或别名或shell函数.
So the more sensible approach is probably a wrapper script or an alias or shell function.
这篇关于gnu make是否有配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!