diff options
author | jlam <jlam@pkgsrc.org> | 2002-10-09 22:10:04 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-10-09 22:10:04 +0000 |
commit | f274c4cf290368d0bd4880eac698a764f4d460b5 (patch) | |
tree | df7c8dfd40b88ab36f288c14f11041c0d5fbb678 /mk/buildlink2 | |
parent | 4916f8a634e7435f4547542a412bdc6abb5ab111 (diff) | |
download | pkgsrc-f274c4cf290368d0bd4880eac698a764f4d460b5.tar.gz |
Rearrange _BUILDLINK_USE target code a bit to allow for BUILDLINK_FILES
to be a shell command, e.g.:
BUILDLINK_FILES= `cd ${LOCALBASE}; ${LS} -1 lib/libfoo.*`
Diffstat (limited to 'mk/buildlink2')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index d063929d692..12df3cd4509 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.38 2002/10/09 20:58:10 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.39 2002/10/09 22:10:04 jlam Exp $ # # An example package buildlink2.mk file: # @@ -190,9 +190,10 @@ _BUILDLINK_USE: .USE buildlink_dir="${BUILDLINK_DIR}"; \ ;; \ esac; \ - files="${BUILDLINK_FILES.${.TARGET:S/-buildlink//}:S/^/${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}\//g}"; \ - for file in $${files}; do \ - rel_file=`${ECHO} $${file} | ${SED} -e "s|${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}/||"`; \ + cd ${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}; \ + rel_files="${BUILDLINK_FILES.${.TARGET:S/-buildlink//}}"; \ + for rel_file in $${rel_files}; do \ + file="${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}/$${rel_file}"; \ if [ -z "${BUILDLINK_TRANSFORM.${.TARGET:S/-buildlink//}:Q}" ]; then \ dest="$${buildlink_dir}/$${rel_file}"; \ else \ |