You're viewing a single post. I have much more to say! The main blog page is a good starting point.
Friday, March 24, 2006 ★ 13:43 ★ Category Programming
GNU Make is a really great tool to automate repeating tasks when you’re working on a project. I’m not only using Make to compile sofware (duh!), but also to do other things:
My problem is that I often have a top-level Makefile which contains all targets. When I’m deep down in a subdirectory, no Makefile is present over there. Now, say I want to generate documentation… I need to cd .. up until I’m at the toplevel of my project and run make over there. I know you can also pass parameters to make, but all these solutions require a lot of typing or let you lose your context (your working directory, in this case).
Makeup to the rescue! Save this small shellscript to a directory in your $PATH and you’re ready to go. Makeup tries to locate a Makefile in the current directory and tries again (recursively) on the parent directory if no Makefile was found. You can invoke makeup in the same way as you invoke make, because parameters are passed along.
That’s it. Download makeup here. I know you want it!
Update: Wow, a fanboy! adrighem on irc: “Je bent geniaal. wakeup.” (“You’re a genius, a real wake up!”)
Random photo from Prague (July, 2005)
Wouter Bolsterlee, also known as uws, a postmodern geek living in the Netherlands. Read more about me…
Unless stated otherwise, all material on this site is available under a Creative Commons Share-Alike license.