3 # $NetBSD: makeobsolete,v 1.30 2009/11/30 16:13:23 uebayasi Exp $
5 # Print out the obsolete files for a set
6 # Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \
7 # [-t target] [setname ...]
10 rundir
="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
11 .
"${rundir}/sets.subr"
19 Usage: ${0##*/} [-a arch] [-m machine] [-s setsdir] [setname ...]
20 -L base,x,ext make specified lists
21 -b make netbsd + x11 lists
22 -x only make x11 lists
23 -y only make extsrc lists
24 -a arch set arch (e.g, m68k, mips, powerpc) [${MACHINE_ARCH}]
25 -m machine set machine (e.g, amiga, i386, macppc) [${MACHINE}]
26 -s setsdir directory to find sets [${setd}]
27 -t target target directory [${target}]
28 [setname ...] sets to build
33 while getopts L
:bxya
:m
:s
:t
: ch
; do
38 for _list
in ${OPTARG}; do
40 base
) lists
="${lists} ${nlists}" ;;
41 x
) lists
="${lists} ${xlists}" ;;
42 ext
) lists
="${lists} ${extlists}" ;;
49 lists
="${nlists} ${xlists}"
58 MACHINE_ARCH
="${OPTARG}"
59 MACHINE_CPU
="$(arch_to_cpu "${OPTARG}")"
75 shift $
((${OPTIND} - 1))
80 if [ ! -d "${target}" ]; then
81 echo "target directory [${target}] doesn't exist"
85 for setname
in ${lists:-${nlists}}; do
86 file="${target}/${setname}"
87 list_set_files
"${setname}" | ${AWK} '{print $1}' | \
88 ${SORT} -ru > "${file}"