bug-make
[Top][All Lists]
Advanced

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

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


From: Paul D. Smith
Subject: [bug #56422] How to find the number of rules in GMAKE
Date: Fri, 31 May 2019 00:07:25 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Update of bug #56422 (project make):

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

    _______________________________________________________

Follow-up 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 address@hidden or address@hidden mailing lists.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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