On 2010-12-08 11:29:01 (+0100), Warlich, Christof 
<[email protected]> wrote:
> 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
> 
Each line in the recipe is executed in its own shell.
If you add '; \' behind the 'fi', so echo is executed in the same shell
as the if statement you'll have a different result.

Regards,
Kristof


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to