summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2003-07-03 11:43:57 +0000
committerbde <bde@FreeBSD.org>2003-07-03 11:43:57 +0000
commit696003930f4cf50aed01980371a7b2d62cbf76c0 (patch)
tree3a7768f9abea35d65793882c17f6251e0eae4383 /share/mk/bsd.dep.mk
parent5e9f899438e08038eff3a114383eba467a477cde (diff)
downloadFreeBSD-src-696003930f4cf50aed01980371a7b2d62cbf76c0.zip
FreeBSD-src-696003930f4cf50aed01980371a7b2d62cbf76c0.tar.gz
Use make(1) instead of a shell script to implement the checkdpadd target.
This is simpler, and is easy to do now that make(1) supports substituting regexps. Fixed missing '$' anchor in the regexp. Use less cryptic names for temporary variables. Submitted by: ru (early version) Reviewed by: ru
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk16
1 files changed, 7 insertions, 9 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 6bdbc2f..e667fc9 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -166,14 +166,12 @@ cleandepend:
.endif
.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD))
+_LDADD_FROM_DPADD= ${DPADD:C;^/usr/lib/lib(.*)\.a$;-l\1;}
+_LDADD_CANONICALIZED= ${LDADD:S/$//}
checkdpadd:
- @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
+.if ${_LDADD_FROM_DPADD} != ${_LDADD_CANONICALIZED}
+ @echo ${.CURDIR}
+ @echo "DPADD -> ${_LDADD_FROM_DPADD}"
+ @echo "LDADD -> ${_LDADD_CANONICALIZED}"
+.endif
.endif
OpenPOWER on IntegriCloud