1996-05-20 23:10:28 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-03-27 01:58:17 +03:00
|
|
|
# $NetBSD: makeflist,v 1.43 2002/03/26 22:58:17 fredette 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}
|
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`
|
|
|
|
tc=`${MAKE} print_use_new_toolchain`
|
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-02-11 19:23:17 +03:00
|
|
|
xlists=
|
|
|
|
for xlist in xbase xcomp xcontrib xfont xserver xmisc
|
|
|
|
do
|
|
|
|
if [ -z "$xlists" ]
|
|
|
|
then
|
|
|
|
xlists=$xlist
|
|
|
|
else
|
|
|
|
xlists="$xlists $xlist"
|
|
|
|
fi
|
|
|
|
if [ -d "$setd/lists/$xlist${x11_version}" ]
|
|
|
|
then
|
|
|
|
xlists="$xlists $xlist${x11_version}"
|
|
|
|
fi
|
|
|
|
done
|
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=
|
2001-11-24 05:54:50 +03:00
|
|
|
if [ "$machine" = "sparc64" -o "$machine_cpu" = "sh3" -o \
|
|
|
|
"$machine_arch" = "m68000" ]; then
|
2001-08-19 17:15:18 +04:00
|
|
|
lintlibs=no
|
|
|
|
fi
|
|
|
|
|
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
|
2001-11-24 05:54:50 +03:00
|
|
|
if [ "$machine" != "$machine_arch" -a \
|
|
|
|
-f $setd/lists/$setname/ad.${machine_cpu} ]; then
|
|
|
|
cat $setd/lists/$setname/ad.${machine_cpu}
|
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
|
2001-11-19 23:43:33 +03:00
|
|
|
if [ "$tc" = "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
|
|
|
|
else
|
|
|
|
if [ -f $setd/lists/$setname/tc.old ]; then
|
|
|
|
cat $setd/lists/$setname/tc.old
|
|
|
|
fi
|
|
|
|
fi
|
2002-02-27 13:42:55 +03:00
|
|
|
done | awk -- '/^[^#]/ {print $1}' | sort -u
|