thenumbernine / lua-make

yet *another* build script system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yes, another Build System.

Donate via Stripe
Donate via Bitcoin

First I made a decent Makefile system. I got it working on OSX, Linux, MinGW ... all but MSVC. Then I found myself wanting to build stuff with MSVC ... without making those stupid .vcproj files, or another NMAKE script, or rewriting everything. Because, if you have to rewrite everything, why use a one-platform tool to do it, like MSVC's stuff? So I found myself in need of a rewrite. Hence this simple build system.

It reads files labeled buildinfo. Each buildinfo specifies the distribution name, type, and any dependencies. They optionally can have a depends table that specifies the locations of all other dependent lmake-based projects. More configuration information for the buildinfo can be found in the run.lua file.

Command-Line Usage

If you want shell integration, make this file:

lmake:

#!/usr/bin/env sh
lua ~/path/to/make/run.lua "$@"

or for the windows users: lmake.bat:

@echo off
lua "C:\path\to\make\run.lua" %*

...with maybe an optional -lluarocks.require after lua depending on how your lua setup is.

and run it with the following arguments:

  • lmake clean = cleans objects
  • lmake distclean = cleans executable
  • lmake = builds default configuration
  • lmake all = builds debug and release
  • lmake debug = builds debug
  • lmake release = builds release
  • lmake distonly = builds dist from objs only

Lua Usage:

if you're lazy:

lua -lmake

and to clean ...

lua -lmake.clean

if you want to do more than one thing at once...

lua /path/to/lua/make/run.lua clean distclean all

if you want a custom platform:

lua platform $PLATFORM make.lua

where $PLATFORM can be:

  • osx
  • linux
  • clang_win
  • mingw
  • msvc

As a Lua library:

I'm using this in a few other places:

About

yet *another* build script system


Languages

Language:Lua 100.0%