[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ifeq and $HOSTNAME
From: |
Paul Smith |
Subject: |
Re: ifeq and $HOSTNAME |
Date: |
Tue, 22 Sep 2009 15:54:39 -0400 |
On Tue, 2009-09-22 at 15:50 -0400, Paul Smith wrote:
> This worked as expected for me:
>
> $ cat Makefile
> sc=localhost
>
> $(warning HOSTNAME is $(HOSTNAME))
>
> ifeq "$(HOSTNAME)" "$(sc)"
> $(warning is $(sc))
> else
> $(warning is not $(sc))
> endif
>
> all: ; @echo done
>
> $ HOSTNAME=notlocal make
> Makefile:3: HOSTNAME is notlocal
> Makefile:8: is not localhost
> done
>
> $ HOSTNAME=local make
> Makefile:3: HOSTNAME is local
> Makefile:8: is not localhost
> done
Duh, I mistyped the second example; here's the right one:
$ HOSTNAME=localhost make
Makefile:3: HOSTNAME is localhost
Makefile:6: is localhost
done