bugmake - Bugs: bug #56422, How to find the number of rules in...

 
 

bug #56422: How to find the number of rules in GMAKE

Submitter:  None
Submitted:  Fri 31 May 2019 03:03:24 AM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.2 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 31 May 2019 04:07:25 AM UTC, comment #1: 

Make doesn't know how many rules it will run.  Make doesn't work by making a list up-front of all the targets that need to be built, then building them.

Instead, make starts with the first goal target, checks its prerequisites one at a time, and each of those prerequisites' prerequisites, etc. and if the prerequisite is out of date it gets built, then make moves on to the next one.

Make never knows that it's done until it builds the last target and discovers there's nothing left to do.

Changing this would be a massive rewrite of the entire build engine of GNU make.

There are hacks you can use, such as to run make with the -n option first and parse the output to count how many targets need to be built, then re-run make without -n to actually build things.  But these need to be done by your makefile or scripting around it.

If you want to discuss other possible methods for doing this you can try asking for help on the -email is unavailable- or -email is unavailable- mailing lists.

Paul D. Smith <psmith>
Group administrator
Fri 31 May 2019 03:03:24 AM UTC, original submission:  

Hi,

I have been working on GMAKE for a while and wanted to know if there is a way to find the number of rules to be run at the very beginning ? I wanted to send this info to my server so that it knows that make will run that many number of rules.

The server then provides the info to the user about how much % of make job is done.

Please let me know. This is really an urgent requirement for me. Let me know about the functions or variables where I can find like how many targets have to executed.

Thanks a lot,

Nikhil Jain

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-31 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code