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!).
--
С уважением, Александр Гавенко.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make