19.02.2013, 12:31, "Jussi Pakkanen" <
jpak...@gmail.com>:
> tiistai, 19. helmikuuta 2013 9.55.08 UTC+2 Konstantin Tokarev kirjoitti:
>> Have you tried to use Premake[1]? It already supports everything you mention, except for unit testing, pkg-config and config.h (it is not difficult to add them, though), and is easily extensible by user with Lua code. This branch [2] has Ninja support. Also, there is Qt integration in works [3]
>
> I have looked at it. It seems very nice but it has the same slightly problematic design choice as SCons: it exposes an entire programming language in its definition.
I think it's more like an advantage than an issue: if user needs to do something non-trivial (read: something that authour of build system didn't think about), he just does what he needs in the most staraightforward way using built-in general-purpose language and having access to all build system internals (e.g., get list of declared targets and their properties and do something with them). With "pure declarative" approach it can easily turn into mess, and you end up with shell scripts doing necessary work.
> This makes it extremely hard to ensure everything is working reliably. As an example, Meson enforces that the build definition objects the user creates are immutable. This allows it to do optimizations it otherwise could not. If they were Python or Lua objects, this would be impossible, because users could change them after the fact.
>
> The difference between the two approaches is actually very similar to the difference between Ninja and Make. Ninja's syntax is very simple to avoid complexity and gain speed. Meson's syntax is very simple to avoid complexity and gain robustness.
Difference is that Ninja is not an end-user tool, so it does not need to be convenient.
--
Regards,
Konstantin