Makefile 生成器:预制文件与烘焙文件?
对于我的 C++ 构建过程,我使用 Bakefile,这是一个不错的小型 Makefile 生成器,它可以让您指定XML 中的构建目标,它可以从中生成各种 Makefile 或项目文件。 它工作得很好,我用它来生成 GNU 自动工具脚本。
现在我听说了 Premake,它似乎也有类似的功能。 您在 Lua 中指定目标,它会相应地生成 Makefile。
有谁知道 Bakefile 和 Premake 之间的区别? 有人有两者的经验吗? Premake 似乎更新并且开发更活跃?
XML 解析器 ticpp 使用 Premake,但它需要您在构建 ticpp 之前下载 premake。 难道他们不能为各种系统预先生成 Makefile,这样你就不必先下载并安装 premake 了吗?
注意:我知道有很多关于什么是最好的构建工具的线索,通常答案是CMake、SCons 或 果酱。 但是,我对用户在构建我的项目之前不必下载的东西感兴趣。
For my C++ build process, I am using Bakefile, a nice little Makefile generator, which lets you specify your build targets in XML, and it can generate various Makefiles or project files from it. It works fine and I use it to generate the GNU autotools scripts.
Now I heard of Premake, which seems to have a similar functionality. You specify your targets in Lua, and it generates Makefiles accordingly.
Does anyone know the differences between Bakefile and Premake? Does anyone have experience with both? Premake seems more recent and with more active development?
The XML parser ticpp uses Premake, but it requires you to download premake before you build ticpp. Can't they just pre-generate Makefiles for various systems so you don't have to download and install premake first?
Note: I know there are various SO threads about what the best build tool is, and usually the answer is CMake, SCons or Jam. However, I am interested in something that my users won't have to download before they build my project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不完全是一个答案,但我全心全意地推荐 premake4,它太棒了。
Not exactly an answer, but I whole-heartedly recommend premake4, it's fantastic.
是的,Premake 确实允许您生成 Makefile(或 Visual Studio 解决方案,或...),然后您可以根据需要进行分发。 Premake 本身在其源代码包中包含预先生成的 makefile。
在目标机器上下载并运行 Premake 允许通过系统自动分析或通过命令行标志手动定制 makefile。 对于某些项目来说,这是值得的权衡,但这不是必需的。
Yes, Premake does allow you to generate a Makefile (or Visual Studio solution, or...) which you can then distribute, if you want. Premake itself includes pre-generated makefiles in its source packages.
Downloading and running Premake on the target machine allows the makefile to be customized, either by automated analysis of the system, or manually via command-line flags. For some projects that's a worthwhile trade-off, but it isn't required.
在使用 Premake 4 和新版本的 Bakefile 后,它们似乎针对不同的用例。
对于您的使用,我推荐 Bakefile。 听起来你不需要任何花哨的东西。
After using both Premake 4 and the new version of Bakefile, it seems that they target different use cases.
For your usage, I'd recommend Bakefile. Sounds like you don't need anything fancy.