exporting makefile variables to $(shell) environment
I'm aware that one can export make variables to other makefiles; however, how does one export them to the environment of $(shell)? Take the example below:
Code:
export TEST Code:
VARIABLE=$(shell i-need-TEST.sh) Code:
VARIABLE=$(shell export TEST="$(TEST)"; i-need-TEST.sh) Kevin Barry |
Environment:
Quote:
Code:
~/tmp$ cat v.mk |
You're right that the target environment is taken from the makefile; however, I need shell because the targets are taken from a script, and that script determines the targets conditionally, based on the environment. For example:
Code:
#!/bin/bash Code:
#makefile Code:
> make SUFFIX='{-default,-debug}' Code:
echo TARGET1: target.txt Kevin Barry |
It's possible to hack something with .VARIABLES:
Code:
#MAKFILE |
Thanks, that looks like what I need.
Kevin Barry |
All times are GMT -5. The time now is 01:52 AM. |