[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Passing makefile macros back using the $(shell)
From: |
address@hidden |
Subject: |
Passing makefile macros back using the $(shell) |
Date: |
Mon, 14 Mar 2005 21:01:03 GMT |
gmake version 3.80 (no patches)
I was attempting to use the shell to generate some environmental
variables for the makefile. Because of the definition of the foreach
statement I cannot have spaces in the values. I initially used an unused
character that was translated back and forth. Now I need to use that character
as part of the data. It then occurred to me that maybe I can use a macro for
my spaces. I cannot seem to figure out how to get the macro to expand. Is
there some way to get the macro to expand?
empty:=
space:=${empty} ${empty}
$(foreach var,$(shell brand -e makefile),$(eval ${var}))
brand script
print "NUMOSVERSION:=5200"
print "export\${space}NUMOSVERSION"
The print from using the warning functio shows
NUMSOVERSION:=5200
export${space}NUMOSVERSION
Is there some reason why the generated export line would be invalid? I would
have thought the macro would need to be expanded before processing the line for
syntax.
Thanks for any help,
Norman
- Passing makefile macros back using the $(shell),
address@hidden <=