Subject: Re: EVAL_PREFIX doesn't always work
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 03/22/2001 16:34:27
On Thu, Mar 22, 2001 at 05:07:10PM +0100, Matthias Drochner wrote:
>
> I've found that EVAL_PREFIX fails sometimes, appearently
> if a sub-make is invoked due to unresolved dependencies.
> Its implementation in bsd.pkg.mk doesn't look as I could
> understand it, so I'll give an example here where it
> fails for me:
>
> The package I want to build is devel/hdf.
> It depends on f2c. The path to the f2c binary is resolved
> through EVAL_PREFIX - in the Makefile it looks like:
As the perpetrator of EVAL_PREFIX, I'd like to point out that it was
meant to be used for packages that can install themselves in
${X11BASE} or ${LOCALBASE}. That's why the default, which is set in
the 4th line quoted below, is ${X11PREFIX}, if there isn't a
corresponding F2CBASE_DEFAULT.
.if defined(EVAL_PREFIX)
.for def in ${EVAL_PREFIX}
.if !defined(${def:C/=.*//}_DEFAULT)
${def:C/=.*//}_DEFAULT= ${X11PREFIX}
.endif
.if !defined(${def:C/=.*//})
_dir_${def:C/=.*//} != (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null; ${ECHO} " @cwd ${${def:C/=.*//}_DEFAULT}") | ${AWK} '{ print $$2; exit }'
${def:C/=.*//}=${_dir_${def:C/=.*//}}
MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}}
.endif
.endfor
.endif
I think the answer is to specify F2CBASE_DEFAULT=${LOCALBASE} in the
devel/hdf/Makefile.
Regards,
Alistair