Compare libraries that the bsd.prog.mk "knows about" vs the ones we actually

install... Yes, pretty bad right now.
This commit is contained in:
christos 2019-11-18 16:23:28 +00:00
parent 4d3961b8b8
commit 249752ac15
1 changed files with 13 additions and 10 deletions

View File

@ -1,16 +1,20 @@
#!/bin/sh
# $NetBSD: compare-lib-lists,v 1.2 2019/11/18 16:09:21 christos Exp $
# $NetBSD: compare-lib-lists,v 1.3 2019/11/18 16:23:28 christos Exp $
#
# Q+D script to print the library lists for comparison between whats in the
# bsd.prog.mk file and bsd.README
# bsd.prog.mk file and bsd.README (this matches)
#
# Also compare the list of LIB variables we create against the actually
# installed archives (this does *not* match -- yet)
prog=$(basename "$0")
RD=/tmp/${prog}.rd.$$
MK=/tmp/${prog}.mk.$$
IN=/tmp/${prog}.in.$$
LB=/tmp/${prog}.lb.$$
trap "rm -f ${MK} ${RD} ${IN}" 0 1 2 3 15
trap "rm -f ${MK} ${RD} ${IN} ${LB}" 0 1 2 3 15
make -f - all << \EOF > ${MK}
.include <bsd.prog.mk>
@ -34,9 +38,8 @@ grep ' LIB' bsd.README | \
paste ${MK} ${RD}
echo "------"
echo "Not installed"
cat << \EOF | make -f - xall > ${IN}
cat << \EOF | make -f - xall | sort > ${IN}
.include <bsd.prog.mk>
xall:
@ -47,8 +50,8 @@ xall:
@echo ${DESTDIR}${X11USRLIBDIR}/lib${_lib}.a
.endfor
EOF
for i in ${IN}; do
if [ ! -f $i ]; then
echo $i
fi
done
ls -1 /usr/lib/*.a /usr/X11R7/lib/*.a | \
egrep -v '(_p|_pic|_g)\.a' | sort > ${LB}
paste ${IN} ${LB}