The Premake discussion forums here at Industrious One are now READ ONLY.

For questions about using Premake and authoring project scripts, please ask on StackOverflow, adding the #premake tag to your question. More people (including the Premake developers) will be able to see and respond to your questions, and you will have the opportunity to reward the best answers.

For discussions about developing, customizing, or extending Premake and add-on modules, please use the new Premake Developers Google Groups forum.



Bootstrap trick

A simple way around the script.c problem, unless you already do something like this. I expect you do.

Exclude scripts.c in premake4.lua

Inside this existing #if
#if defined(NODEBUG)
#include "scripts.c"

Most compilers will accept missing externals which are not referenced.

Therefore use the normal make debug, scripts.c is not required.

An exe now exists which can embed and off we go, we are booted without a binary.

It would be neat if premake could include scripts.c in release build only. Is this possible?

It doesn't look like the 'files' function and 'excludes' function works at the configuration level. Otherwise you'd be able to just modify the premake4.lua to include scripts.c in the release config and exclude that file from debug config.

I wonder if it makes sense to add support for this.

Another use comes to mind.

exclude myresource.rc

and maybe
includ dummy.rc

Yup, per-config file/exclude lists is something my current refactoring is should enable. We first need to standardized the source code file handling, and then we can start building the support for each of the toolsets from there.