Follow-up Comment #3, bug #35062 (project make): Well, yes, it would be possible to do something like store the internal variable database as a kind of "versioned" database, where changes to variable values do not overwrite previous ones but instead are added on. Then when a target is defined it would keep a reference to the state of the variable database at that time so that all variable references in prerequisite lists would be expanded in the context of that state, instead of the "current" (ending) state. Or something similar.
However functions that referenced "outside influences" like wildcard etc. could not be duplicated (a wildcard expansion while the makefile is read in and an expansion well on into the work of building targets could well give very different results for example). And my final comment stands: it would be an enormous amount of work. One possibility would be to use SECONDEXPANSION to avoid the immediate expansion of prerequisites. However, today make will secondarily expand all (explicit) targets, not just targets that are considered during a given run. I would be willing to look into an enhancement that deferred secondary expansion until a target was considered and not secondarily expanding targets that are not considered. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?35062> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make