10 ms·
The things make got right (and how to make it better)
- aconbere 16y agoI had a similar epiphany a year or so ago. After cursing make files and their syntax for so long, I had arrived at a moment in which the project I was working on truly called for make. The project assumed no other dependencies than a standard *nix OS and needed some simple compilation. So I sat down with the make documentation and in an hour had basically figured out what I needed. Almost no pain, super speedy, little trouble. Admittedly the syntax is /unique/ to makefiles, which I think is the biggest downside. There is a huge benefit to not having to learn one more way of doing things. And I think that's the big appeal of tools like rake (as well as the ability to easily leverage, libraries, and other higher order programming concepts). But for the simple tasks of compilation, and minor project management. Give me Make.
- mansr 16y agoNice to see someone who's not swallowing the snake oil.
- johnzabroski 16y agoYou're aware that the author of this article is the author of a book titled GNU Make Unleashed, right? Who is swalling the snake oil?
- mansr 16y agoSo he's taken the time to understand make and is thus able to see these new build systems for what they are.
- johnzabroski 16y agoWho said anything about new build systems? All the build systems he was thinking of are not even worth criticizing, including make. Check out Vesta, created about 25 years ago... make is a complete mess. Trying to put lipstick on it and dress it in a champagne gown doesn't change the fact you got stuck with the ugly girl for the prom.
- weavejester 16y agoHis example could be improved a little: file "target" => %w(prereq1 prereq2 prereq3 prereq4) |t| sh "update", t.name, *t.prerequisites end Now, call me crazy, but I actually prefer "t.prerequisites" over "$^". If I were writing makefiles all the time, perhaps I'd appreciate Make's concise but obscure syntax. But maintaining makefiles takes only a small proportion of my time, and more syntax I have to learn, the more trouble I'm going to have remembering it. Rakefiles are written in Ruby, a language I already use for development. The additional syntax I need to remember to use Rake is therefore very small. It's also a heck of a lot easier to work with Rake if you happen to want to do something a little complex or unusual!
- ScottBurson 16y agoI didn't know about Rake until now, but I agree -- having seen a few examples, I like Rake's syntax much better. I will definitely keep it in mind for the next time I need a build tool.
- asb 16y agoFor my own personal projects (which admittedly have very modest requirements) I quite like waf. It neatly avoids the problem faced by most non-standard build-systems by distributing itself as a self-extracting bundle of python scripts small enough to add to your repository (<100KB). There's recently been a new release (1.6) with some API changes, but as the standard model is to redistribute the whole system this won't break anyone's build. http://code.google.com/p/waf http://code.google.com/p/waf
- gchpaco 16y agoOne of the things most make replacements don't do and that Rake does is implicit dependency management; the .o.c type of rule. I use this constantly and miss it every time in ant, scons, and indeed nearly every "make replacement" save Rake and make itself.
- johnzabroski 16y agoYou're not comparing it to the state-of-the-art, which, ahem, was developed over 20 years ago: Vesta. Your ideas on how to make it better seem produced by having your head down typing away at the monitor, rather than seeing the big picture. Read a visionary system like Vesta. Then re-write this article, and forget about Make.
- davidw 16y agoI think Make is ok - what I don't like is all the other baggage that often seems to come with it; namely autoconf and automake.