[lug] OT: Makefile oddity

D. Stimits stimits at idcomm.com
Wed Apr 24 09:36:07 MDT 2002

Ken Weinert wrote:
> Hash: SHA1
> On Wednesday 24 Apr 2002 8:24, you wrote:
> > So I have what I hope is one last hurdle here to emerging from the Dark
> > Ages of non-cvs and tons of sym links in hard-to-package layouts. Using
> > something like this as an example of generating the dependencies, I have
> > a problem due to intermediate object files going to a separate
> > directory:
>         Well, I took a look, didn't see anything obvious in the options, but this
> sed command should work OK:
> sed 's:^\([a-z]\):\.\./obj/\1:'
> This is stuck inline between the output of g++ and the redirect into the
> dependency file.  The first pattern will only match filenames starting with
> lower case so you may need to expand it - the intent is only do the
> substitution on lines that start with a character as continuation lines
> either have space or tab as the first character.
> It's probably not a perfect match, but should be a step in the right
> direction, hope it helps.

I'm going to go ahead and use the sed approach. As ugly as recursive
make is, having modular distributable parts and any dependency tracking
is an order of magnitude better than it was before. It's *soooo* nice to
get rid of sym links and to make configurable options in a separate

D. Stimits, stimits at idcomm.com

> - --
> Ken Weinert   mc at morat.net

More information about the LUG mailing list