From 69872634e96d1e322d49049b003091bf66a72c7f Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 13 Sep 2003 15:04:59 +0000 Subject: Rename _PERL5_VAR.* to _PERL5_SITEVAR.* and move them to somewhere global so the the remainder of this file can use their values. Also override the PREFIX with the module's PREFIX so the default directories end up pointing in the right place. --- lang/perl5/module.mk | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'lang/perl5') diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk index 4b8914d41df..1c923af5204 100644 --- a/lang/perl5/module.mk +++ b/lang/perl5/module.mk @@ -1,4 +1,4 @@ -# $NetBSD: module.mk,v 1.17 2003/09/13 14:13:14 jlam Exp $ +# $NetBSD: module.mk,v 1.18 2003/09/13 15:04:59 jlam Exp $ # # This Makefile fragment is intended to be included by packages that build # and install perl5 modules. @@ -72,30 +72,27 @@ _PERL5_SITEVARS= \ INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR \ SITELIBEXP SITEARCHEXP +_PERL5_SITEVAR.INSTALLSITEBIN= installsitebin +_PERL5_SITEVAR.INSTALLSITELIB= installsitelib +_PERL5_SITEVAR.INSTALLSITEARCH= installsitearch +_PERL5_SITEVAR.INSTALLSITEMAN1DIR= installsiteman1dir +_PERL5_SITEVAR.INSTALLSITEMAN3DIR= installsiteman3dir +_PERL5_SITEVAR.SITELIBEXP= sitelibexp +_PERL5_SITEVAR.SITEARCHEXP= sitearchexp + .if !defined(_PERL5_SITEPREFIX) . if exists(${PERL5}) -_PERL5_PREFIX!= \ +_PERL5_PREFIX!= \ eval `${PERL5} -V:prefix 2>/dev/null`; ${ECHO} $$prefix _PERL5_SITEPREFIX!= \ eval `${PERL5} -V:siteprefix 2>/dev/null`; ${ECHO} $$siteprefix MAKEFLAGS+= _PERL5_PREFIX="${_PERL5_PREFIX}" MAKEFLAGS+= _PERL5_SITEPREFIX="${_PERL5_SITEPREFIX}" -# -# Repoint all of the site-specific variables to be under the perl5 -# module's ${PREFIX}. -# -_PERL5_VAR.INSTALLSITEBIN= installsitebin -_PERL5_VAR.INSTALLSITELIB= installsitelib -_PERL5_VAR.INSTALLSITEARCH= installsitearch -_PERL5_VAR.INSTALLSITEMAN1DIR= installsiteman1dir -_PERL5_VAR.INSTALLSITEMAN3DIR= installsiteman3dir -_PERL5_VAR.SITELIBEXP= sitelibexp -_PERL5_VAR.SITEARCHEXP= sitearchexp . for _var_ in ${_PERL5_SITEVARS} _PERL5_SUB_${_var_}!= \ - eval `${PERL5} -V:${_PERL5_VAR.${_var_}} 2>/dev/null`; \ - ${ECHO} $${${_PERL5_VAR.${_var_}}} | \ + eval `${PERL5} -V:${_PERL5_SITEVAR.${_var_}} 2>/dev/null`; \ + ${ECHO} $${${_PERL5_SITEVAR.${_var_}}} | \ ${SED} -e "s,^${_PERL5_SITEPREFIX}/,," MAKEFLAGS+= _PERL5_SUB_${_var_}="${_PERL5_SUB_${_var_}}" . endfor @@ -106,11 +103,19 @@ _PERL5_SUB_INSTALLSCRIPT!= \ MAKEFLAGS+= _PERL5_SUB_INSTALLSCRIPT="${_PERL5_SUB_INSTALLSCRIPT}" . endif .endif - +# +# Repoint all of the site-specific variables to be under the perl5 +# module's ${PREFIX}. +# .for _var_ in ${_PERL5_SITEVARS} INSTALLSCRIPT _PERL5_${_var_}= ${PREFIX}/${_PERL5_SUB_${_var_}} MAKE_FLAGS+= ${_var_}="${_PERL5_${_var_}}" .endfor +# +# The PREFIX in the generated Makefile will point to ${_PERL5_PREFIX}, +# so override its value to the module's ${PREFIX}. +# +MAKE_FLAGS+= PREFIX="${PREFIX}" .if defined(DEFAULT_VIEW.perl) DEFAULT_VIEW.${PKGBASE}= ${DEFAULT_VIEW.perl} -- cgit v1.2.3