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