1 1.2 gwr #!/bin/sh 2 1.2 gwr # 3 1.65 dyoung # $NetBSD: makeflist,v 1.65 2003/11/25 07:19:46 dyoung Exp $ 4 1.2 gwr # 5 1.8 lukem # Print out the files in some or all lists. 6 1.8 lukem # Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 7 1.2 gwr # 8 1.2 gwr 9 1.2 gwr # set defaults 10 1.65 dyoung . ./sets.defaults 11 1.65 dyoung 12 1.2 gwr setd=`pwd` 13 1.8 lukem nlists="base comp etc games man misc text" 14 1.44 tron xlists="xbase xcomp xcontrib xfont xserver xmisc" 15 1.8 lukem lists=$nlists 16 1.2 gwr 17 1.61 dyoung . ./sets.subr 18 1.61 dyoung 19 1.2 gwr # handle args 20 1.8 lukem while : ; do 21 1.2 gwr case $1 in 22 1.8 lukem -b*) 23 1.8 lukem lists="$xlists $nlists" 24 1.8 lukem ;; 25 1.8 lukem -x*) 26 1.8 lukem lists=$xlists 27 1.8 lukem ;; 28 1.8 lukem -a*) 29 1.65 dyoung machine_arch=${2} 30 1.65 dyoung machine_cpu=$(arch_to_cpu ${2}) 31 1.39 thorpej shift 32 1.8 lukem ;; 33 1.8 lukem -m*) 34 1.8 lukem machine=$2; shift 35 1.8 lukem ;; 36 1.8 lukem -s*) 37 1.8 lukem setd=$2; shift 38 1.8 lukem ;; 39 1.8 lukem -*) 40 1.8 lukem cat 1>&2 <<USAGE 41 1.8 lukem Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 42 1.8 lukem -b make netbsd + x11 lists 43 1.8 lukem -x only make x11 lists 44 1.40 thorpej -a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_arch] 45 1.39 thorpej -m machine set machine (e.g, amiga, i386, macppc) [$machine] 46 1.39 thorpej -s setsdir directory to find sets [$setd] 47 1.39 thorpej [setname ...] sets to build [$lists] 48 1.8 lukem USAGE 49 1.8 lukem exit 1 50 1.8 lukem ;; 51 1.8 lukem *) 52 1.8 lukem break 53 1.8 lukem ;; 54 1.2 gwr esac 55 1.2 gwr shift 56 1.2 gwr done 57 1.8 lukem if [ -n "$1" ]; then 58 1.8 lukem lists="$@" 59 1.8 lukem fi 60 1.15 simonb 61 1.43 fredette # Determine lib type. 62 1.39 thorpej if [ "$object_fmt" = "ELF" ]; then 63 1.28 itojun shlib=elf 64 1.9 jonathan else 65 1.39 thorpej shlib=aout 66 1.9 jonathan fi 67 1.43 fredette stlib=$shlib 68 1.43 fredette 69 1.43 fredette # Turn off shlibs for some ports. 70 1.43 fredette if [ "$machine_cpu" = "sh3" -o "$machine_arch" = "m68000" ]; then 71 1.43 fredette shlib=no 72 1.43 fredette fi 73 1.59 he lkm=yes 74 1.59 he # Turn off LKMs for some ports. 75 1.59 he if [ "$machine" = "evbppc" ]; then 76 1.59 he lkm=no 77 1.59 he fi 78 1.1 cgd 79 1.33 mrg # Turn off lintlibs for some ports. 80 1.57 fvdl # Not needed anymore, leave the hook here for future use. 81 1.33 mrg lintlibs= 82 1.44 tron 83 1.44 tron # Automatically add XFree86 version specific sets 84 1.44 tron for list in $lists 85 1.44 tron do 86 1.44 tron if [ -z "$_lists" ] 87 1.44 tron then 88 1.44 tron _lists=$list 89 1.44 tron else 90 1.44 tron _lists="$_lists $list" 91 1.44 tron fi 92 1.44 tron if [ -d "$setd/lists/$list${x11_version}" ] 93 1.44 tron then 94 1.44 tron _lists="$_lists $list${x11_version}" 95 1.44 tron fi 96 1.44 tron done 97 1.44 tron lists=$_lists 98 1.44 tron unset _lists 99 1.33 mrg 100 1.8 lukem for setname in $lists; do 101 1.61 dyoung list_set_files $setname 102 1.42 lukem done | awk -- '/^[^#]/ {print $1}' | sort -u 103