bug-make
[Top][All Lists]
Advanced

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

Re: Why does "manual%.html" match "manual.html" in some cases but not ot


From: Jack Bates
Subject: Re: Why does "manual%.html" match "manual.html" in some cases but not others?
Date: Fri, 26 Mar 2010 09:31:10 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Mar 22, 2010 at 06:56:47PM -0700, Philip Guenther wrote:
> On Mon, Mar 22, 2010 at 1:23 PM, Jack Bates <address@hidden> wrote:
> > Why does "manual%.html" match "manual.html" in the case of
> > $(patsubst ../manual%.html,...) and ".PRECIOUS: manual%.html", but not
> > in the case of the target, "manual%.html: ..."?
> 
> Hmm, it appears to have been like that for a long time and the
> behavior is documented (c.f. section 10.5, "Defining and Redefining
> Pattern Rules").  The question is whether it should be counted a bug.
> I was going to hazard the guess that it's for compatibility with
> pattern rules in some other version of make, but a quick check shows
> that Solaris's normal make as well as its backwards compatibility
> "sysv-make" both permit '%' to match the empty string in pattern
> rules, so if it _was_ for cross-version compatibility then it was with
> some other (even more ancient?) version.  As is, changing it to permit
> % to match empty strings seems like the Right Thing to me.

Thanks for your reply Philip - it seems like the Right Thing to me too...

> > Unfortunately the "manual%.pdf" and "manual%.html" targets don't match
> > "manual.pdf" and "manual.html", respectively
> 
> Workaround: require the % to match the 'l' too, ala "manua%.pdf" and
> "manua%.html".  Gross, but it works...

Thanks for suggesting this workaround




reply via email to

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