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