[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to set an environment variable from within a makefile
From: |
Mark Galeck (CW) |
Subject: |
how to set an environment variable from within a makefile |
Date: |
Sat, 17 Mar 2012 20:34:23 -0700 |
Hello,
The export directive can be used to communicate variables to sub-makes.
Is there a way to communicate a variable up-stream, or between makefiles in the
same depth of recursion. I thought I would try to setup an environment
variable from within a makefile,
either using
FOOBAR=value
in a recipe,
or $(shell FOOBAR=value) , outside one.
But this does not seem to work - it only works in the context of that same
makefile, but not outside of it,
How can I do this through environment variables?
(I can probably use writing to a file to store that information, but I would
rather use env variables).
I somehow suspect this is a stupid question. Oh well, let Paul & others laugh
at my naivety.
Mark
- how to set an environment variable from within a makefile,
Mark Galeck (CW) <=