Hex Artifact Content

Artifact 22d82c13277c334976fd287eb32fceb493dd18da:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 54 43  #! /bin/bash..TC
0010: 4c 56 45 52 53 3d 22 38 2e 34 2e 31 39 22 0a 65  LVERS="8.4.19".e
0020: 78 70 6f 72 74 20 54 43 4c 56 45 52 53 0a 0a 6d  xport TCLVERS..m
0030: 6f 64 65 3d 22 62 75 69 6c 64 22 0a 69 66 20 5b  ode="build".if [
0040: 20 22 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20   "$1" = "clean" 
0050: 5d 3b 20 74 68 65 6e 0a 09 73 68 69 66 74 0a 0a  ]; then..shift..
0060: 09 6d 6f 64 65 3d 22 63 6c 65 61 6e 22 0a 66 69  .mode="clean".fi
0070: 0a 69 66 20 5b 20 22 24 31 22 20 3d 20 22 64 69  .if [ "$1" = "di
0080: 73 74 63 6c 65 61 6e 22 20 5d 3b 20 74 68 65 6e  stclean" ]; then
0090: 0a 09 73 68 69 66 74 0a 0a 09 6d 6f 64 65 3d 22  ..shift...mode="
00a0: 64 69 73 74 63 6c 65 61 6e 22 0a 66 69 0a 0a 43  distclean".fi..C
00b0: 4f 4e 46 49 47 55 52 45 45 58 54 52 41 3d 22 24  ONFIGUREEXTRA="$
00c0: 40 22 0a 65 78 70 6f 72 74 20 43 4f 4e 46 49 47  @".export CONFIG
00d0: 55 52 45 45 58 54 52 41 0a 0a 66 61 69 6c 65 64  UREEXTRA..failed
00e0: 70 6b 67 73 3d 22 22 0a 62 75 69 6c 64 66 61 69  pkgs="".buildfai
00f0: 6c 65 64 3d 22 30 22 0a 66 6f 72 20 70 6b 67 20  led="0".for pkg 
0100: 69 6e 20 74 63 6c 20 74 6b 20 69 74 63 6c 20 6d  in tcl tk itcl m
0110: 6b 34 74 63 6c 20 74 63 6c 76 66 73 20 6b 69 74  k4tcl tclvfs kit
0120: 73 68 3b 20 64 6f 0a 09 69 66 20 5b 20 22 24 7b  sh; do..if [ "${
0130: 6d 6f 64 65 7d 22 20 3d 20 22 64 69 73 74 63 6c  mode}" = "distcl
0140: 65 61 6e 22 20 5d 3b 20 74 68 65 6e 0a 09 09 72  ean" ]; then...r
0150: 6d 20 2d 72 66 20 22 24 7b 70 6b 67 7d 2f 73 72  m -rf "${pkg}/sr
0160: 63 22 0a 09 66 69 0a 0a 09 69 66 20 5b 20 22 24  c"..fi...if [ "$
0170: 7b 6d 6f 64 65 7d 22 20 3d 20 22 63 6c 65 61 6e  {mode}" = "clean
0180: 22 20 2d 6f 20 22 24 7b 6d 6f 64 65 7d 22 20 3d  " -o "${mode}" =
0190: 20 22 64 69 73 74 63 6c 65 61 6e 22 20 5d 3b 20   "distclean" ]; 
01a0: 74 68 65 6e 0a 09 09 72 6d 20 2d 66 20 22 24 7b  then...rm -f "${
01b0: 70 6b 67 7d 2f 62 75 69 6c 64 2e 6c 6f 67 22 0a  pkg}/build.log".
01c0: 09 09 72 6d 20 2d 72 66 20 22 24 7b 70 6b 67 7d  ..rm -rf "${pkg}
01d0: 2f 6f 75 74 22 20 22 24 7b 70 6b 67 7d 2f 69 6e  /out" "${pkg}/in
01e0: 73 74 22 20 22 24 7b 70 6b 67 7d 2f 62 75 69 6c  st" "${pkg}/buil
01f0: 64 22 0a 0a 09 09 63 6f 6e 74 69 6e 75 65 0a 09  d"....continue..
0200: 66 69 0a 0a 09 66 61 69 6c 65 64 3d 22 30 22 0a  fi...failed="0".
0210: 09 28 0a 09 09 63 64 20 22 24 7b 70 6b 67 7d 22  .(...cd "${pkg}"
0220: 20 7c 7c 20 65 78 69 74 20 31 0a 0a 09 09 2e 2f   || exit 1...../
0230: 62 75 69 6c 64 2e 73 68 20 3e 20 62 75 69 6c 64  build.sh > build
0240: 2e 6c 6f 67 20 32 3e 26 31 20 7c 7c 20 65 78 69  .log 2>&1 || exi
0250: 74 20 31 0a 09 29 20 7c 7c 20 66 61 69 6c 65 64  t 1..) || failed
0260: 3d 22 31 22 0a 0a 09 69 66 20 5b 20 22 24 7b 66  ="1"...if [ "${f
0270: 61 69 6c 65 64 7d 22 20 3d 20 22 31 22 20 5d 3b  ailed}" = "1" ];
0280: 20 74 68 65 6e 0a 09 09 66 61 69 6c 65 64 70 6b   then...failedpk
0290: 67 73 3d 22 24 7b 66 61 69 6c 65 64 70 6b 67 73  gs="${failedpkgs
02a0: 7d 20 24 7b 70 6b 67 7d 22 0a 09 66 69 0a 0a 09  } ${pkg}"..fi...
02b0: 63 61 73 65 20 22 24 7b 70 6b 67 7d 22 20 69 6e  case "${pkg}" in
02c0: 0a 09 09 74 63 6c 29 0a 09 09 09 54 43 4c 43 4f  ...tcl)....TCLCO
02d0: 4e 46 49 47 44 49 52 3d 24 28 66 69 6e 64 20 22  NFIGDIR=$(find "
02e0: 24 28 70 77 64 29 2f 74 63 6c 2f 62 75 69 6c 64  $(pwd)/tcl/build
02f0: 22 20 2d 6e 61 6d 65 20 74 63 6c 43 6f 6e 66 69  " -name tclConfi
0300: 67 2e 73 68 20 7c 20 68 65 61 64 20 2d 31 20 7c  g.sh | head -1 |
0310: 20 73 65 64 20 27 73 40 2f 5b 5e 2f 5d 2a 24 40   sed 's@/[^/]*$@
0320: 40 27 29 0a 09 09 09 65 78 70 6f 72 74 20 54 43  @')....export TC
0330: 4c 43 4f 4e 46 49 47 44 49 52 0a 09 09 09 3b 3b  LCONFIGDIR....;;
0340: 0a 09 65 73 61 63 0a 0a 09 69 66 20 5b 20 22 24  ..esac...if [ "$
0350: 7b 66 61 69 6c 65 64 7d 22 20 3d 20 22 31 22 20  {failed}" = "1" 
0360: 5d 3b 20 74 68 65 6e 0a 09 09 62 75 69 6c 64 66  ]; then...buildf
0370: 61 69 6c 65 64 3d 22 31 22 0a 09 66 69 0a 64 6f  ailed="1"..fi.do
0380: 6e 65 0a 0a 69 66 20 5b 20 22 24 7b 6d 6f 64 65  ne..if [ "${mode
0390: 7d 22 20 3d 20 22 63 6c 65 61 6e 22 20 2d 6f 20  }" = "clean" -o 
03a0: 22 24 7b 6d 6f 64 65 7d 22 20 3d 20 22 64 69 73  "${mode}" = "dis
03b0: 74 63 6c 65 61 6e 22 20 5d 3b 20 74 68 65 6e 0a  tclean" ]; then.
03c0: 09 72 6d 20 2d 66 20 74 63 6c 6b 69 74 2d 2a 0a  .rm -f tclkit-*.
03d0: 0a 09 65 78 69 74 20 30 0a 66 69 0a 0a 69 66 20  ..exit 0.fi..if 
03e0: 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65 64 70 6b  [ -n "${failedpk
03f0: 67 73 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63  gs}" ]; then..ec
0400: 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 62 75  ho "Failed to bu
0410: 69 6c 64 3a 24 7b 66 61 69 6c 65 64 70 6b 67 73  ild:${failedpkgs
0420: 7d 22 0a 66 69 0a 0a 69 66 20 5b 20 22 24 7b 62  }".fi..if [ "${b
0430: 75 69 6c 64 66 61 69 6c 65 64 7d 22 20 21 3d 20  uildfailed}" != 
0440: 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68  "0" ]; then..ech
0450: 6f 20 27 57 41 52 4e 49 4e 47 3a 20 42 75 69 6c  o 'WARNING: Buil
0460: 64 20 69 73 20 6c 69 6b 65 6c 79 20 69 6e 63 6f  d is likely inco
0470: 6d 70 6c 65 74 65 20 6f 72 20 66 61 69 6c 65 64  mplete or failed
0480: 2e 27 20 3e 26 32 0a 66 69 0a 0a 63 70 20 27 6b  .' >&2.fi..cp 'k
0490: 69 74 73 68 2f 62 75 69 6c 64 27 2f 6b 69 74 73  itsh/build'/kits
04a0: 68 2d 2a 2f 6b 69 74 20 22 74 63 6c 6b 69 74 2d  h-*/kit "tclkit-
04b0: 24 7b 54 43 4c 56 45 52 53 7d 22 0a 0a 65 78 69  ${TCLVERS}"..exi
04c0: 74 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65 64  t "${buildfailed
04d0: 7d 22 0a                                         }".