compare-lib-lists revision 1.2
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 7prog=$(basename "$0") 8 9RD=/tmp/${prog}.rd.$$ 10MK=/tmp/${prog}.mk.$$ 11IN=/tmp/${prog}.in.$$ 12 13trap "rm -f ${MK} ${RD} ${IN}" 0 1 2 3 15 14 15make -f - all << \EOF > ${MK} 16.include <bsd.prog.mk> 17 18all: 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 28EOF 29 30grep ' LIB' bsd.README | \ 31 grep DESTDIR | \ 32 sed -e 's/.*lib\([a-zA-Z0-9_+\-]*\)\.a$/\1/' > ${RD} 33 34paste ${MK} ${RD} 35 36echo "------" 37echo "Not installed" 38 39cat << \EOF | make -f - xall > ${IN} 40.include <bsd.prog.mk> 41 42xall: 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 49EOF 50for i in ${IN}; do 51 if [ ! -f $i ]; then 52 echo $i 53 fi 54done 55