[bug #49262] Update match-anything rule documentation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
URL:
  <http://savannah.gnu.org/bugs/?49262>

                 Summary: Update match-anything rule documentation
                 Project: make
            Submitted by: lukeallardyce
            Submitted on: Tue 04 Oct 2016 03:47:00 AM GMT
                Severity: 3 - Normal
              Item Group: Documentation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

I couldn't find anything in the manual that documents the behavior described
by the following comment in implicit.c

      /* Rules that can match any filename and are not terminal
         are ignored if we're recursing, so that they cannot be
         intermediate files.  */

Patch is only a suggestion, it'll probably need improvement.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 04 Oct 2016 03:47:00 AM GMT  Name: make.patch  Size: 2kB   By:
lukeallardyce

<http://savannah.gnu.org/bugs/download.php?file_id=38659>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49262>

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
Follow-up Comment #1, bug #49262 (project make):

I think this is covered in "10.5.5 Match-Anything Pattern Rules"

-----
   If you do not mark the match-anything rule as terminal, then it is
non-terminal.  A non-terminal match-anything rule cannot apply to a
file name that indicates a specific type of data.  A file name
indicates a specific type of data if some non-match-anything implicit
rule target matches it.

   For example, the file name `foo.c' matches the target for the pattern
rule `%.c : %.y' (the rule to run Yacc).  Regardless of whether this
rule is actually applicable (which happens only if there is a file
`foo.y'), the fact that its target matches is enough to prevent
consideration of any non-terminal match-anything rules for the file
`foo.c'.  Thus, `make' will not even consider trying to make `foo.c' as
an executable file from `foo.c.o', `foo.c.c', `foo.c.p', etc.
-----


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49262>

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
Follow-up Comment #2, bug #49262 (project make):

That paragraph doesn't apply to something like


%.o: foo
        @echo $@

%:
        @echo $@

$ make foo.o -R
$ make: *** No rule to make target 'foo.o'.  Stop.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49262>

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
Follow-up Comment #3, bug #49262 (project make):

...which is some of the text that you're patching.  Sorry, should have looked
at the patch first.

That said, I don't thinking bringing up a particular case in match-any rule
processing is helpful in that earlier page about implicit-rules; match-any
rules are the particular case while implicit-rules are the general case, so
the detail belongs in the description of the former, as it is now.

Calling out being the prerequisite of a implicit-rule blocks non-terminal
match-any processing?  Hmm, I was going to say that it's implied by the last
paragraph on the page, but that paragraph is too restrictive, implying
.SUFFIXES and similar are involved in the creation of the dummy rules.
However, even without dummy rules (as seen in the "-p" output), make will
refuse to use a non-terminal match-any rule for a prerequisite.  Something
does need to be reworded there.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49262>

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
Follow-up Comment #4, bug #49262 (project make):

I thought it might be useful to mention it in the chaining section as well as
it is behavior specific to implicit rule chaining.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49262>

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #49262] Update match-anything rule documentation

Bogdan Barbu
Update of bug #49262 (project make):

                  Status:                    None => Fixed                  
             Assigned to:                    None => psmith                
             Open/Closed:                    Open => Closed                
           Fixed Release:                    None => SCM                    

    _______________________________________________________

Follow-up Comment #5:

I added some text similar to the suggested patch.  Thanks!

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49262>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/