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