patchmake - Patches: patch #5880, Add rule printing (like -p) to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5880: Add rule printing (like -p) to debug (-d) output

Submitter:  None
Submitted:  Sat 21 Apr 2007 09:21:47 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  psmith Originator Email:  -email is unavailable-
Open/Closed:  Closed Fixed Release:  CVS

Fri 11 May 2007 10:40:22 PM UTC, comment #2: 

Thank you for accepting my problem & suggested update.


Anonymous
Fri 11 May 2007 08:54:20 PM UTC, comment #1: 

I created a solution that just printed a single line showing where the command script came from, but didn't print the command line itself.

Paul D. Smith <psmith>
Group administrator
Sat 21 Apr 2007 09:21:47 PM UTC, original submission:  

I often debug Makefiles and often ask: where did that command (rule) come from?

My solution has always been to use combinations of "-d" and "-p" and attempt to sort through the copious output.

With "-p" - make prints the resulting makefile.
With "-d" - make tells you what it is doing.


With LARGE makefiles {for example GCC}...
Or Makefile systems that make heavy use of  "include  make-fragment"
(Did you know GCC uses that feature?)


Debugging becomes 'a maze of twisty passages all alike'


Attached is a simple ( 9 line ) patch that greatly simplifies the way through the maze
(and to the battery/lamp-oil vending machine in the middle of the maze)

here is an example [snip] from the NEW -d output of make while building g++
The *OLD*  "make -d" output is available with:  make -d


>> Finished prerequisites of target file `g++'.
>> Must remake target `g++'.
>> Execute:
>> #  commands to execute (from `../.././gcc/cp/Make-lang.in', line 65):
>>     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
>>     $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
>> gcc   -g -DIN_GCC -DCROSS_COMPILE  .. [SNIP] ...

Anonymous

 

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

Attached Files
file #12554:  make-3.81-patch-location-print added by None (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-18 psmith Open/ClosedOpen Closed
    2007-05-11 psmith StatusNone Done
        Assigned toNone psmith
        Fixed ReleaseNone CVS
    2007-04-21 None Attached File- Added make-3.81-patch-location-print, #12554

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code