1996-05-20 23:10:28 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-11-26 02:29:54 +03:00
|
|
|
# $NetBSD: makeflist,v 1.55 2002/11/25 23:29:54 lukem 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
|
2002-11-26 02:29:54 +03:00
|
|
|
MAKE="${MAKE:-make} -j 1 -f `dirname $0`/Makefile"
|
2001-11-24 05:54:50 +03:00
|
|
|
machine=`${MAKE} print_machine`
|
|
|
|
machine_arch=`${MAKE} print_machine_arch`
|
|
|
|
machine_cpu=`${MAKE} print_machine_cpu`
|
|
|
|
object_fmt=`${MAKE} print_object_fmt`
|
2002-09-20 02:04:34 +04:00
|
|
|
toolchain_missing=`${MAKE} print_toolchain_missing`
|
2002-02-11 19:23:17 +03:00
|
|
|
x11_version=`${MAKE} print_x11_version`
|
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"
|
2002-04-08 21:18:22 +04:00
|
|
|
xlists="xbase xcomp xcontrib xfont xserver xmisc"
|
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-06-15 18:45:05 +04:00
|
|
|
-b*)
|
|
|
|
lists="$xlists $nlists"
|
|
|
|
;;
|
|
|
|
-x*)
|
|
|
|
lists=$xlists
|
|
|
|
;;
|
|
|
|
-a*)
|
2001-11-24 05:54:50 +03:00
|
|
|
machine_arch=`MACHINE_ARCH=${2} ${MAKE} print_machine_arch`
|
|
|
|
machine_cpu=`MACHINE_ARCH=${2} ${MAKE} print_machine_cpu`
|
|
|
|
shift
|
1998-06-15 18:45:05 +04:00
|
|
|
;;
|
|
|
|
-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
|
|
|
|
-x only make x11 lists
|
2001-11-24 06:06:17 +03:00
|
|
|
-a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_arch]
|
2001-11-24 05:54:50 +03:00
|
|
|
-m machine set machine (e.g, amiga, i386, macppc) [$machine]
|
|
|
|
-s setsdir directory to find sets [$setd]
|
|
|
|
[setname ...] sets to build [$lists]
|
1998-06-15 18:45:05 +04:00
|
|
|
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
|
|
|
|
2002-03-27 01:58:17 +03:00
|
|
|
# Determine lib type.
|
2001-11-24 05:54:50 +03:00
|
|
|
if [ "$object_fmt" = "ELF" ]; then
|
2001-01-04 14:15:32 +03:00
|
|
|
shlib=elf
|
1998-07-02 10:36:35 +04:00
|
|
|
else
|
2001-11-24 05:54:50 +03:00
|
|
|
shlib=aout
|
1998-07-02 10:36:35 +04:00
|
|
|
fi
|
2002-03-27 01:58:17 +03:00
|
|
|
stlib=$shlib
|
|
|
|
|
|
|
|
# Turn off shlibs for some ports.
|
|
|
|
if [ "$machine_cpu" = "sh3" -o "$machine_arch" = "m68000" ]; then
|
|
|
|
shlib=no
|
|
|
|
fi
|
1998-07-02 10:36:35 +04:00
|
|
|
|
2001-08-19 17:15:18 +04:00
|
|
|
# Turn off lintlibs for some ports.
|
|
|
|
lintlibs=
|
2002-05-02 19:59:10 +04:00
|
|
|
if [ "$machine" = "x86_64" ]; then
|
2001-08-19 17:15:18 +04:00
|
|
|
lintlibs=no
|
|
|
|
fi
|
|
|
|
|
2002-04-08 21:18:22 +04:00
|
|
|
# Automatically add XFree86 version specific sets
|
|
|
|
for list in $lists
|
|
|
|
do
|
|
|
|
if [ -z "$_lists" ]
|
|
|
|
then
|
|
|
|
_lists=$list
|
|
|
|
else
|
|
|
|
_lists="$_lists $list"
|
|
|
|
fi
|
|
|
|
if [ -d "$setd/lists/$list${x11_version}" ]
|
|
|
|
then
|
|
|
|
_lists="$_lists $list${x11_version}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
lists=$_lists
|
|
|
|
unset _lists
|
|
|
|
|
1998-06-15 18:45:05 +04:00
|
|
|
for setname in $lists; do
|
2001-01-17 09:28:12 +03:00
|
|
|
cat $setd/lists/$setname/mi
|
2002-07-18 03:34:20 +04:00
|
|
|
if [ "$machine" != "$machine_arch" ]; then
|
2002-08-10 06:01:00 +04:00
|
|
|
# Prefer an ad.${machine_arch} over an ad.${machine_cpu},
|
|
|
|
# since the arch-specific one will be more specific than
|
|
|
|
# the cpu-specific one.
|
|
|
|
if [ -f $setd/lists/$setname/ad.${machine_arch} ]; then
|
|
|
|
cat $setd/lists/$setname/ad.${machine_arch}
|
|
|
|
elif [ -f $setd/lists/$setname/ad.${machine_cpu} ]; then
|
2002-07-18 03:34:20 +04:00
|
|
|
cat $setd/lists/$setname/ad.${machine_cpu}
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" -a \
|
|
|
|
-f $setd/lists/$setname/ad.${machine_cpu}.shl ]; then
|
|
|
|
cat $setd/lists/$setname/ad.${machine_cpu}.shl
|
|
|
|
fi
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/md.${machine} ]; then
|
2001-01-17 09:28:12 +03:00
|
|
|
cat $setd/lists/$setname/md.${machine}
|
1998-06-15 18:45:05 +04:00
|
|
|
fi
|
2002-03-27 01:58:17 +03:00
|
|
|
if [ -f $setd/lists/$setname/stl.mi ]; then
|
|
|
|
cat $setd/lists/$setname/stl.mi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/stl.${stlib} ]; then
|
|
|
|
cat $setd/lists/$setname/stl.${stlib}
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
1998-07-02 10:36:35 +04:00
|
|
|
if [ -f $setd/lists/$setname/shl.mi ]; then
|
2001-01-17 09:28:12 +03:00
|
|
|
cat $setd/lists/$setname/shl.mi
|
1998-07-02 10:36:35 +04:00
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/shl.${shlib} ]; then
|
2001-01-17 09:28:12 +03:00
|
|
|
cat $setd/lists/$setname/shl.${shlib}
|
1998-07-02 10:36:35 +04:00
|
|
|
fi
|
|
|
|
fi
|
2001-08-19 17:15:18 +04:00
|
|
|
if [ "$lintlibs" != no ]; then
|
|
|
|
if [ -f $setd/lists/$setname/lint.mi ]; then
|
|
|
|
cat $setd/lists/$setname/lint.mi
|
|
|
|
fi
|
|
|
|
fi
|
2002-09-20 02:04:34 +04:00
|
|
|
if [ "$toolchain_missing" != "yes" ]; then
|
2001-10-20 10:11:21 +04:00
|
|
|
if [ -f $setd/lists/$setname/tc.mi ]; then
|
|
|
|
cat $setd/lists/$setname/tc.mi
|
|
|
|
fi
|
2002-05-05 05:24:24 +04:00
|
|
|
if [ "$shlib" != "no" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/tc.shl ]; then
|
2002-05-07 03:38:47 +04:00
|
|
|
cat $setd/lists/$setname/tc.shl
|
2002-05-05 05:24:24 +04:00
|
|
|
fi
|
|
|
|
fi
|
2001-10-20 10:11:21 +04:00
|
|
|
fi
|
2002-10-09 05:22:37 +04:00
|
|
|
|
|
|
|
# XXX MIPS does not support rescue right now.
|
|
|
|
if [ ${machine_cpu} = "mips" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $setd/lists/$setname/rescue.mi ]; then
|
|
|
|
cat $setd/lists/$setname/rescue.mi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/rescue.${machine} ]; then
|
|
|
|
cat $setd/lists/$setname/rescue.${machine}
|
|
|
|
fi
|
|
|
|
if [ "$machine" != "$machine_arch" ]; then
|
|
|
|
# Prefer a rescue.ad.${machine_arch} over a
|
|
|
|
# rescue.ad.${machine_cpu}, since the arch-
|
|
|
|
# specific one will be more specific than the
|
|
|
|
# cpu-specific one.
|
|
|
|
if [ -f $setd/lists/$setname/rescue.ad.${machine_arch} ]; then
|
|
|
|
cat $setd/lists/$setname/rescue.ad.${machine_arch}
|
|
|
|
elif [ -f $setd/lists/$setname/rescue.ad.${machine_cpu} ]; then
|
|
|
|
cat $setd/lists/$setname/rescue.ad.${machine_cpu}
|
|
|
|
fi
|
2002-10-11 00:46:39 +04:00
|
|
|
if [ "$shlib" != "no" -a -f \
|
|
|
|
$setd/lists/$setname/rescue.ad.${machine_cpu}.shl ]; then
|
2002-10-09 05:22:37 +04:00
|
|
|
cat $setd/lists/$setname/rescue.ad.${machine_cpu}.shl
|
|
|
|
fi
|
|
|
|
fi
|
2002-02-27 13:42:55 +03:00
|
|
|
done | awk -- '/^[^#]/ {print $1}' | sort -u
|