Update of bug #55137 (project make): Status: None => Not A Bug Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #1: It's always been the case that the entire recipe, including all functions and macros on all the recipe lines, is expanded before the first recipe line is run. The $(file ...) function is just a normal make function and obeys all the same expansion rules as any other function or macro. Changing that behavior is of course possible but we'd have to think about it very carefully to understand the backward-compatibility ramifications. To do what you want you'll have to force the directory creation to happen during expansion: you can do this by using the $(shell ...) function. This is just about the only time I can think of where it's not an anti-pattern to use $(shell ...) in a recipe: OUTPUT/something : $(shell mkdir -p $(@D)) $(file >$@, $(@F)) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?55137> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make