makeflist revision 1.61
11.2Sgwr#!/bin/sh 21.2Sgwr# 31.61Sdyoung# $NetBSD: makeflist,v 1.61 2003/06/23 09:18:45 dyoung Exp $ 41.2Sgwr# 51.8Slukem# Print out the files in some or all lists. 61.8Slukem# Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 71.2Sgwr# 81.2Sgwr 91.2Sgwr# set defaults 101.56Slukemmake="${MAKE:-make} -j 1 -f `dirname $0`/Makefile" 111.56Slukemmachine=`${make} print_machine` 121.56Slukemmachine_arch=`${make} print_machine_arch` 131.56Slukemmachine_cpu=`${make} print_machine_cpu` 141.56Slukemobject_fmt=`${make} print_object_fmt` 151.56Slukemtoolchain_missing=`${make} print_toolchain_missing` 161.56Slukemx11_version=`${make} print_x11_version` 171.2Sgwrsetd=`pwd` 181.8Slukemnlists="base comp etc games man misc text" 191.44Stronxlists="xbase xcomp xcontrib xfont xserver xmisc" 201.8Slukemlists=$nlists 211.2Sgwr 221.61Sdyoung. ./sets.subr 231.61Sdyoung 241.2Sgwr# handle args 251.8Slukemwhile : ; do 261.2Sgwr case $1 in 271.8Slukem -b*) 281.8Slukem lists="$xlists $nlists" 291.8Slukem ;; 301.8Slukem -x*) 311.8Slukem lists=$xlists 321.8Slukem ;; 331.8Slukem -a*) 341.56Slukem machine_arch=`MACHINE_ARCH=${2} ${make} print_machine_arch` 351.56Slukem machine_cpu=`MACHINE_ARCH=${2} ${make} print_machine_cpu` 361.39Sthorpej shift 371.8Slukem ;; 381.8Slukem -m*) 391.8Slukem machine=$2; shift 401.8Slukem ;; 411.8Slukem -s*) 421.8Slukem setd=$2; shift 431.8Slukem ;; 441.8Slukem -*) 451.8Slukem cat 1>&2 <<USAGE 461.8SlukemUsage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 471.8Slukem -b make netbsd + x11 lists 481.8Slukem -x only make x11 lists 491.40Sthorpej -a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_arch] 501.39Sthorpej -m machine set machine (e.g, amiga, i386, macppc) [$machine] 511.39Sthorpej -s setsdir directory to find sets [$setd] 521.39Sthorpej [setname ...] sets to build [$lists] 531.8SlukemUSAGE 541.8Slukem exit 1 551.8Slukem ;; 561.8Slukem *) 571.8Slukem break 581.8Slukem ;; 591.2Sgwr esac 601.2Sgwr shift 611.2Sgwrdone 621.8Slukemif [ -n "$1" ]; then 631.8Slukem lists="$@" 641.8Slukemfi 651.15Ssimonb 661.43Sfredette# Determine lib type. 671.39Sthorpejif [ "$object_fmt" = "ELF" ]; then 681.28Sitojun shlib=elf 691.9Sjonathanelse 701.39Sthorpej shlib=aout 711.9Sjonathanfi 721.43Sfredettestlib=$shlib 731.43Sfredette 741.43Sfredette# Turn off shlibs for some ports. 751.43Sfredetteif [ "$machine_cpu" = "sh3" -o "$machine_arch" = "m68000" ]; then 761.43Sfredette shlib=no 771.43Sfredettefi 781.59Shelkm=yes 791.59She# Turn off LKMs for some ports. 801.59Sheif [ "$machine" = "evbppc" ]; then 811.59She lkm=no 821.59Shefi 831.1Scgd 841.33Smrg# Turn off lintlibs for some ports. 851.57Sfvdl# Not needed anymore, leave the hook here for future use. 861.33Smrglintlibs= 871.44Stron 881.44Stron# Automatically add XFree86 version specific sets 891.44Stronfor list in $lists 901.44Strondo 911.44Stron if [ -z "$_lists" ] 921.44Stron then 931.44Stron _lists=$list 941.44Stron else 951.44Stron _lists="$_lists $list" 961.44Stron fi 971.44Stron if [ -d "$setd/lists/$list${x11_version}" ] 981.44Stron then 991.44Stron _lists="$_lists $list${x11_version}" 1001.44Stron fi 1011.44Strondone 1021.44Stronlists=$_lists 1031.44Stronunset _lists 1041.33Smrg 1051.8Slukemfor setname in $lists; do 1061.61Sdyoung list_set_files $setname 1071.42Slukemdone | awk -- '/^[^#]/ {print $1}' | sort -u 108