views:

662

answers:

2

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.

+2  A: 

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.

starkos
+2  A: 

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

Matt Joiner