On Tue, Apr 02, 2013 at 08:44:01AM -0400, Carl Wilhelm Soderstrom wrote: > On 04/01 11:35 , Florin Iucha wrote: > > I have seen this guy present his new make replacement at ESC 2011: > > > > http://www.embedded.com/design/programming-languages-and-tools/4228095/Beyond-MakeFles---Building-large-scale-C-projects--ESC-200- > > > > ... and it was a disaster. Read for yourself... > > > That's a good article, thanks for posting it. > However I'm not clear on what this guy's make-replacement was, or how it was > a disaster. Could you clarify? The name of the tool was 'tup'. The main disaster of his idea is that he can establish the build correctness without loading the entire dependency graph into the memory, just by checking the file stamps. It sort of works if you just build only one binary out of of a bunch of files, but if you produce multiple binaries that share an object file, then it breaks down. Also the tool has built-in knowledge that all object files are produced by the build and it saves you from having to write the 'clean' rule. Wonderful. What about vendor-supplied object files? Yes, not libraries, object files... they do exist. His tool will blissfully delete them. The main thrust of his article and presentation was "look how fast my tool is on this edge case." No mention of correctness at all. Make has some syntax warts, but then everything that survives for thirty years is bound to have some. What it gives it the staying power is that it is an rule-driven expert system configured through a functional programming language. The rule driven expert system simply says that 'if you need X and have Y, this is how you get X from Y.' Of course, wrapped in the temporal dependency (if you have the rule mentioned above and Y is newer than X, rebuild X). The functional programming language aspect is visible in the immutability of the variable assignments with respect to execution of the rules. Yes, you can append to CFLAGS, but once you start executing the rules, the CFLAGS (global) is immutable. Second, it is visible in the way data is processed for targets. Here is a snippet from one of my standard makefiles: SOURCES=$(wildcard *.c) OBJECTS=$(SOURCES:.c=.o) DEPS=$(SOURCES:.c=.d) ... clean: @$(RM) $(OBJECTS) $(TARGETS) $(DEPS) ... You don't go iterating over C files, to count them. Or go looping over each C file replacing the extension one by one. Make was the original DSL (domain specific language). That topic is 'hot' again. Cheers, florin -- Sent from my other microwave oven. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20130402/624f1c88/attachment.pgp>