[英]Using the Linux kernel make system for userspace tools
I've seen several projects for userspace tools (though I cannot, unfortunately, seem to remember which ones at this time) which appear to be reusing the Linux kernel make-system, as evidenced by the similarity in build messages: 我已经看过几个用户空间工具项目(尽管不幸的是,我现在无法记住那些项目),这些项目似乎正在重用Linux内核make-system,这在构建消息的相似性上得到了证明:
CC foo1.o
CC foo2.o
LINK foo
You know. 你懂。
Is there any "well-known" procedure for doing so? 是否有任何“知名”程序可以这样做? Is there some standard repository of makefiles and such that can be reused in a well-defined manner to do this?
是否有一些标准的Makefile存储库,并且可以以明确定义的方式重复使用该存储库? I've tried googling around about it, but I can't seem to find anything.
我已经尝试过四处搜寻,但是似乎找不到任何东西。
The Linux kernel build system is pretty mission specific. Linux内核构建系统是特定于任务的。 I'm not sure of any projects that leverage it.
我不确定是否有任何利用它的项目。
Many projects use autotools -- automake and autoconf -- to handle building. 许多项目使用自动工具-automake和autoconf-处理构建。 If you've ever run
./configure
to build a project, you've encountered them. 如果您曾经运行过
./configure
来构建项目,那么您会遇到它们。 It turns out that automake generated Makefiles have a mode for emitting the "Linux-style" build messages: make V=0
. 事实证明,自动makemake生成的Makefile具有一种用于发出“ Linux风格”构建消息的模式:
make V=0
。
This can be set to be the default behavior: https://www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html 可以将其设置为默认行为: https : //www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html
You can certainly use autotools for your own projects. 您当然可以为自己的项目使用自动工具。 A good starter guide is here:
一个很好的入门指南在这里:
http://smalltalk.gnu.org/blog/bonzinip/all-you-should-really-know-about-autoconf-and-automake http://smalltalk.gnu.org/blog/bonzinip/all-you-should-really-know-about-autoconf-and-automake
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.