Annotation of src/distrib/sets/sets.subr, Revision 1.1
1.1 ! dyoung 1: #
! 2: # list_set_files setname
! 3: #
! 4: # Produce a packing list for setname. Each record is a line
! 5: # consisting of a path and a System Package name, separated by
! 6: # whitespace. E.g.,
! 7: #
! 8: # ./bin/cp base-util-root
! 9: #
! 10: # Environment
! 11: #
! 12: # setd
! 13: # machine
! 14: # machine_arch
! 15: # machine_cpu
! 16: # shlib
! 17: # stlib
! 18: # lkm
! 19: # lintlibs
! 20: # toolchain_missing
! 21: #
! 22: list_set_files () {
! 23: for setname; do
! 24: list_set_lists $setname
! 25: done | xargs cat | grep -v '^#'
! 26: }
! 27:
! 28: #
! 29: # list_set_lists setname
! 30: #
! 31: # Print to stdout a list of files, one filename per line, which
! 32: # concatenate to create the packing list for setname. E.g.,
! 33: #
! 34: # .../lists/base/mi
! 35: # .../lists/base/rescue.mi
! 36: # .../lists/base/md.i386
! 37: # .
! 38: # .
! 39: # .
! 40: #
! 41: # In each file, a record consists of a path and a System Package name,
! 42: # separated by whitespace. E.g.,
! 43: #
! 44: # # $NetBSD: mi,v 1.410 2003/05/11 19:01:27 ragge Exp $
! 45: # . base-sys-root
! 46: # ./altroot base-sys-root
! 47: # ./bin base-sys-root
! 48: # ./bin/[ base-util-root
! 49: # ./bin/cat base-util-root
! 50: # .
! 51: # .
! 52: # .
! 53: #
! 54: # A # in the first column marks a comment.
! 55: #
! 56: # Environment
! 57: #
! 58: # setd
! 59: # machine
! 60: # machine_arch
! 61: # machine_cpu
! 62: # shlib
! 63: # stlib
! 64: # lkm
! 65: # lintlibs
! 66: # toolchain_missing
! 67: #
! 68: list_set_lists () {
! 69: setname=$1
! 70:
! 71: echo $setd/lists/$setname/mi
! 72: if [ "$machine" != "$machine_arch" ]; then
! 73: # Prefer an ad.${machine_arch} over an ad.${machine_cpu},
! 74: # since the arch-specific one will be more specific than
! 75: # the cpu-specific one.
! 76: if [ -f $setd/lists/$setname/ad.${machine_arch} ]; then
! 77: echo $setd/lists/$setname/ad.${machine_arch}
! 78: elif [ -f $setd/lists/$setname/ad.${machine_cpu} ]; then
! 79: echo $setd/lists/$setname/ad.${machine_cpu}
! 80: fi
! 81: if [ "$shlib" != "no" -a \
! 82: -f $setd/lists/$setname/ad.${machine_cpu}.shl ]; then
! 83: echo $setd/lists/$setname/ad.${machine_cpu}.shl
! 84: fi
! 85: fi
! 86: if [ -f $setd/lists/$setname/md.${machine}.${machine_arch} ]; then
! 87: echo $setd/lists/$setname/md.${machine}.${machine_arch}
! 88: elif [ -f $setd/lists/$setname/md.${machine} ]; then
! 89: echo $setd/lists/$setname/md.${machine}
! 90: fi
! 91: if [ -f $setd/lists/$setname/stl.mi ]; then
! 92: echo $setd/lists/$setname/stl.mi
! 93: fi
! 94: if [ -f $setd/lists/$setname/stl.${stlib} ]; then
! 95: echo $setd/lists/$setname/stl.${stlib}
! 96: fi
! 97: if [ "$shlib" != "no" ]; then
! 98: if [ -f $setd/lists/$setname/shl.mi ]; then
! 99: echo $setd/lists/$setname/shl.mi
! 100: fi
! 101: if [ -f $setd/lists/$setname/shl.${shlib} ]; then
! 102: echo $setd/lists/$setname/shl.${shlib}
! 103: fi
! 104: fi
! 105: if [ "$lkm" != "no" ]; then
! 106: if [ -f $setd/lists/$setname/lkm.mi ]; then
! 107: echo $setd/lists/$setname/lkm.mi
! 108: fi
! 109: fi
! 110: if [ "$lintlibs" != no ]; then
! 111: if [ -f $setd/lists/$setname/lint.mi ]; then
! 112: echo $setd/lists/$setname/lint.mi
! 113: fi
! 114: fi
! 115: if [ "$toolchain_missing" != "yes" ]; then
! 116: if [ -f $setd/lists/$setname/tc.mi ]; then
! 117: echo $setd/lists/$setname/tc.mi
! 118: fi
! 119: if [ "$shlib" != "no" ]; then
! 120: if [ -f $setd/lists/$setname/tc.shl ]; then
! 121: echo $setd/lists/$setname/tc.shl
! 122: fi
! 123: fi
! 124: fi
! 125:
! 126: if [ -f $setd/lists/$setname/rescue.mi ]; then
! 127: echo $setd/lists/$setname/rescue.mi
! 128: fi
! 129: if [ -f $setd/lists/$setname/rescue.${machine} ]; then
! 130: echo $setd/lists/$setname/rescue.${machine}
! 131: fi
! 132: if [ "$machine" != "$machine_arch" ]; then
! 133: # Prefer a rescue.ad.${machine_arch} over a
! 134: # rescue.ad.${machine_cpu}, since the arch-
! 135: # specific one will be more specific than the
! 136: # cpu-specific one.
! 137: if [ -f $setd/lists/$setname/rescue.ad.${machine_arch} ]; then
! 138: echo $setd/lists/$setname/rescue.ad.${machine_arch}
! 139: elif [ -f $setd/lists/$setname/rescue.ad.${machine_cpu} ]; then
! 140: echo $setd/lists/$setname/rescue.ad.${machine_cpu}
! 141: fi
! 142: if [ "$shlib" != "no" -a -f \
! 143: $setd/lists/$setname/rescue.ad.${machine_cpu}.shl ]; then
! 144: echo $setd/lists/$setname/rescue.ad.${machine_cpu}.shl
! 145: fi
! 146: fi
! 147: }
! 148:
CVSweb <webmaster@jp.NetBSD.org>