Subject: imake, Solaris, Xrender
To: None <tech-pkg@NetBSD.org, jlam@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 06/15/2005 19:09:50
/usr/ccs/bin/make on Solaris can't handle Makefiles with empty lines, as 
e.g. created from imake in pkgsrc/mk/buildlink3/imake-check. This results
in funny errors like this on Solaris 9/x86:

 	rfhpc8317% make clean
===>	make: Fatal error in reader: standard input, line 3: Unexpected end of line seen
 	===> Cleaning for xcursor-1.1.2
 	rfhpc8317% pwd
 	/usr/pkgsrc/x11/xcursor


For pkgsrc/mk/buildlink3/imake-check, a solution I see is to apply the 
patch below, which eliminates any empty lines in the Makefile created with 
imake. Please commit if you find the patch appropriate.

I hit this whole problem first building firefox on Solaris, which raised 
he above warning a few times, one of them in the x11/Xrender package. 
There seem to be more issues lurking there, as neither the Xrender that 
comes with the OpenWindows here nor the OpenWindows version itself is 
recognized. I'll dig a bit more into this.


   - Hubert

Index: mk/buildlink3/imake-check
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/imake-check,v
retrieving revision 1.1
diff -u -r1.1 imake-check
--- mk/buildlink3/imake-check	3 Jun 2005 19:12:49 -0000	1.1
+++ mk/buildlink3/imake-check	15 Jun 2005 17:06:45 -0000
@@ -78,6 +79,7 @@

  # Run imake to process the Imakefile.
  ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config -s - |
+	${GREP} -v '^[ 	]*$' |
  	${IMAKE_MAKE} -f - builtin-test |
  	${GREP} -q yes
  exitcode="$?"