diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 31729bbac174..bf996d52fafd 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -150,3 +150,25 @@ cleandepend: .endif .endif .endif + +.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD)) +checkdpadd: +.if ${OBJFORMAT} != aout + @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 -> $$ldadd" ; \ + echo "LDADD -> $$ldadd1" ; \ + fi +.else + @dpadd=`echo \`ld -Bstatic -f ${LDADD}\`` ; \ + if [ "$$dpadd" != "${DPADD}" ] ; then \ + echo ${.CURDIR} ; \ + echo "LDADD -> $$dpadd" ; \ + echo "DPADD = ${DPADD}" ; \ + fi +.endif +.endif diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index 77b8ee174e9e..3551053124aa 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -126,31 +126,6 @@ clean: .endif .endif -.if !target(checkdpadd) -checkdpadd: -.if (defined(DPADD) || defined(LDADD)) -checkdpadd: -.if ${OBJFORMAT} != aout - @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 -> $$ldadd" ; \ - echo "LDADD -> $$ldadd1" ; \ - fi -.else - @dpadd=`echo \`ld -Bstatic -f ${LDADD}\`` ; \ - if [ "$$dpadd" != "${DPADD}" ] ; then \ - echo ${.CURDIR} ; \ - echo "LDADD -> $$dpadd" ; \ - echo "DPADD = ${DPADD}" ; \ - fi -.endif -.endif -.endif - cleandir: cleanobj DISTRIBUTION?= base