help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ifeq behaves differently on linux (using GNU Make 3.80) and Solaris


From: Oleksandr Gavenko
Subject: Re: ifeq behaves differently on linux (using GNU Make 3.80) and Solaris (using GNU Make 3.81)
Date: Fri, 25 Jun 2010 09:50:32 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 24.06.2010 14:59, springer83 wrote:

HI ,
        I am porting an application from linux to solaris but ifeq behaves
differently on  linux (using GNU Make 3.80) and Solaris (using GNU Make
3.81) ,

Below is the snippet wat i am using on linux :
" ""
" ""
ifeq ($(OS), linux)
export CPPFLAGS += -DOS_LINUX -D_GNU_SOURCE -D_REENTRANT
echo "HIIIIIII"
endif
" ""
" ""
If i build the above snippet on linux it says ::: *** missing separator.
Stop.


********************************************************************
Below is the snippet wat i am using on Solaris :
" ""
" " ""
ifeq ($(OS),SunOS)
export CPPFLAGS += -DOS_SOLARIS -D_GNU_SOURCE -D_REENTRANT
echo "HIIIIIII"
endif
" """
" """
If i build the above snippet on Solaris :::: make doesn't crib , but never
enter's the ifeq condition ...

The  OS variable is getting set to SunOS ,when i echoed..

Can anyone throw some light on this ....thanks in advance

regards
I explore efficient way to debug Makefiles: put $(error $(VAR)) into some part of Makefile.

Also exist $(info ...) but it introduced in Make 3.80 if I remember correctly.

So before ifeq print $(OS value) to test if it equal 'SunOS', then put $(error ..) into
ifeq to see if error happen (so you enter to 'ifeq' part!).

--
С уважением, Александр Гавенко.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]