Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Makefile generators: premake vs bakefile?

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.

like image 219
Frank Avatar asked Feb 11 '09 15:02

Frank


2 Answers

Not exactly an answer, but I whole-heartedly recommend premake4, it's fantastic.

like image 124
Matt Joiner Avatar answered Nov 18 '22 15:11

Matt Joiner


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.

like image 9
J. Perkins Avatar answered Nov 18 '22 16:11

J. Perkins