diff options
author | jlam <jlam> | 2001-06-11 03:20:48 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-06-11 03:20:48 +0000 |
commit | 732e0c992c98109d496c17a9952ce26ef3f85b71 (patch) | |
tree | 57dd659b2bb8e6cb462c66eff3f8d217f0e18950 /mk | |
parent | 8bbd4f1feea4465410823a4908f2eaec42ed8814 (diff) | |
download | pkgsrc-732e0c992c98109d496c17a9952ce26ef3f85b71.tar.gz |
The variables that may optionally be defined are:
BUILDLINK_TRANSFORM.<pkgname> sed arguments used to transform the name of
the source filename into a destination
filename
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.buildlink.mk | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mk/bsd.buildlink.mk b/mk/bsd.buildlink.mk index 8e1121670a9..dd11efa868d 100644 --- a/mk/bsd.buildlink.mk +++ b/mk/bsd.buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink.mk,v 1.1 2001/06/11 01:57:09 jlam Exp $ +# $NetBSD: bsd.buildlink.mk,v 1.2 2001/06/11 03:20:48 jlam Exp $ # # This Makefile fragment is included by package buildlink.mk files. This # file does 3 things: @@ -25,6 +25,12 @@ # the targets should be appended to this variable # using += # +# The variables that may optionally be defined are: +# +# BUILDLINK_TRANSFORM.<pkgname> sed arguments used to transform the name of +# the source filename into a destination +# filename +# # The targets required to be defined prior to including this file are # listed below. # @@ -42,6 +48,9 @@ # BUILDLINK_FILES.foo+= include/bar.h # BUILDLINK_FILES.foo+= lib/libfoo.* # +# # We need the libraries to be called "libbar.*". +# BUILDLINK_TRANSFORM.foo= -e "s|libfoo|libbar|g" +# # BUILDLINK_TARGETS+= foo-buildlink # # pre-configure: foo-buildlink @@ -70,7 +79,11 @@ _BUILDLINK_USE: .USE if [ ! -f $${cookie} ]; then \ ${ECHO} "Linking ${.TARGET:S/-buildlink//} files into ${BUILDLINK_DIR}."; \ for file in ${BUILDLINK_FILES.${.TARGET:S/-buildlink//}:S/^/${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}\//g}; do \ - dest=${BUILDLINK_DIR}/$${file##${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}/}; \ + if [ -z "${BUILDLINK_TRANSFORM.${.TARGET:S/-buildlink//}:Q}" ]; then \ + dest=${BUILDLINK_DIR}/$${file##${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}/}; \ + else \ + dest=`${ECHO} ${BUILDLINK_DIR}/$${file##${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}/} | ${SED} ${BUILDLINK_TRANSFORM.${.TARGET:S/-buildlink//}}`; \ + fi; \ ${MKDIR} $${dest%/*}; \ if [ -f $${file} ]; then \ ${RM} -f $${dest}; \ |