lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 03/08/2013 06:55 PM, William Ahern wrote:
I love regular make syntax. But for complicated target and dependency
generation, GNU make extensions do quickly become unwieldy. The
idiosyncratic functional style calls, list comprehensions, word splicing,
and recursive macro substitutions can quickly become confusing, to say the
least.

I've always envisioned hacking up GNU make to embed Lua, and then adding
qmake-style blocks which execute Lua code.

Please don't do this. Doing this would mean that you'd be missing the point, as make's job is to simply automatically determine which piece of a program needs to be rebuilt. This is why scrips are used to generate makefiles, and makefiles are handled by make. And make handles them exquisitely well. All that UNIX "write programs that do one thing and do it well" philosophy and all.


The trick is defining the input
and output semantics of the Lua block (i.e. how to make the consumption and
generation of lists of targets intuitive and seamless.)

Also, critically GNU make needs more support for handling path management.

Frankly, it doesn't. See the UNIX philosophy above. Let the build system handle that. That's what cmake/bash scripts/autoconf & automake/etc are used for. If you really want to, you can always hack together a Lua script to update your makefiles for you. But you'd be reinventing the wheel.