%% Boris Kolpackov <[EMAIL PROTECTED]> writes:

  bk> [EMAIL PROTECTED] writes:

  >> Is there  a way to store all the environment variables in gmake so that i
  >> can check for the same while running gmake the second time.

  bk> Starting from GNU make 3.80 special variable .VARIABLES is
  bk> available which expands to a list of all variables defined to this
  bk> point. Using $(origin ) function you can narrow this list to
  bk> environment variables only. Then you can save their names and
  bk> values (or hash sum) to a file...

Since all environment variables are exported to subshells, you can just
do this:

    $(shell env > saved-variables)

Of course, doing something with that file is more complicated; it all
depends on what you're trying to do.

-- 
-------------------------------------------------------------------------------
 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

Reply via email to