Home | History | Annotate | Line # | Download | only in sets
makeflist revision 1.8
      1  1.2    gwr #!/bin/sh
      2  1.2    gwr #
      3  1.8  lukem # $NetBSD: makeflist,v 1.8 1998/06/15 14:45:06 lukem Exp $
      4  1.2    gwr #
      5  1.8  lukem # Print out the files in some or all lists.
      6  1.8  lukem # Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
      7  1.2    gwr #
      8  1.2    gwr 
      9  1.2    gwr # set defaults
     10  1.8  lukem machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | make -s -f-`}
     11  1.8  lukem arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | make -s -f-`}
     12  1.2    gwr setd=`pwd`
     13  1.8  lukem nlists="base comp etc games man misc text"
     14  1.4  veego xlists="xbase xcomp xcontrib xfont xserver"
     15  1.8  lukem lists=$nlists
     16  1.2    gwr 
     17  1.2    gwr # handle args
     18  1.8  lukem while : ; do
     19  1.2    gwr 	case $1 in
     20  1.8  lukem 	-b*)
     21  1.8  lukem 		lists="$xlists $nlists"
     22  1.8  lukem 		;;
     23  1.8  lukem 	-x*)
     24  1.8  lukem 		lists=$xlists
     25  1.8  lukem 		;;
     26  1.8  lukem 	-a*)
     27  1.8  lukem 		arch=$2; shift
     28  1.8  lukem 		;;
     29  1.8  lukem 	-m*)
     30  1.8  lukem 		machine=$2; shift
     31  1.8  lukem 		;;
     32  1.8  lukem 	-s*)
     33  1.8  lukem 		setd=$2; shift
     34  1.8  lukem 		;;
     35  1.8  lukem 	-*)
     36  1.8  lukem 		cat 1>&2 <<USAGE
     37  1.8  lukem Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
     38  1.8  lukem 	-b		make netbsd + x11 lists
     39  1.8  lukem 	-x		only make x11 lists
     40  1.8  lukem 	-a arch		set arch (e.g, m68k, mips, powerpc)	[$arch]
     41  1.8  lukem 	-m machine	set machine (e.g, amiga, i386, macppc)	[$machine]
     42  1.8  lukem 	-s setsdir	directory to find sets	[$setd]
     43  1.8  lukem 	[setname ...]	sets to build 	[$lists]
     44  1.8  lukem USAGE
     45  1.8  lukem 		exit 1
     46  1.8  lukem 		;;
     47  1.8  lukem 	*)
     48  1.8  lukem 		break
     49  1.8  lukem 		;;
     50  1.2    gwr 	esac
     51  1.2    gwr 	shift
     52  1.2    gwr done
     53  1.8  lukem if [ -n "$1" ]; then
     54  1.8  lukem 	lists="$@"
     55  1.8  lukem fi
     56  1.1    cgd 
     57  1.1    cgd # EXTRA SPECIAL (not done here): secr
     58  1.1    cgd 
     59  1.8  lukem for setname in $lists; do
     60  1.8  lukem 	cat $setd/lists/$setname/mi
     61  1.8  lukem 	if [ "$machine" != "$cpu" -a -f $setd/lists/$setname/ad.${arch} ]; then
     62  1.8  lukem 		cat $setd/lists/$setname/ad.${arch}
     63  1.8  lukem 	fi
     64  1.8  lukem 	if [ -f $setd/lists/$setname/md.${machine} ]; then
     65  1.8  lukem 		cat $setd/lists/$setname/md.${machine}
     66  1.8  lukem 	fi
     67  1.8  lukem 
     68  1.8  lukem 	# Split man/md_share into: this machine, other machine
     69  1.2    gwr 	if [ $setname = man ]; then
     70  1.8  lukem 		grep ${machine} $setd/lists/man/md_share
     71  1.2    gwr 	fi
     72  1.2    gwr 	if [ $setname = misc ]; then
     73  1.8  lukem 		grep -v ${machine} $setd/lists/man/md_share
     74  1.2    gwr 	fi
     75  1.8  lukem done | sort -u
     76