bugmake - Bugs: bug #57681, 2nd expansion only for required...

 
 

bug #57681: 2nd expansion only for required targets

Submitter:  Yannick DAVELUY <ydaveluy>
Submitted:  Mon 27 Jan 2020 09:02:13 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.3 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 02 Aug 2022 10:17:11 PM UTC, comment #1: 

This is a duplicate of bug #62706  Thanks!

Paul D. Smith <psmith>
Group administrator
Mon 27 Jan 2020 09:02:13 PM UTC, original submission:  


Hello,

The second expansion of the prerequisites should be done only when a target is needed. This could improve performances.


With this design it will be possible to include dependencies file only when needed.

Actually the next pattern is often used:

deps:=$(patsubst %.o,%.d,${objects})

-include ${deps}
%.o : %.c
        ${GCC} ...

With this pattern all existing dependencies files are included even if only one file needs to be recompiled.

If 2nd expansions were performed only when a target is needed, we could write previous pattern like this:

%.o : %.c $$(get_dependencies %.d)


get_dependencies can be a user or builtin function that read the dependency file and return the list of prerequisites.

I developed this enhancement in the following repo:
https://github.com/ydaveluy/make/tree/feature_2nd_expansion_improvement

Thanks to give me your feedback.

Yannick



Yannick DAVELUY <ydaveluy>

 

(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
    2022-08-02 psmith StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code