1 #!/bin/sh 2 # $NetBSD: compare-lib-lists,v 1.2 2019/11/18 16:09:21 christos Exp $ 3 # 4 # Q+D script to print the library lists for comparison between whats in the 5 # bsd.prog.mk file and bsd.README 6 7 prog=$(basename "$0") 8 9 RD=/tmp/${prog}.rd.$$ 10 MK=/tmp/${prog}.mk.$$ 11 IN=/tmp/${prog}.in.$$ 12 13 trap "rm -f ${MK} ${RD} ${IN}" 0 1 2 3 15 14 15 make -f - all << \EOF > ${MK} 16 .include <bsd.prog.mk> 17 18 all: 19 .for l in ${_LIBLIST} 20 @echo $l 21 .endfor 22 .for l in crt0.o crti.o crti.o crtn.o 23 @echo $l 24 .endfor 25 .for l in ${_X11LIBLIST} 26 @echo $l 27 .endfor 28 EOF 29 30 grep ' LIB' bsd.README | \ 31 grep DESTDIR | \ 32 sed -e 's/.*lib\([a-zA-Z0-9_+\-]*\)\.a$/\1/' > ${RD} 33 34 paste ${MK} ${RD} 35 36 echo "------" 37 echo "Not installed" 38 39 cat << \EOF | make -f - xall > ${IN} 40 .include <bsd.prog.mk> 41 42 xall: 43 .for _lib in ${_LIBLIST} 44 @echo ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a 45 .endfor 46 .for _lib in ${_X11LIBLIST} 47 @echo ${DESTDIR}${X11USRLIBDIR}/lib${_lib}.a 48 .endfor 49 EOF 50 for i in ${IN}; do 51 if [ ! -f $i ]; then 52 echo $i 53 fi 54 done 55