3 # $NetBSD: makeflist,v 1.75 2009/11/30 16:13:23 uebayasi Exp $
5 # Print out the files in some or all lists.
6 # Usage: makeflist [-bxlo] [-a arch] [-m machine] [-s setsdir] [setname ...]
9 rundir
="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
10 .
"${rundir}/sets.subr"
16 Usage: ${0##*/} [-L base,x,ext] [-bxyo] [-a arch] [-m machine] [-s setsdir] [setname [...]]
17 -L base,x,ext print specified lists
18 -b print netbsd + x11 lists
19 -x print make x11 lists
20 -y print make extsrc lists
21 -l just list the selected set names, not the contents
22 -o only match obsolete files
23 -a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [${MACHINE_ARCH}]
24 -m machine set machine (e.g, amiga, i386, macppc) [${MACHINE}]
25 -s setsdir directory to find sets [${setsdir}]
26 [setname [...]] sets to build [${lists}]
32 while getopts L
:bxXloa
:m
:s
: ch
; do
37 for _list
in ${OPTARG}; do
39 base
) lists
="${lists} ${nlists}" ;;
40 x
) lists
="${lists} ${xlists}" ;;
41 ext
) lists
="${lists} ${extlists}" ;;
48 lists
="${nlists} ${xlists}"
63 MACHINE_ARCH
="${OPTARG}"
64 MACHINE_CPU
="$(arch_to_cpu "${OPTARG}")"
77 shift $
((${OPTIND} - 1))
82 if [ -n "${listonly}" ]; then
83 echo ${lists} |
tr ' ' '\n'
87 list_set_files
${lists:-${nlists}} | ${AWK} '{print $1}' | ${SORT} -u