diff options
author | agc <agc> | 1998-01-30 13:53:53 +0000 |
---|---|---|
committer | agc <agc> | 1998-01-30 13:53:53 +0000 |
commit | 0db0fc6fc6c94e5c32f0348a48267f2d3c64e4e6 (patch) | |
tree | a7c0a81ea49e7ce2d8a6e7f48a49a66080a65d25 /mk | |
parent | 33474037664edb35d548bc13c6e7b5f40f93dfaa (diff) | |
download | pkgsrc-0db0fc6fc6c94e5c32f0348a48267f2d3c64e4e6.tar.gz |
Remove the requirement that a LIB_DEPENDS name must have any '.'
characters escaped with a backslash, but recognise the backslashes for
backwards compatibility. When matching names, do any escaping of
the regexp '.' metacharacter automatically, if needed.
When a shared object dependency is printed out, use a form that does
not have the backslashes in it, for readability.
Print out the full pathname of the matching shared object, for clarity.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 31 | ||||
-rw-r--r-- | mk/bsd.port.mk | 31 |
2 files changed, 38 insertions, 24 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 31f14fccbec..7e26fea1617 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.pkg.mk,v 1.41 1998/01/28 15:36:31 hubertf Exp $ +# $NetBSD: bsd.pkg.mk,v 1.42 1998/01/30 13:53:53 agc Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -188,10 +188,13 @@ NetBSD_MAINTAINER= agc@netbsd.org # LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package # depends on. "lib" is the name of a shared library. # make will use "ldconfig -r" to search for the -# library. Note that lib can be any regular expression, -# and you need two backslashes in front of dots (.) to -# supress its special meaning (e.g., use -# "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). +# library. Note that lib can be any regular expression. +# In older versions of this file, you need two backslashes +# in front of dots (.) to supress its special meaning (e.g., +# use "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). +# No special backslashes are needed to escape regular +# expression metacharacters in NetBSD, and the old backslash +# escapes are recognised for backwards compatibility. # DEPENDS - A list of other ports this package depends on being # made first. Use this for things that don't fall into # the above two categories. @@ -1664,7 +1667,7 @@ lib-depends: .if defined(LIB_DEPENDS) .if !defined(NO_DEPENDS) @for i in ${LIB_DEPENDS}; do \ - lib=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ + lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ if expr "$$dir" : '.*:' > /dev/null; then \ target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ @@ -1672,17 +1675,19 @@ lib-depends: else \ target=${DEPENDS_TARGET}; \ fi; \ - if ${LDCONFIG} -r | ${GREP} -q -e "-l$$lib"; then \ - ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - found"; \ - else \ - ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - not found"; \ - ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \ + libname=`${ECHO} $$lib | ${SED} -e 's|\\\\||g'`; \ + reallib=`${LDCONFIG} -r | ${GREP} -e "-l$$lib" | awk '{ print $$3 }'`; \ + if [ "X$$reallib" = X"" ]; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$libname - not found"; \ + ${ECHO_MSG} "===> Verifying $$target for $$libname in $$dir"; \ if [ ! -d "$$dir" ]; then \ - ${ECHO_MSG} ">> No directory for $$lib. Skipping.."; \ + ${ECHO_MSG} ">> No directory for $$libname. Skipping.."; \ else \ (cd $$dir; ${MAKE} ${.MAKEFLAGS} $$target) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$libname - $$reallib found"; \ fi; \ done .endif @@ -1690,6 +1695,8 @@ lib-depends: @${DO_NADA} .endif + + misc-depends: .if defined(DEPENDS) .if !defined(NO_DEPENDS) diff --git a/mk/bsd.port.mk b/mk/bsd.port.mk index 3aba09267a8..db8856ee97e 100644 --- a/mk/bsd.port.mk +++ b/mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.port.mk,v 1.41 1998/01/28 15:36:31 hubertf Exp $ +# $NetBSD: bsd.port.mk,v 1.42 1998/01/30 13:53:53 agc Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -188,10 +188,13 @@ NetBSD_MAINTAINER= agc@netbsd.org # LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package # depends on. "lib" is the name of a shared library. # make will use "ldconfig -r" to search for the -# library. Note that lib can be any regular expression, -# and you need two backslashes in front of dots (.) to -# supress its special meaning (e.g., use -# "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). +# library. Note that lib can be any regular expression. +# In older versions of this file, you need two backslashes +# in front of dots (.) to supress its special meaning (e.g., +# use "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). +# No special backslashes are needed to escape regular +# expression metacharacters in NetBSD, and the old backslash +# escapes are recognised for backwards compatibility. # DEPENDS - A list of other ports this package depends on being # made first. Use this for things that don't fall into # the above two categories. @@ -1664,7 +1667,7 @@ lib-depends: .if defined(LIB_DEPENDS) .if !defined(NO_DEPENDS) @for i in ${LIB_DEPENDS}; do \ - lib=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ + lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ if expr "$$dir" : '.*:' > /dev/null; then \ target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ @@ -1672,17 +1675,19 @@ lib-depends: else \ target=${DEPENDS_TARGET}; \ fi; \ - if ${LDCONFIG} -r | ${GREP} -q -e "-l$$lib"; then \ - ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - found"; \ - else \ - ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - not found"; \ - ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \ + libname=`${ECHO} $$lib | ${SED} -e 's|\\\\||g'`; \ + reallib=`${LDCONFIG} -r | ${GREP} -e "-l$$lib" | awk '{ print $$3 }'`; \ + if [ "X$$reallib" = X"" ]; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$libname - not found"; \ + ${ECHO_MSG} "===> Verifying $$target for $$libname in $$dir"; \ if [ ! -d "$$dir" ]; then \ - ${ECHO_MSG} ">> No directory for $$lib. Skipping.."; \ + ${ECHO_MSG} ">> No directory for $$libname. Skipping.."; \ else \ (cd $$dir; ${MAKE} ${.MAKEFLAGS} $$target) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$libname - $$reallib found"; \ fi; \ done .endif @@ -1690,6 +1695,8 @@ lib-depends: @${DO_NADA} .endif + + misc-depends: .if defined(DEPENDS) .if !defined(NO_DEPENDS) |