Subject: imake-check and xpm and builtin
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 08/30/2005 15:49:15
I want PREFER_NATIVE=xpm to work. It used to work, but something changed.

Please guide me on how I can troubleshoot the builtin and imake process.

I am looking at xpm and building fonts/t1lib.

fonts/t1lib includes ../../graphics/xpm/buildlink3.mk.

My mk.conf has: PREFER_NATIVE= xpm

montecristo:/usr/pkgsrc/fonts/t1lib$ bmake show-var VARNAME=PREFER.xpm
native

I don't have xpm package installed. But I do have libXpm as provided by 
xorg-libs package.

The graphics/xpm/builtin.mk includes ../../mk/buildlink3/bsd.builtin.mk.

For some reason it appears that maybe the graphics/xpm/builtin.mk is 
loaded twice. So I set .undef IS_BUILTIN.xpm at top. (I tested this by 
adding a bogus line to after it is checked to see if that was ever got to 
or not -- by seeing if received an error or not.)

Also it appears that the mk/buildlink3/imake-check.mk is ran twice, so I 
also set .undef BUILTIN_IMAKE_CHECK.${_pair_:C/\:[^:]*$//}

Then the mk/buildlink3/imake-check returns "no".

If I don't do the .undef's above then imake-check is never ran. (I tested 
same way as above.)

I tried with bmake-20040220, bmake-20050530 and bootstrap's bmake.

My third problem was imake-check:

montecristo:/tmp/imake-check.25587$ /usr/X11R6/bin/imake -DUseInstalled 
-I/usr/X11R6/lib/X11/config -s - | make -f - builtin-test
no

montecristo:/tmp/imake-check.25587$ cat Imakefile
#if NormalLibXpm
builtin-test:
         @echo yes
#else
builtin-test:
         @echo no
#endif


I don't see anything in the generated makefile (pipe into less) to see any 
other files that are included.

Any ideas about this?

  Jeremy C. Reed

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