NetBSD/distrib/sets/makeflist
dyoung 17b5668ccd Factor duplicated code for setting variables such as machine_cpu
and machine_arch to their defaults into sets.defaults, and source
it at the top of each script.

Also, to be consistent with variable naming, s/arch/machine_arch/.

sets.defaults introduces two new variables, krb and krb4, which
will affect whether Kerberos- or Kerberos IV-only files are put
into the set lists.
2003-11-25 07:19:46 +00:00

103 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
#
# $NetBSD: makeflist,v 1.65 2003/11/25 07:19:46 dyoung Exp $
#
# Print out the files in some or all lists.
# Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...]
#
# set defaults
. ./sets.defaults
setd=`pwd`
nlists="base comp etc games man misc text"
xlists="xbase xcomp xcontrib xfont xserver xmisc"
lists=$nlists
. ./sets.subr
# handle args
while : ; do
case $1 in
-b*)
lists="$xlists $nlists"
;;
-x*)
lists=$xlists
;;
-a*)
machine_arch=${2}
machine_cpu=$(arch_to_cpu ${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
-x only make x11 lists
-a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_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
;;
esac
shift
done
if [ -n "$1" ]; then
lists="$@"
fi
# Determine lib type.
if [ "$object_fmt" = "ELF" ]; then
shlib=elf
else
shlib=aout
fi
stlib=$shlib
# Turn off shlibs for some ports.
if [ "$machine_cpu" = "sh3" -o "$machine_arch" = "m68000" ]; then
shlib=no
fi
lkm=yes
# Turn off LKMs for some ports.
if [ "$machine" = "evbppc" ]; then
lkm=no
fi
# Turn off lintlibs for some ports.
# Not needed anymore, leave the hook here for future use.
lintlibs=
# 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
for setname in $lists; do
list_set_files $setname
done | awk -- '/^[^#]/ {print $1}' | sort -u