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