4 ms·
Interesting that the alternative tools mentioned in the article (SCons, Cons, and A-A-P), only SCons has been updated since 2003 (according to Freshmeat), and i
by skywhopper 13y ago
Interesting that the alternative tools mentioned in the article (SCons, Cons, and A-A-P), only SCons has been updated since 2003 (according to Freshmeat), and its last update in 2010 appears to have been mainly to redo the version numbers and drop Python 2.4 support.
- bjourne 13y agohttps://code.google.com/p/waf/ https://code.google.com/p/waf/ is the spiritual successor to SCons. It started off as a fork of it (due to performance problems in SCons) and then became a full project on its own. It can do everything autotools+make can and you only have to code your build in Python rather than Makefile + M4 + shell scripts. I've been using it for many years and it is technically superior to any build system I've seen. Shame the author of it doesn't market it more -- with some hype it would easily have been the de facto standard build system by now.
- csense 13y agoYeah, scons looked well-designed when I encountered it in 2012 or so, but it also looked dated and unmaintained. Good to know someone's picked up the torch.
- mansr 13y agoReplacing make with python is a huge step back. The makefile language is simple yet extremely powerful for describing a dependency tree such as that for building an executable from sources. Its perhaps strongest point is that it completely agnostic to what the different steps actually do rather than consist of a predefined set of canned rules/tasks with, if you're lucky, a convoluted way of adding your own using e.g. python (or worse, java). This means that as long as a shell command can turn a set of inputs into an output, describing it takes (usually) just two lines of makefile, one naming the target and prerequisites, one providing the command to perform the transformation. If a particular rule is too complicated for a few shell commands, invoking a separate script (or even a just-built executable) is trivial. Every other system I've looked at needed a comparatively enormous amount of code for adding even the slightest tweak to the built-in rules. GNU make is actually two different languages coexisting in the same file (the makefile), a declarative language for describing the targets and their dependencies as well as a functional language for the variables/macros. Once you realise this, a whole new world of possibilities opens up. If more people took the time to actually understand proper use of makefiles, perhaps we'd see fewer poorly reinvented wheels.
- mkesper 13y agoDo you have some link to a good tutorial/guide showing those possibilities?
- mansr 13y agoThe official manual is mostly easy to understand. There are various 3rd-party books available, but I haven't read any of them.
- rkangel 13y agoI've written a few complex Make based portable build systems over the years and in my experience Make script is its major limitation. Make is a great system for declaring dependencies - the basic syntax is wonderfully concise (not that that's everything) and clear, and the system is a great platform on which you can build your build system (unlike Scons which tries to abstract away all sorts of things and just ends up hiding them). The problem is that when you are trying to do anything more complicated than simple rules you are lacking basic language features. You don't even get function calls - the templates work under many circumstances, but not all (and are a pain to debug). Also don't get me started on invisible syntax errors (tabs vs spaces), and the only error message Make has' Missing separator. Stop'. Writing a build system in Python loses you that concise declaration syntax (but again characters typed isn't everything, as long as you maintain clarity it doesn't matter), but gets you ugh more flexibility to produce rules under complex circumstances, which saw at you need for portability.
- mansr 13y agoYour comment betrays your ignorance. Firstly, you call it "make script," suggesting that you view makefiles as a typical (procedural) script that is executed from top to bottom. I base this on my experiences working closely with others who also used the term "make script," all of whom suffered from this misconception. Secondly, GNU make does have function calls. Look up the $(call ...) construct. When the built-in functionality is insufficient (and of course such cases come up), it is trivial to call an external script, written in your language of choice, using either the $(shell ...) syntax or as part of a target recipe. As for the "Missing separator. Stop." it is not fair to dismiss an entire tool because of one slightly obscure error message. I also find it ironic that you complain about tabs vs spaces, then go on to suggest using python, which also has invisible whitespace as part of its syntax.
- roryokane 13y agoThe releases on http://freecode.com/projects/scons http://freecode.com/projects/scons are out of date. The last release was Scons 2.3.0 in March 2013, not 2.0.1 in 2010. See http://www.scons.org/ http://www.scons.org/ and http://www.scons.org/CHANGES.txt http://www.scons.org/CHANGES.txt. It looks like Scons has one release every year or so.