Comments on: What is your favorite build tool? http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Peterix http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27846 Wed, 27 Feb 2013 13:39:01 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27846

Personally, I prefer CMake, mainly because I’m mostly working with C and C++. It has really good support for those and things that don’t fit can be hacked in with custom commands/targets. It abstracts away a lot of the low level specifics of whatever native build systems and compilers fairly well. Of course, there are some exceptions, but nothing you’d run into every day.

A top level CMake file could look like this for example:
https://github.com/peterix/MultiMC4/blob/master/src/CMakeLists.txt

And a bit of an oddball piece of java code could be compiled like this:
https://github.com/peterix/MultiMC4/blob/master/src/launcher/CMakeList s.txt
(note the other .cmake files in the same directory – those actually implement the java support)

Would I use it for something other than a C/C++ heavy project? Probably not :)

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27504 Sat, 23 Feb 2013 03:11:48 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27504

@ Alexei Matyushkin:

Yes, but you can achieve about the same level of complexity using a format that is more readable. JSON and YAML are both good candidates.

Or you can do what Grunt does and make your configuration a JS/CoffeeScript file wrapped around a big JSON object for the declarative stuff.

XML is not necessary – it makes the declarative bits hard to read, but is not truing complete and thus won’t let you script in it.

@ IceBrain:

LOL, love that graphic. :)

@ FX:

Yeah, Makefiles are just shell scripts with some additional magic. Same goes for Rakefiles – they are ruby scripts plus magic.

Reply  |  Quote
]]>
By: FX http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27343 Wed, 20 Feb 2013 07:53:56 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27343

Luke Maciak wrote:

It turned into a 3 day project where I had to downgrade my Eclipse to a previous version, and compile something from source just to get it to work, only to realize the performance was terrible and it would freeze up the UI all the time.

XML configuration. Yuck.

The really nice thing about Make is that it’s trivial to just write a Makefile from scratch without even thinking about it, and without having to browse through heaps of documentation about obscure XML properties. Rake looks nice though, if you know Ruby.

Reply  |  Quote
]]>
By: IceBrain http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27316 Tue, 19 Feb 2013 22:30:02 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27316

@ Alexei Matyushkin:
We already had s-exps. ANT had no excuse. http://harmful.cat-v.org/software/xml/

Personally, the only build tool I use nowadays is “go build”. Everything else tends to be interpreted.

Reply  |  Quote
]]>
By: Alexei Matyushkin http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27297 Tue, 19 Feb 2013 06:39:01 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27297

That’s the question of a sort “what’s better: an orange or a hockey stick?”

AFAIK, ANT is XML-based not because James Duncan Davidson liked curly syntax with tons of garbage. They successfully used some proprietary IDE with internal make-like engine. When Tomcat was opensourced they needed to create a build tool, which is understandable by likely infinite amount of unknown IDEs. Everyone who once tried to parse and represent an unstructured text in graphical manner (as most IDEs do) knows, that the only way not to come in the bump is to use highly-structured language. That’s why XML.

Furthermore, there is absolutely no problem to extend ANT/Maven with your own weird complicated task, written in high-level language (Java,) which is your fave since you are using ANT/Maven.

Ruby, on the other hand, is not a language you’re supposed to use within IDE. Neither it requires a huge repository of prebuilt tasks (basically, one may successfully spend a life coding in ruby, being on intimate terms with none of them, except, probably, RSpec/RDoc.)

Make was born when there were no goods around, except of “compile-link-me-this-in-this-order”. “No hooch, no gals, no nothing.”—as Raymond Chandler wrote about kinda same situation :-)

The summing up, I would definitely use Maven if my wife asked me to hack our android-based microwave; I do use Rake during my working days with rails and I like an elegance and simplicity of makefiles.

I would like an orange when I’m hungry and a hockey stick if I’m bored with these rake-maven-makefiles.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27293 Tue, 19 Feb 2013 04:57:23 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27293

@ Ron Collinson:

Very true. Then again we sort of live in a multi-environment age these days. Single language purism is a thing of the past in a way. We now have huge, language agnostic frameworks (JVM and .NET – both of which support a multitude of languages that all compile to cross compatible bytecodes) and projects that have cross-language dependencies. For example Yeoman has both Node and Ruby as dependencies (among a few other things).

@ Chris Wellons:

Heh, very true. Make is simple and straightforward all the way up until your project becomes complex enough to break it. :P

Reply  |  Quote
]]>
By: Chris Wellons http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27286 Tue, 19 Feb 2013 03:46:06 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27286

I have thorough experience with Make, Ant, Maven, Leiningen, and SCons. I don’t really like any of them that much, especially Maven.

Ant’s declarative configuration is appealing to me until, as you pointed out, I need to do something unusual. Then it’s impossible. However, I still think its biggest flaw is the lack of conventions: parts of it are still too low-level. Everyone has to invent their own conventions. If I’m building Java sources, this is my preferred build system.

Maven and Leiningen are painfully slow. Fortunately in Leiningen’s case I don’t need to build very often thanks to Clojure’s REPL. The only appealing thing about Maven is its well-curated repository, which I can access from Ant and Leiningen anyway. Leiningen is the only choice when it comes to Clojure.

SCons is painfully inefficient by re-running configuration checks on each build. The worst part is how it really fights you if you have an unusual environment, because it clears out all environmental variables for subprocesses. Have libraries or headers in a non-standard place? Too bad. I avoid using SCons.

Make can do virtually anything I need it to do; it’s my safety net fallback when everything else fails. But it’s too low level, making it really tedious and messy to maintain on medium to large projects (recursive makefiles, listing each individual file, etc.) and generally poor at portability. It’s also nearly impossible to write a non-trivial Makefile that isn’t broken in some way, whether for parallel builds or lack of proper argument escaping (a general unix shell flaw). It’s unusual to come across a Makefile that isn’t broken, including the ones generated by autoconf — try running autoconf in a directory containing a space, for example. Make is my build system of choice for everything else.

Still looking for that perfect build system.

Reply  |  Quote
]]>
By: Ron Collinson http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27278 Tue, 19 Feb 2013 00:26:58 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27278

Either Make or Rake, much perfer using Rake but if anyone else may want to use the program then adding Ruby as a dependency (for non Ruby projects) is a bit much imho.

Reply  |  Quote
]]>
By: Tormod Haugen http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27272 Mon, 18 Feb 2013 22:40:04 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27272

Coming from a Java background, I must say that Maven is a good basis until you need something more complex. As long as you can work alongside Maven, and do stuff their way, it is a great help.

Other build/dependency management systems, like Gradle, Buildr, Ivy, SBT and more use Maven’s way of handling dependencies – mostly because it works and that it covers all(most?) all open source software, and handles proprietary software through self-hosted repository installs (like Nexus and Archiva).

Maven also integrates nicely with (most) IDE’s, including Eclipse, IntelliJ IDEA and NetBeans, and other tools – including Hudson/Jenkins CI.

As said, it isn’t perfect, and you’ll probably grow out of it, but it works.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2013/02/18/what-is-your-favorite-build-tool/#comment-27266 Mon, 18 Feb 2013 20:32:35 +0000 http://www.terminally-incoherent.com/blog/?p=13894#comment-27266

@ FX:

Also, Make is more or less the de-facto standard in the Unix/Linux world which makes it ubiquitous, mature and it’s peculiar quirks well documented.

I haven’t used Eclipse in a while, but I can imagine doing anything non-standard in it would be quite cumbersome. It worked well for compiling homework assignments when I was in school. On the other hand, at one point I had to install a few plugins to make it do something non-standard and it turned into a 3 day project where I had to downgrade my Eclipse to a previous version, and compile something from source just to get it to work, only to realize the performance was terrible and it would freeze up the UI all the time. :P

Reply  |  Quote
]]>