Subject: Re: Malformed conditional && solaris
To: MLH <mlh@goathill.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 08/31/2005 16:48:56
On Wed, 31 Aug 2005, MLH wrote:

> Why is bmake complaining about this on Solaris ?
>
> bmake: "/usr/pkgsrc/x11/py-qt3-sip/Makefile" line 38: Malformed conditional
> (${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*))

This is the code I committed for you. I don't know what changed. But now I 
think this CC_VERSION requires including the ../../mk/compiler.mk first.

Maybe use following instead. I wasn't even checking for version 3 in the 
first place, so using PKGSRC_COMPILER for checking gcc should be good 
enough.

(This just replaces CC_VERSION with PKGSRC_COMPILER.)

Index: x11/py-qt3-sip/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/py-qt3-sip/Makefile,v
retrieving revision 1.17
diff -b -u -r1.17 Makefile
--- x11/py-qt3-sip/Makefile	1 Jul 2005 01:27:09 -0000	1.17
+++ x11/py-qt3-sip/Makefile	31 Aug 2005 23:46:38 -0000
@@ -35,7 +35,7 @@
  CONFIGURE_ARGS+=	LFLAGS_PLUGIN="-bundle -flat_namespace -undefined suppress"
  .else
  CONFIGURE_ARGS+=	CFLAGS_SHLIB=-fPIC
-.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*)
+.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
  # gcc3 uses -mimpure-text to not pass -assert pure-text to the linker
  CONFIGURE_ARGS+=        LFLAGS_SHLIB="-shared -mimpure-text"
  .else

  Jeremy C. Reed

  	  	 	 BSD News, BSD tutorials, BSD links
 	  	 	 http://www.bsdnewsletter.com/