[Top][All Lists]

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

Re: Adding debugging to GNU make (Mailing lists are a disaster lately!)

From: Paul D. Smith
Subject: Re: Adding debugging to GNU make (Mailing lists are a disaster lately!)
Date: Mon, 15 Mar 2004 11:26:58 -0500

%% "R. Bernstein" <address@hidden> writes:

  rb> Clearly something like this viewpoint has contributed to the
  rb> long-term neglect of decent debugging in POSIX shells (if not
  rb> "make") as well.

I do see the need for, and so have no interested in discussing further,
debugging shell scripts: some of them are very long and very complex.
I'm not sure I see the same need for interactive debugging in the case
of make.  Even the most complicated makefile system is not even close in
complexity to, say, a configure script.

No amount of "bitchy" ranting on your part is going to change my mind.
If you want to change my mind, make a rational argument and avoid the
name calling and abuse.  People who propose wide-ranging projects while
at the same time admitting they've not even looked at the code don't
start out with a lot of credibility.  My point in the previous mail was
mainly that just because you've done a debugger for bash doesn't mean
that writing one for make will be similarly straightforward: make is a
very different program than a shell.

You can decide to believe me or not, and I could well be wrong, but it
would be polite to wait until you've actually tried it and have a clue
what you're talking about before you say I'm full of shit.

  rb> Actually the parallel runs deeper. Not only neglect of debugging
  rb> but just error reporting! Just yesterday I got an error reported
  rb> from GNU make: "Error in line 1, mumbledy gook." That error
  rb> message was in fact coming from a multi-line shell string, I guess
  rb> because I was using an older ksh rather than say bash. Okay that
  rb> "Line 1" unhelpfulness is ksh's fault.

If you think about it for a minute you'll see why the shell behaves like

  rb> But actually not totally -- "make" could have given me the name
  rb> and LINE NUMBER in the Makefile from where the error came
  rb> from. And/or a traceback.

Make can provide you with the filename/line number of the rule that
failed, but obviously it can't point you to which line in a multiline
script failed.

I agree that make should print the filename/linenumber as that would
make things simpler for the user.  On the other hand usually it's not
very difficult to find the rule in the makefile that failed: make prints
the name of the target that failed as well as the command it's going to
execute.  There are times where it is difficult to find the rule, to be
sure, especially when dealing with implicit rules.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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