diff options
-rw-r--r-- | share/mk/bsd.dep.mk | 22 | ||||
-rw-r--r-- | share/mk/bsd.obj.mk | 25 |
2 files changed, 22 insertions, 25 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 31729bb..bf996d5 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 77b8ee1..3551053 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 |