Home | History | Annotate | Line # | Download | only in mk
compare-lib-lists revision 1.1
      1 #!/bin/sh
      2 # $NetBSD: compare-lib-lists,v 1.1 2019/08/10 12:50:36 christos Exp $
      3 #
      4 # Q+D script to print the library lists for compariston 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 
     12 trap "rm -f ${MK} ${RD}" 0 1 2 3 15
     13 
     14 make -f - all << \EOF > ${MK}
     15 .include <bsd.prog.mk>
     16 
     17 all:
     18 .for l in ${_LIBLIST}
     19 	@echo $l
     20 .endfor
     21 .for l in crt0.o crti.o crti.o crtn.o
     22 	@echo $l
     23 .endfor
     24 .for l in ${_X11LIBLIST}
     25 	@echo $l
     26 .endfor
     27 EOF
     28 
     29 grep '	LIB' bsd.README | \
     30     grep DESTDIR | \
     31     sed -e 's/.*lib\([a-zA-Z0-9_+\-]*\)\.a$/\1/' > ${RD}
     32 
     33 paste ${MK} ${RD}
     34