bug-make
[Top][All Lists]
Advanced

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

[bug #61042] Enhance implicit rule search logging


From: Dmitry Goncharov
Subject: [bug #61042] Enhance implicit rule search logging
Date: Sun, 15 Aug 2021 00:11:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?61042>

                 Summary: Enhance implicit rule search logging
                 Project: make
            Submitted by: dgoncharov
            Submitted on: Sun 15 Aug 2021 04:11:25 AM UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Enhance implicit search logging.

Consider this rule
%.o: %.c; $(CC) -o $@ -c $<

When the user wants to make hello.o and hello.c is missing, make gives the
following diagnostics.

$ ls
makefile
$ cat makefile
%.o: %.c; $(CC) -o $@ -c $<
$ ~/src/gmake/make/m64/make -R --debug=implicit hello.o |tail +9
Updating goal targets....
 File 'hello.o' does not exist.
 Looking for an implicit rule for 'hello.o'.
 Trying pattern rule with stem 'hello'.
 Trying implicit prerequisite 'hello.c'.
 Trying pattern rule with stem 'hello'.
 Trying implicit prerequisite 'hello.c'.
 Looking for a rule with intermediate file 'hello.c'.
  Avoiding implicit rule recursion.
 No implicit rule found for 'hello.o'.
Must remake target 'hello.o'.
make: *** No rule to make target 'hello.o'.  Stop.
$

The bottom line in this diagnostics is the "No rule found" message.
While the issue is that hello.c is missing.
And the user stares at the makefile and says
"How cannot make find the rule? Here it is."

Preferably make should tell which rule it is trying and why it is rejecting
it
and which prerequisite make is trying and what the outcome is.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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