1996-05-20 23:10:28 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2000-01-23 23:31:17 +03:00
|
|
|
# $NetBSD: makeflist,v 1.20 2000/01/23 20:31:17 jwise Exp $
|
1996-05-20 23:10:28 +04:00
|
|
|
#
|
1998-06-15 18:45:05 +04:00
|
|
|
# Print out the files in some or all lists.
|
|
|
|
# Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
|
1996-05-20 23:10:28 +04:00
|
|
|
#
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1996-05-20 23:10:28 +04:00
|
|
|
# set defaults
|
1999-02-13 10:59:45 +03:00
|
|
|
: ${MAKE=make}
|
|
|
|
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`}
|
|
|
|
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`}
|
1996-05-20 23:10:28 +04:00
|
|
|
setd=`pwd`
|
1998-06-15 18:45:05 +04:00
|
|
|
nlists="base comp etc games man misc text"
|
1997-10-28 20:29:45 +03:00
|
|
|
xlists="xbase xcomp xcontrib xfont xserver"
|
1998-06-15 18:45:05 +04:00
|
|
|
lists=$nlists
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1996-05-20 23:10:28 +04:00
|
|
|
# handle args
|
1998-06-15 18:45:05 +04:00
|
|
|
while : ; do
|
1996-05-20 23:10:28 +04:00
|
|
|
case $1 in
|
1998-07-22 21:01:43 +04:00
|
|
|
-d*)
|
|
|
|
nlists="$nlists secr"
|
|
|
|
lists=$nlists
|
|
|
|
;;
|
1999-11-27 16:10:45 +03:00
|
|
|
-i*)
|
|
|
|
nlists="$nlists cryptint"
|
|
|
|
lists=$nlists
|
|
|
|
;;
|
1998-06-15 18:45:05 +04:00
|
|
|
-b*)
|
|
|
|
lists="$xlists $nlists"
|
|
|
|
;;
|
|
|
|
-x*)
|
|
|
|
lists=$xlists
|
|
|
|
;;
|
|
|
|
-a*)
|
|
|
|
arch=$2; shift
|
|
|
|
;;
|
|
|
|
-m*)
|
|
|
|
machine=$2; shift
|
|
|
|
;;
|
|
|
|
-s*)
|
|
|
|
setd=$2; shift
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
cat 1>&2 <<USAGE
|
|
|
|
Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
|
|
|
|
-b make netbsd + x11 lists
|
1998-07-22 21:01:43 +04:00
|
|
|
-d do domestic ("secr") sets
|
1999-11-27 16:10:45 +03:00
|
|
|
-i do international crypto ("cryptint") sets
|
1998-06-15 18:45:05 +04:00
|
|
|
-x only make x11 lists
|
|
|
|
-a arch set arch (e.g, m68k, mips, powerpc) [$arch]
|
|
|
|
-m machine set machine (e.g, amiga, i386, macppc) [$machine]
|
|
|
|
-s setsdir directory to find sets [$setd]
|
|
|
|
[setname ...] sets to build [$lists]
|
|
|
|
USAGE
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
1996-05-20 23:10:28 +04:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
1998-06-15 18:45:05 +04:00
|
|
|
if [ -n "$1" ]; then
|
|
|
|
lists="$@"
|
|
|
|
fi
|
1994-08-29 19:21:02 +04:00
|
|
|
|
1999-03-29 05:20:42 +04:00
|
|
|
# Convert mipse[lb] to mips after processing command line arguments.
|
|
|
|
arch=`echo $arch | sed s,^mipse.,mips,`
|
|
|
|
|
1998-07-02 10:36:35 +04:00
|
|
|
# Compute toolchain used on target cpu.
|
1999-07-05 00:07:51 +04:00
|
|
|
if [ "$arch" = "mips" -o "$machine" = "alpha" -o "$arch" = "powerpc" -o "$arch" = "sparc" -o "$arch" = "i386" ]; then
|
1998-07-02 10:36:35 +04:00
|
|
|
shlib=elf
|
|
|
|
else
|
|
|
|
shlib=aout
|
|
|
|
fi
|
|
|
|
|
1998-06-15 18:45:05 +04:00
|
|
|
for setname in $lists; do
|
2000-01-23 23:31:17 +03:00
|
|
|
awk -- '{print $1}' $setd/lists/$setname/mi
|
1998-06-15 18:45:05 +04:00
|
|
|
if [ "$machine" != "$cpu" -a -f $setd/lists/$setname/ad.${arch} ]; then
|
2000-01-23 23:31:17 +03:00
|
|
|
awk -- '{print $1}' $setd/lists/$setname/ad.${arch}
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/md.${machine} ]; then
|
2000-01-23 23:31:17 +03:00
|
|
|
awk -- '{print $1}' $setd/lists/$setname/md.${machine}
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
1998-07-02 10:36:35 +04:00
|
|
|
if [ "$shlib" != "" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/shl.mi ]; then
|
2000-01-23 23:31:17 +03:00
|
|
|
awk -- '{print $1}' $setd/lists/$setname/shl.mi
|
1998-07-02 10:36:35 +04:00
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/shl.${shlib} ]; then
|
2000-01-23 23:31:17 +03:00
|
|
|
awk -- '{print $1}' $setd/lists/$setname/shl.${shlib}
|
1998-07-02 10:36:35 +04:00
|
|
|
fi
|
|
|
|
fi
|
1998-06-15 18:45:05 +04:00
|
|
|
|
|
|
|
# Split man/md_share into: this machine, other machine
|
1996-05-20 23:10:28 +04:00
|
|
|
if [ $setname = man ]; then
|
1998-06-15 18:45:05 +04:00
|
|
|
grep ${machine} $setd/lists/man/md_share
|
1996-05-20 23:10:28 +04:00
|
|
|
fi
|
|
|
|
if [ $setname = misc ]; then
|
1998-06-15 18:45:05 +04:00
|
|
|
grep -v ${machine} $setd/lists/man/md_share
|
1996-05-20 23:10:28 +04:00
|
|
|
fi
|
1999-11-27 16:10:45 +03:00
|
|
|
|
1999-04-19 06:33:40 +04:00
|
|
|
done | egrep -v '^#' | sort -u
|