makeflist revision 1.69
1#!/bin/sh
2#
3# $NetBSD: makeflist,v 1.69 2004/01/03 12:17:31 lukem Exp $
4#
5# Print out the files in some or all lists.
6# Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
7#
8
9. ./sets.subr
10lists=$nlists
11
12usage()
13{
14	cat 1>&2 <<USAGE
15Usage: ${0##*/} [-b] [-x] [-o] [-a arch] [-m machine] [-s setsdir]
16		[setname [...]]
17	-b		print netbsd + x11 lists
18	-x		print make x11 lists
19	-o		only match obsolete files
20	-a arch		set arch (e.g, m68k, mipseb, mipsel, powerpc) [$MACHINE_ARCH]
21	-m machine	set machine (e.g, amiga, i386, macppc) [$MACHINE]
22	-s setsdir	directory to find sets [$setsdir]
23	[setname [...]]	sets to build [$lists]
24USAGE
25	exit 1
26}
27
28# handle args
29while getopts bxoa:m:s: ch; do
30	case ${ch} in
31	b)
32		lists="$xlists $nlists"
33		;;
34	x)
35		lists="$xlists"
36		;;
37	o)
38		obsolete=1
39		;;
40	a)
41		MACHINE_ARCH=${OPTARG}
42		MACHINE_CPU=$(arch_to_cpu ${OPTARG})
43		;;
44	m)
45		MACHINE=${OPTARG}
46		;;
47	s)
48		setsdir=${OPTARG}
49		;;
50	*)
51		usage
52		;;
53	esac
54done
55shift $((${OPTIND} - 1))
56if [ -n "$1" ]; then
57	lists="$@"
58fi
59
60list_set_files $lists | awk '{print $1}' | sort -u
61