From 1dbe6d5685b022622da4cc0412f4a5ee5ff94182 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 14 Mar 1998 14:08:29 +0000 Subject: [PATCH] Improved comparison of ${DPADD} with ${LDADD} for the checkdpadd target. `BINFORMAT=foo make checkdpadd' in /usr/src now reports only 2 false negatives (in libss and init). (BINFORMAT=foo is to turn off better handling of the a.out case.) --- share/mk/bsd.obj.mk | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index da0d8b45318a..d1cc96bf5a21 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -1,4 +1,4 @@ -# $Id: bsd.obj.mk,v 1.21 1997/12/19 18:48:45 bde Exp $ +# $Id: bsd.obj.mk,v 1.22 1998/02/25 02:48:28 bde Exp $ # # The include file handles creating the 'obj' directory # and cleaning up object files, etc. @@ -133,17 +133,21 @@ checkdpadd: _SUBDIR .if (defined(DPADD) || defined(LDADD)) checkdpadd: .if ${BINFORMAT} != aout - @if [ "${DPADD:S;^/usr/lib/lib;-l;S;.a$;;}" != "${LDADD}" ] ; then \ + @ldadd=`echo \`for lib in ${DPADD} ; do \ + echo $$lib | sed 's;^/usr/lib/lib\(.*\)\.a;-l\1;' ; \ + done \`` ; \ + ldadd1=`echo ${LDADD}` ; \ + if [ "$$ldadd" != "$$ldadd1" ] ; then \ echo ${.CURDIR} ; \ - echo "DPADD -> " ${DPADD:S;^/usr/lib/lib;-l;S;.a$;;} ; \ - echo "LDADD = " ${LDADD} ; \ + echo "DPADD -> $$ldadd" ; \ + echo "LDADD -> $$ldadd1" ; \ fi .else @dpadd=`echo \`ld -Bstatic -f ${LDDESTDIR} ${LDADD}\`` ; \ if [ "$$dpadd" != "${DPADD}" ] ; then \ echo ${.CURDIR} ; \ - echo "LDADD -> " $$dpadd ; \ - echo "DPADD = " ${DPADD} ; \ + echo "LDADD -> $$dpadd" ; \ + echo "DPADD = ${DPADD}" ; \ fi .endif .endif