bugmake - Bugs: bug #51311, Checking search retries for...

 
 

bug #51311: Checking search retries for implicit make rules

Submitted by:  Markus Elfring <elfring>
Submitted on:  Sun 25 Jun 2017 07:40:47 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.2.1Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 02 Jul 2017 06:03:46 PM UTC, comment #4:

> 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.

Markus Elfring <elfring>
Sun 02 Jul 2017 05:25:41 PM UTC, 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.

Paul D. Smith <psmith>
Project Administrator
Mon 26 Jun 2017 08:18:01 AM UTC, comment #2:

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.

Markus Elfring <elfring>
Sun 25 Jun 2017 08:54:20 PM UTC, comment #1:

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.

Mike Gran <mike121>
Sun 25 Jun 2017 07:40:47 PM UTC, original submission:

The documentation contains the following information:
“…
Any target in the makefile may be specified as a goal (…). Even targets not in the makefile may be specified, if make can find implicit rules that say how to make them.
…”

Test result:

I would interpret the second rule as a make pattern rule which is also categorised as an implicit rule then. An explicit make rule does not exist in this small test example for the specified (non-default) goal. So I would expect that another search try will be performed.
Why do I observe a mismatch there?

How much does it matter in this test case that I would like to try a prerequisite out which should contain two “patterns”?

Markus Elfring <elfring>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by mike121 (Posted a comment)
  • -unavailable- added by elfring (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 02 Jul 2017 05:25:41 PM UTCpsmithStatusNone=>Duplicate
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1