On Fri, 2009-11-27 at 09:27 +0100, Gabriele Sales wrote: > Googling around I found a reference to the (hidden) switch > "--print-data-base", that is almost what I want. Unfortunately the > output it produces seems partially unprocessed: for example, function > calls inside commands are not expanded. I'd really like to be handed > the completely transformed result, i.e. the same strings that get > passed to the shell for execution.
I'm not sure why you say it's hidden: it's clearly documented in the manual (you can use -p as well). It's even in the man page. This is the only option there is. Also, there's no way to get a "completely transformed result" for every target, because make doesn't compute the expansion of the variables and functions inside the recipes until it is ready to run that command. Many of the contents of the recipes CANNOT be computed usefully outside of the context of actually running make: variables that contain lists of prerequisites that are up-to-date are not available for example. Also, any target-specific variables that might be inherited from parent targets are not available unless make knows what those parent targets are, and that's computed only through invoking make (it can even change depending on which goal targets make is using). And, of course, some targets don't even have recipes (if they are created using implicit rules) and certainly we cannot expand recipes of implicit rules as their automatic variables (just for starters) have no useful value unless applied to a real target. Make doesn't do implicit rule searches on targets unless it's going to build them. -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
