summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-11 03:20:48 +0000
committerjlam <jlam@pkgsrc.org>2001-06-11 03:20:48 +0000
commit97660f7ebd7bb7034b3affc0068e94190231dbbb (patch)
tree57dd659b2bb8e6cb462c66eff3f8d217f0e18950 /mk
parentdbfde59b14f3df33f921b522c83796d99919502c (diff)
downloadpkgsrc-97660f7ebd7bb7034b3affc0068e94190231dbbb.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.mk17
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}; \