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


bug #57681: 2nd expansion only for required targets

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

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Mon 27 Jan 2020 09:02:13 PM UTC, original submission:  


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:

Thanks to give me your feedback.


Yannick DAVELUY <ydaveluy>


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

Attach Files:

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.





No changes have been made to this item

Back to the top

Powered by Savane 3.9