%% "Peter A. Kerzum" <[EMAIL PROTECTED]> writes: pak> Yeah, Fabio's way seem quite clean and pretty. I agree that eval pak> should support include.
$(eval ...) does support include. What Fabio wants to do is declare new prerequisites inside of a command script. That may not be possible in a reliable way. Make proceeds in two very distinct phases: in the first phase make reads in all the makefiles and constructs an internal dependency graph, and in the second phase make walks that dependency graph and rebuilds target that it deems out of date. Make was not written in a way that expects the dependency graph to be modified during the second phase: until $(eval ...) that was simply impossible. I'm not prepared at this time to say that it _should_ be possible. I won't be prepared to decide that until after I understand the reasons why it doesn't work now. There are all kinds of potential problems; for example it often happens that more than one prerequisite depends on the same target: what if the target that you're modifying (by adding prerequisites) is already built? Should make somehow figure that out and reconsider the target? If not, won't that lead to lots of confusion on the part of the user? If I decide that this behavior is not valid then I'll add some code to GNU make disallowing it with an error, so that we won't get core dumps in GNU make any longer. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make