mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
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
This commit is contained in:
parent
b3655267ff
commit
2e3c617921
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117195
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue