[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Passing environment variables in reciepes
From: |
Warlich, Christof |
Subject: |
Passing environment variables in reciepes |
Date: |
Wed, 8 Dec 2010 11:29:01 +0100 |
Hi,
please consider the following makefile:
all:
@if [ "${USER}" == "" ]; then \
export message="no user defined"; \
else \
export message="user is ${USER}"; \
fi
@echo ${message} $${message} $message $$message eval $$message
My problem ist that I cannot find a way to pass data being determined in one
reciepe line to the next reciepe line. Executing the example given above:
$ echo $USER
christof
$ make
yields:
essage eval
So, none of my desperate attempts to expand $message works.
I tried to use environment variables in the example above, which doesn't seem
to work (why?), but there may be better ways ?!
Thanks for any suggestions,
Christof
- Passing environment variables in reciepes,
Warlich, Christof <=