1996-05-20 23:10:28 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2003-12-20 01:25:53 +03:00
|
|
|
# $NetBSD: makeflist,v 1.66 2003/12/19 22:25:53 jmc 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
|
2003-11-25 10:19:46 +03:00
|
|
|
. ./sets.defaults
|
|
|
|
|
1996-05-20 23:10:28 +04:00
|
|
|
setd=`pwd`
|
2003-12-20 01:25:53 +03:00
|
|
|
nlists=$lists
|
2002-04-08 21:18:22 +04:00
|
|
|
xlists="xbase xcomp xcontrib xfont xserver xmisc"
|
1994-08-29 19:21:02 +04:00
|
|
|
|
2003-06-23 13:18:45 +04:00
|
|
|
. ./sets.subr
|
|
|
|
|
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*)
|
2003-11-25 10:19:46 +03:00
|
|
|
machine_arch=${2}
|
|
|
|
machine_cpu=$(arch_to_cpu ${2})
|
2001-11-24 05:54:50 +03:00
|
|
|
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
|
2003-03-16 01:32:07 +03:00
|
|
|
lkm=yes
|
|
|
|
# Turn off LKMs for some ports.
|
|
|
|
if [ "$machine" = "evbppc" ]; then
|
|
|
|
lkm=no
|
|
|
|
fi
|
1998-07-02 10:36:35 +04:00
|
|
|
|
2001-08-19 17:15:18 +04:00
|
|
|
# Turn off lintlibs for some ports.
|
2002-12-11 01:00:56 +03:00
|
|
|
# Not needed anymore, leave the hook here for future use.
|
2001-08-19 17:15:18 +04:00
|
|
|
lintlibs=
|
|
|
|
|
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
|
2003-06-23 13:18:45 +04:00
|
|
|
list_set_files $setname
|
2002-02-27 13:42:55 +03:00
|
|
|
done | awk -- '/^[^#]/ {print $1}' | sort -u
|