Skip to content

cwbaker/forge

Repository files navigation

Forge

Build

Forge is a Lua scriptable build tool that tracks dependencies between files, uses relative timestamps to determine which are out of date, and carries out actions to bring those files up to date.

Example

Copy {bar,baz,foo}.in to output/{bar,baz,foo}.out:

local toolset = require 'forge' {
    output = root( 'output' );
};

toolset:all {
    toolset:Copy '${output}/%1.out' {
        'bar.in';
        'baz.in';
        'foo.in';
    };    
};

The Lua script that defines the Copy rule:

local Copy = PatternRule( 'Copy' );

function Copy.build( toolset, target )
    rm( target );
    cp( target, target:dependency() );
end

return Copy;

Execute the build by running forge from a directory within the project:

$ forge

Documentation

The User Manual has more documentation including:

Contributions

All contributions and feedback welcomed. Please use the Github issue tracker and/or open a pull request. Thanks!

License

Forge is licensed under the MIT License