Subject: Re: Malformed conditional && solaris
To: grant beattie <grant@NetBSD.org>
From: MLH <mlh@goathill.org>
List: tech-pkg
Date: 08/31/2005 19:53:01
> 
> On Wed, Aug 31, 2005 at 04:48:56PM -0700, Jeremy C. Reed wrote:
> 
> > 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*))
... 
> > -.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*)
> > +.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
> 
> this is not correct, since PKGSRC_COMPILER can contain multiple words,
> in order of preference, and this could match gcc* when it isn't the
> compiler being used.
> 
> CC_VERSION is the version string of the compiler currently being used,
> but you need to .include "../../mk/compiler.mk" before testing its
> value.

Ok. This also worked for the Makefile problem. Thanks!

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/py-qt3-sip/Makefile,v
retrieving revision 1.17
diff -b -u -r1.17 Makefile
--- Makefile	1 Jul 2005 01:27:09 -0000	1.17
+++ Makefile	1 Sep 2005 00:50:41 -0000
@@ -29,6 +29,7 @@
 PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX}
 
 .include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
 
 .if ${OPSYS} == "Darwin"
 CONFIGURE_ARGS+=	CFLAGS_SHLIB=-fno-common