%% Travis Spencer <[EMAIL PROTECTED]> writes: >> *pass the relevant variables to my program* <-- how can i do this?
ts> What about using make's `-p' option? It will output the variables and ts> their values in a format that is very easy to parse (e.g., ts> http://travisspencer.com/stash2/tests/python/capmake2.py). I thought of this, too, but note it won't fully evaluate the values before it prints them. For example if you have in your makefile: FOO = $(BAR) then the output of -p will print "$(BAR)" as the value; it won't expand the reference to BAR. Obviously if you use := instead, then it WILL be expanded in the -p output. The other idea is to write a special rule that just prints the values of variables. You could use $(.VARIABLES) if you have a new-enough version of GNU make (beware of blowing out your environment :-/). Then you would run "make print-my-vars" or whatever to get the output. -- ------------------------------------------------------------------------------- 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 _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
