[bug #60736] Introduce "Circular <- dependency dropped." for .EXTRA_PREREQS deps.

2021-06-05 Thread Dmitry Goncharov
Additional Item Attachment, bug #60736 (project make):

File name: sv_60736_add_avoid_circular_dep_msg.diff Size:0 KB
   




___

Reply to this item at:

  

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




[bug #60736] Introduce "Circular <- dependency dropped." for .EXTRA_PREREQS deps.

2021-06-05 Thread Dmitry Goncharov
Follow-up Comment #1, bug #60736 (project make):

With the patch in the attachment the output is

$ make -f makefile2 
make: Circular hello.x <- hello.x dependency dropped.
touch hello.x
$

___

Reply to this item at:

  

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




[bug #60736] Introduce "Circular <- dependency dropped." for .EXTRA_PREREQS deps.

2021-06-05 Thread Dmitry Goncharov
URL:
  

 Summary: Introduce "Circular  <-  dependency
dropped." for .EXTRA_PREREQS deps.
 Project: make
Submitted by: dgoncharov
Submitted on: Sun 06 Jun 2021 01:33:46 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: None
   Fixed Release: None
   Triage Status: None

___

Details:

Introduce "Circular  <-  dependency dropped." for .EXTRA_PREREQS
dependencies.


$ cat makefile2
hello.x: ; touch $@
hello.x: .EXTRA_PREREQS:=hello.x
$ make -f makefile2
touch hello.x
$

"make: Circular hello.x <- hello.x dependency dropped." is missing.

The message is useful and make prints it in the case of a regular (as opposite
to .EXTRA_PREREQS) circular dependency.





___

Reply to this item at:

  

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




[bug #60730] Emit fewer enter/leave messages with -O

2021-06-05 Thread Paul D. Smith
Update of bug #60730 (project make):

  Status:None => Not A Bug  
 Open/Closed:Open => Closed 

___

Follow-up Comment #3:

OK thanks.  FWIW I agree it's not pretty: we've sacrificed some readability on
the altar of correctness in this situation.

If we moved away from using recursive make we could introduce an internal
feature where if make knows that its the only make in the jobserver group
(e.g., it hasn't run any other make programs) it could forgo all the
enter/leave.  But it's not clear to me how common a situation it is to never
have any recursion; automake generated makefiles, that want to work with POSIX
make, pretty much have to use it and often even makefiles that are mostly
non-recursive have a recursive invocation or two at the top, just to set up
the environment in a straightforward way.

___

Reply to this item at:

  

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




[bug #60730] Emit fewer enter/leave messages with -O

2021-06-05 Thread Tom Tromey
Follow-up Comment #2, bug #60730 (project make):

> The reason for it is that when there are multiple jobs running we don't know
if the next output to be printed will be from this instance of make or from
another instance of make

Thank you for your reply.  I understand the problem.  I think you can close
this bug. 

___

Reply to this item at:

  

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




[bug #60730] Emit fewer enter/leave messages with -O

2021-06-05 Thread Paul D. Smith
Follow-up Comment #1, bug #60730 (project make):

Just to be clear, this only happens if you use -j to enable the jobserver
along with -O.

The reason for it is that when there are multiple jobs running we don't know
if the next output to be printed will be from this instance of make or from
another instance of make (another sub-make running in the same jobserver
domain).  Since these targets are potentially running in completely different
processes, we can't leave the printing of our "Leaving" message until the next
output.

What I typically do is (a) use a fully-qualified path to run the remote
configure, and (b) set GNUMAKEFLAGS=--no-print-directory.

This removes the enter/leave text everywhere, which isn't always great but is
usually OK, and any error messages should have fully-qualified paths to source
files, etc. in them so it's not very important for Emacs to be able to track
the current directory via enter/leave.

Of course this might not work for some environments, YMMV.

The final option is to use -Orecurse instead.  This groups the entire output
of a recursive make together.  Because the entire output of a single make is
grouped, the individual enter/leave lines per recipe are not needed.  The big
downside here is that you won't get any incremental output (for any submake). 
So, it seems like nothing is happening then everything appears at once at the
end.  That can be annoying if you, like me, like to watch builds and "get a
jump on" errors as they appear before the build is complete.

___

Reply to this item at:

  

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