[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:50:57 -0400 |
On Tue, 2009-09-22 at 21:23 +0200, jody wrote:
> # set the name of the special case
> sc=localhost
> # if its the special case use MagickWand-config
> ifeq "$(HOSTNAME)" "$(sc)"
> MAGIC_CFLAGS=`MagickWand-config --cflags --cppflags`
> MAGIC_LFLAGS=`MagickWand-config --ldflags --libs`
> else
> MAGIC_CFLAGS=
> MAGIC_LFLAGS=-lWand -lMagick
> endif
>
> But no matter what the value of $HOSTNAME is, always the else-branch
> is traversed.
You must not have the value of HOSTNAME that you expect.
How is HOSTNAME getting set? Are you setting in the makefile, or
inheriting it through your environment?
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
Maybe you can try something similar and report what HOSTNAME was set to
for you?