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