Changes between Version 4 and Version 5 of premake


Ignore:
Timestamp:
Aug 19, 2012, 8:43:07 PM (12 years ago)
Author:
historic_bruno
Comment:

Notes about autogenerated Premake makefiles

Legend:

Unmodified
Added
Removed
Modified
  • premake

    v4 v5  
    7272== Modifying Premake ==
    7373
    74 To modify Premake's behavior, you typically modify the Lua scripts within `build/premake/premake4`. You shouldn't modify the Makefile(s) or C source code directly, as these are automatically generated from the scripts by Premake. Obviously you need a working, already built Premake binary to do this. This is slightly confusing in that Premake creates the workspace you need to build a new version of Premake.
     74To modify Premake's behavior, you typically modify the Lua scripts within [source:/ps/trunk/build/premake/premake4 build/premake/premake4]. You shouldn't modify the Makefile(s) or C source code directly, as these are automatically generated from the scripts by Premake. Obviously you need a working, already built Premake binary to do this. This is slightly confusing in that Premake creates the workspace you need to build a new version of Premake.
    7575
    7676After you've modified Premake's source scripts, you need to run the old Premake binary with the `embed` option to update e.g. `src/host/scripts.c`, see [http://industriousone.com/building-premake Building Premake] for more information.
     77
     78== Autogenerating Premake workspaces ==
     79
     80Premake's own workspaces and Makefiles are mostly autogenerated using a Premake binary and the contents of [source:/ps/trunk/build/premake/premake4/premake4.lua build/premake/premake4/premake4.lua] (not to be confused with the game's own `premake4.lua` one directory higher). Building Premake and running it with the `--help` option will list available options, the basic invocation is as follows (on *nix):
     81{{{
     82./bin/release/premake4 --os=linux --to=build/gmake.unix/ gmake
     83}}}
     84This will generate a Linux-compatible Makefile in the [source:/ps/trunk/build/premake/premake4/build/gmake.unix build/gmake.unix] subdirectory. Using a similar process it should be possible to generate any supported OS- or toolset-specific workspace for Premake. '''Note: some of the results may need hand-editing to work around Premake bugs, so use with caution. When possible it should be preferred to fix the bugs instead.'''