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