head	1.3;
access;
symbols
	netbsd-10-2-RELEASE:1.3
	netbsd-11-0-RELEASE:1.3
	netbsd-11-0-RC7:1.3
	netbsd-11-0-RC6:1.3
	netbsd-11-0-RC5:1.3
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.14
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.12
	perseant-exfatfs-base:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.10
	netbsd-10-base:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.8
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	cjep_staticlib_x:1.3.0.6
	cjep_staticlib_x-base:1.3
	phil-wifi-20200421:1.3
	phil-wifi:1.3.0.4
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.2
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	phil-wifi-20191119:1.3;
locks; strict;
comment	@# @;


1.3
date	2019.11.18.16.23.28;	author christos;	state Exp;
branches
	1.3.4.1;
next	1.2;
commitid	wnRRkjLS1UqyQlLB;

1.2
date	2019.11.18.16.09.21;	author christos;	state Exp;
branches;
next	1.1;
commitid	0JI9d6CgHsEHLlLB;

1.1
date	2019.08.10.12.50.36;	author christos;	state Exp;
branches;
next	;
commitid	HLwAFqvfN1YTStyB;

1.3.4.1
date	2019.11.18.16.23.28;	author martin;	state dead;
branches;
next	1.3.4.2;
commitid	X01YhRUPVUDaec4C;

1.3.4.2
date	2020.04.13.08.03.26;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.3
log
@Compare libraries that the bsd.prog.mk "knows about" vs the ones we actually
install... Yes, pretty bad right now.
@
text
@#!/bin/sh
# $NetBSD: compare-lib-lists,v 1.2 2019/11/18 16:09:21 christos Exp $
#
# Q+D script to print the library lists for comparison between whats in the
# 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} ${LB}" 0 1 2 3 15

make -f - all << \EOF > ${MK}
.include <bsd.prog.mk>

all:
.for l in ${_LIBLIST}
	@@echo $l
.endfor
.for l in crt0.o crti.o crti.o crtn.o
	@@echo $l
.endfor
.for l in ${_X11LIBLIST}
	@@echo $l
.endfor
EOF

grep '	LIB' bsd.README | \
    grep DESTDIR | \
    sed -e 's/.*lib\([a-zA-Z0-9_+\-]*\)\.a$/\1/' > ${RD}

paste ${MK} ${RD}

echo "------"

cat << \EOF | make -f - xall | sort > ${IN}
.include <bsd.prog.mk>

xall:
.for _lib in ${_LIBLIST}
	@@echo ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a
.endfor
.for _lib in ${_X11LIBLIST}
	@@echo ${DESTDIR}${X11USRLIBDIR}/lib${_lib}.a
.endfor
EOF

ls -1 /usr/lib/*.a /usr/X11R7/lib/*.a | \
    egrep -v '(_p|_pic|_g)\.a' | sort > ${LB}

paste ${IN} ${LB}
@


1.3.4.1
log
@file compare-lib-lists was added on branch phil-wifi on 2020-04-13 08:03:26 +0000
@
text
@d1 57
@


1.3.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@a0 57
#!/bin/sh
# $NetBSD$
#
# Q+D script to print the library lists for comparison between whats in the
# 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} ${LB}" 0 1 2 3 15

make -f - all << \EOF > ${MK}
.include <bsd.prog.mk>

all:
.for l in ${_LIBLIST}
	@@echo $l
.endfor
.for l in crt0.o crti.o crti.o crtn.o
	@@echo $l
.endfor
.for l in ${_X11LIBLIST}
	@@echo $l
.endfor
EOF

grep '	LIB' bsd.README | \
    grep DESTDIR | \
    sed -e 's/.*lib\([a-zA-Z0-9_+\-]*\)\.a$/\1/' > ${RD}

paste ${MK} ${RD}

echo "------"

cat << \EOF | make -f - xall | sort > ${IN}
.include <bsd.prog.mk>

xall:
.for _lib in ${_LIBLIST}
	@@echo ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a
.endfor
.for _lib in ${_X11LIBLIST}
	@@echo ${DESTDIR}${X11USRLIBDIR}/lib${_lib}.a
.endfor
EOF

ls -1 /usr/lib/*.a /usr/X11R7/lib/*.a | \
    egrep -v '(_p|_pic|_g)\.a' | sort > ${LB}

paste ${IN} ${LB}
@


1.2
log
@Improve the script to check for installed libraries, and fix the wrong
names and obsolete libraries it found.
@
text
@d2 1
a2 1
# $NetBSD: compare-lib-lists,v 1.1 2019/08/10 12:50:36 christos Exp $
d5 4
a8 1
# bsd.prog.mk file and bsd.README
d15 1
d17 1
a17 1
trap "rm -f ${MK} ${RD} ${IN}" 0 1 2 3 15
a40 1
echo "Not installed"
d42 1
a42 1
cat << \EOF | make -f - xall > ${IN}
d53 5
a57 5
for i in ${IN}; do
	if [ ! -f $i ]; then
		echo $i
	fi
done
@


1.1
log
@Add a script to compare the library lists so we can keep them in sync easier.
@
text
@d2 1
a2 1
# $NetBSD$
d4 1
a4 1
# Q+D script to print the library lists for compariston between whats in the
d11 1
d13 1
a13 1
trap "rm -f ${MK} ${RD}" 0 1 2 3 15
d35 20
@

