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.)
This commit is contained in:
bde 1998-03-14 14:08:29 +00:00
parent b85d830b23
commit 1dbe6d5685

View File

@ -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 <bsd.obj.mk> 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