Changes between Version 4 and Version 5 of premake
- Timestamp:
- Aug 19, 2012, 8:43:07 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
premake
v4 v5 72 72 == Modifying Premake == 73 73 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.74 To 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. 75 75 76 76 After 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 80 Premake'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 }}} 84 This 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.'''