bugmake - Bugs: bug #3116, recompile changed files first

 
 

bug #3116: recompile changed files first

Submitter:  None
Submitted:  Fri 04 Apr 2003 03:23:27 PM UTC
   
 
Severity:  1 - Wish Item Group:  Enhancement
Status:  Not A Bug Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  None Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 06 Apr 2006 05:23:29 PM UTC, comment #4: 

Just a guess what he meant:
If after changing a soiurce file a 'make clean' is done, it would be a good thing to try to build the target first which has the newest date (the changed one), as it is the one most likely to have errors.
This saves a lot of time sice emake stops after the first error (unless -k)

The bigger the project is, the longer it might take until the newly changed file is compiled and make stops.

If the dependencies are set up properly, it is normally not necessary to call a make clean. But in some projects it is necessary to 'hide' some dependencies because e.g. an include file is constantly changed but these changes do not affect most of the files which include it. E.g. a file with global definitions whose current changes are only important for the C file currently being worked on.

But, well, then one can recompile until there are no more errors and then make a complete build.


Anyway, building the target with the newest prerequisite first would be a nice idea.

Anonymous
Wed 07 Jan 2004 07:41:14 PM UTC, comment #3: 

No response and submitted by "anonymous", so I'm closing this.  Anyone who has an answer should feel free to attach it; I can reopen the request.

Paul D. Smith <psmith>
Group administrator
Sun 13 Apr 2003 04:37:30 AM UTC, comment #2: 

Wait, I reread this bug and I'm confused.

If a C file has not been changed, then it's not rebuilt anyway... so all the files that are rebuilt have been changed.  So what's the advantage of listing them in "changed" order?

Paul D. Smith <psmith>
Group administrator
Fri 04 Apr 2003 03:34:00 PM UTC, comment #1: 

There is no such thing, really, as a makefile that doesn't dictate build order.  According to the POSIX specs prerequisites must be processed "in the order in which the appear".

In order for this behavior to be implemented it must be enabled through some kind of special target, etc.  It cannot be the default behavior.

Paul D. Smith <psmith>
Group administrator
Fri 04 Apr 2003 03:23:27 PM UTC, original submission:  

I list my C files in make as the following:

CPP_FILES = $(shell ls -t *.cpp) #save time finding errors

which recompiles changed cpp files before cpp files that didn't change.

One interesting enhancement to make would be if it did this type of thing automatically in cases where the makefile didn't dictate build order.  When coding, this type of optimization can help find compile errors faster.

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

 

CC list is empty

 

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 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-01-07 psmith StatusNone Not A Bug
    Assigned toNone psmith
    Open/ClosedOpen Closed
2003-04-04 psmith Severity3 - Normal None

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code