help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make 3.79, consolidating dependancy lines


From: Karl Berry
Subject: Re: GNU Make 3.79, consolidating dependancy lines
Date: Fri, 14 May 2004 14:44:09 -0400

    quxprog.objs = qux.obj morequx.obj wow_lib.obj
    # I also wish I knew a way to avoid so much ".obj" clutter above

Don't know if you'll think it's an improvement, but here's one way:
quxprog.objs = $(addsuffix .obj, qux morequx wow_lib)

    <anything>.prg : ${${<anything>}.objs}
         link -o $@ ${${<anything>}.objs}

In fact, computed variable names with virtually that exact syntax are
apparently supported.  See the Computed Names node in the manual,
although I don't know if it will work in a pattern rule, such as:

%.prg: $($(%prog.objs))
        link -o $@ $^

Hmm.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]