bug-make
[Top][All Lists]
Advanced

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

Re: Static multiple target rules


From: Philip Guenther
Subject: Re: Static multiple target rules
Date: Mon, 29 Mar 2010 20:20:45 -0700

On Mon, Mar 29, 2010 at 7:54 PM, tom honermann <address@hidden> wrote:
> Paul, would you be opposed to a patch that implements support for static
> multiple target rules using the above syntax?
> Any particular concerns or requirements you would have?
...
>   a1 (b1 b2 b3): d1
>       touch -r $^ $@
>
> Note the space between 'a1' and the left parenthesis.  This is required so
> that the target is not parsed as an archive member.

Hmm.  SysV make has offered the desired feature with the syntax

b1 + b2 + b3: d1
        touch -r $^ $@

It appears the sysV implementation doesn't let you declare multiple
groups with a single rule, but that's not a restriction of the syntax
itself.  Yes, that syntax has a meaning in GNU make (treating '+' as a
target), but it's clearly not a portable name for a target.  (Indeed,
plus-sign is not part of the POSIX "Portable Filename Character Set".)


The proposed syntax already has a conflicting special meaning in GNU
make (multiple archive-member target) for what would be the common
case of a single group.  That is, this:

(b1 b2 b3): d1
        whatever

currently means "the b1, b2, or b3 members of any archive library
depend on d1 and are updated by running 'whatever'".  The fact that
it's a special syntax means that it's more likely to actually be in
use out there.  How will the proposed change affect Makefiles using
that syntax?

(While I don't think the sysV syntax is *great*, I personally think
it's a better choice than overloading the meaning of parentheses.)


Philip Guenther




reply via email to

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