%% Travis Spencer <address@hidden> 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.