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?



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

Reply via email to