Re: [bug #51311] Checking search retries for implicit make rules

2017-07-03 Thread SF Markus Elfring
> At the risk of stating the obvious, note that there is a trivial
> work-around for this - there is nothing special about dot in patterns,
> so you could merge the dot into what % matches to make it non-empty:

It might be acceptable to give up a character from either end
of the prefix (or suffix) for my toy example.

Will the pattern match be a bit more flexible with this trick
than what was originally intended?


I imagine that direct support would be nice for a placeholder
which can be treated as optional in such an use case.

Regards,
Markus

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #51311] Checking search retries for implicit make rules

2017-07-03 Thread Edward Welbourne
Mike Gran (25 June 2017 22:54)
> The '%' (the stem) in a pattern rule doesn't, if I recall correctly,
> match a null string.  It needs to match at least a single character,
> so building MOTD.log won't work.

At the risk of stating the obvious, note that there is a trivial
work-around for this - there is nothing special about dot in patterns,
so you could merge the dot into what % matches to make it non-empty:

MOTD%log: MOTD%txt MOTD%in

... or, of course, merge the D in from the other end:

MOT%.log: MOT%.txt MOT%.in

Eddy.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #51311] Checking search retries for implicit make rules

2017-07-02 Thread Markus Elfring
Follow-up Comment #4, bug #51311 (project make):

> In fact there can be zero, one, or as many prerequisites containing the
pattern character as you like. Essentially if the target contains a pattern
character then it's a pattern rule:

Can examples in the manual cause the impression that there is any limitation?


>…, the reason your example doesn't work is that a pattern character must
match at least one character.

Can this information appear in another section of the manual?

Do I need to pair standard pattern rules with concrete make rules so that the
placeholder “%” will be handled in special cases as if it would be
optional?

I am curious on how the software will evolve further for the previous
clarification request “pattern rules: % doesn't match empty string”
 then.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #51311] Checking search retries for implicit make rules

2017-07-02 Thread Paul D. Smith
Update of bug #51311 (project make):

  Status:None => Duplicate  
 Open/Closed:Open => Closed 

___

Follow-up Comment #3:

As pointed out on the mailing list, it's not true that there can only be one
prerequisite containing the pattern character (%).  In fact there can be zero,
one, or as many prerequisites containing the pattern character as you like. 
Essentially if the target contains a pattern character then it's a pattern
rule: the prerequisites list doesn't matter.

As Mike points out, the reason your example doesn't work is that a pattern
character must match at least one character.

As for allowing pattern characters to match zero characters, that is already
filed as an enhancement request as bug #29448 so we don't need another one.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #51311] Checking search retries for implicit make rules

2017-06-26 Thread SF Markus Elfring
> To quote the make info pages, section 10.5.1 "Introduction to Pattern Rules":
> -
> A pattern rule contains the character `%' (exactly one of them)

I interpreted this description in the way that one placeholder would be 
supported
for each element in the list of prerequisites.


> …; the `%' matches any nonempty substring, while other characters match only 
> themselves.  
> -

How do you think about to mention the requirement “non-empty string” at another 
place?
https://www.gnu.org/software/make/manual/html_node/Pattern-Match.html


> There's no restriction in the documention on the number of prequisites on 
> the rule and they may contain any mix of pattern and non-pattern names.

I find that this wording can be only partly appropriate.

* Is there a current software restriction that only a single pattern
  is supported within the prerequisites list for a specific make rule?

* Will any more developers become interested in related software extensions?

Regards,
Markus

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #51311] Checking search retries for implicit make rules

2017-06-26 Thread Markus Elfring
Follow-up Comment #2, bug #51311 (project make):

From Mike Gran:
“…
So your interpretation is incorrect.
…”

I find that the documentation can be clarified a bit more on this aspect.

I propose another software extension then.


From Mike Gran:
“…
It needs to match at least a single character,
…”

I would appreciate to use a placeholder which can occasionally also be
resolved to the empty string at the discussed script place.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #51311] Checking search retries for implicit make rules

2017-06-25 Thread Philip Guenther
On Sun, 25 Jun 2017, Mike Gran wrote:
> Follow-up Comment #1, bug #51311 (project make): You've opened this as a 
> bug. I believe it is not a bug.  Again. I'm not a maintainer.
> 
> Please note two things.
> 
> 1. while "MOTD%.log: MOTD%.txt" is a pattern rule, "MOTD%.log: MOTD%.txt
> MOTD%.in" is not a pattern rule, because it has two entries after the colon. 

This is incorrect.  To quote the make info pages, section 10.5.1
"Introduction to Pattern Rules":
-
A pattern rule contains the character `%' (exactly one of them) in the
target; otherwise, it looks exactly like an ordinary rule.  The target
is a pattern for matching file names; the `%' matches any nonempty
substring, while other characters match only themselves.  
-

There's no restriction in the documention on the number of prequisites on 
the rule and they may contain any mix of pattern and non-pattern names.  
See that page and the others in that section for further details.



> 2. The '%' (the stem) in a pattern rule doesn't, if I recall correctly, match
> a null string.  It needs to match at least a single character, so building
> MOTD.log won't work.

This is correct, as per the documentation quoted above.


Philip Guenther

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #51311] Checking search retries for implicit make rules

2017-06-25 Thread Mike Gran
Follow-up Comment #1, bug #51311 (project make):

Markus,

You've opened this as a bug. I believe it is not a bug.  Again. I'm not a
maintainer.

Please note two things.

1. while "MOTD%.log: MOTD%.txt" is a pattern rule, "MOTD%.log: MOTD%.txt
MOTD%.in" is not a pattern rule, because it has two entries after the colon. 
So your interpretation is incorrect.

2. The '%' (the stem) in a pattern rule doesn't, if I recall correctly, match
a null string.  It needs to match at least a single character, so building
MOTD.log won't work.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make