diff options
author | asami <asami@FreeBSD.org> | 1995-11-26 12:35:49 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1995-11-26 12:35:49 +0000 |
commit | b8ab221e618fe49890ad8957fbda39afcb430b27 (patch) | |
tree | cb6084715f67ccf69dac1bdcd18359958cd9d60f | |
parent | 89df1f9a0fd18e8d5d618b59a98b28cc4bd42319 (diff) | |
download | FreeBSD-ports-b8ab221e618fe49890ad8957fbda39afcb430b27.zip FreeBSD-ports-b8ab221e618fe49890ad8957fbda39afcb430b27.tar.gz |
Make the {FETCH,BUILD,RUN}_DEPEND targets work with non-executable files
too. Basically, if the name starts with a "/", it's tested with "test -e";
otherwise, it's tested with "witch -s".
Reviewed by: the ports list (well at least nobody complained)
-rw-r--r-- | Mk/bsd.port.mk | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 1d7340b..408996d 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -3,7 +3,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.186 1995/10/17 20:58:08 asami Exp $ +# $Id: bsd.port.mk,v 1.187 1995/11/17 16:49:40 asami Exp $ # # Please view me with 4 column tabs! @@ -1005,16 +1005,34 @@ _DEPENDS_USE: .USE @for i in ${DEPENDS_TMP}; do \ prog=`/bin/echo $$i | /usr/bin/sed -e 's/:.*//'`; \ dir=`/bin/echo $$i | /usr/bin/sed -e 's/.*://'`; \ - ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog ($$dir)"; \ + if expr "$$prog" : \\/ >/dev/null; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog ($$dir)"; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog ($$dir)"; \ + fi; \ done .else @for i in ${DEPENDS_TMP}; do \ prog=`/bin/echo $$i | /usr/bin/sed -e 's/:.*//'`; \ dir=`/bin/echo $$i | /usr/bin/sed -e 's/.*://'`; \ - if which -s "$$prog"; then \ - ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ + if expr "$$prog" : \\/ >/dev/null; then \ + if [ -e "$$prog" ]; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \ + notfound=0; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - not found"; \ + notfound=1; \ + fi; \ else \ - ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - not found"; \ + if which -s "$$prog"; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ + notfound=0; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - not found"; \ + notfound=1; \ + fi; \ + fi; \ + if [ $$notfound != 0 ]; then \ ${ECHO_MSG} "===> Verifying build for $$prog in $$dir"; \ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} ">> No directory for $$prog. Skipping.."; \ |