Hex Artifact Content

Artifact d2ecf7bf565e58aca3644e37c0745ae1625d0350:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 56 45  #! /bin/bash..VE
0010: 52 53 49 4f 4e 53 3d 22 38 2e 34 2e 31 39 20 38  RSIONS="8.4.19 8
0020: 2e 35 2e 31 31 20 63 76 73 5f 48 45 41 44 22 0a  .5.11 cvs_HEAD".
0030: 0a 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65  .# Find the base
0040: 20 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78   directory.for x
0050: 20 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61   in 1 2 3 4 __fa
0060: 69 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22  il__; do..if [ "
0070: 24 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f  ${x}" = "__fail_
0080: 5f 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68  _" ]; then...ech
0090: 6f 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e  o 'Unable to fin
00a0: 64 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62  d KitCreator, ab
00b0: 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09  orting.' >&2....
00c0: 65 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20  exit 1..fi...if 
00d0: 5b 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20  [ -x kitcreator 
00e0: 5d 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a  ]; then...break.
00f0: 09 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65  .fi...cd ...done
0100: 0a 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64  ..ROOTDIR="$(pwd
0110: 29 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f  )".TESTDIR="${RO
0120: 4f 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73  OTDIR}/build/tes
0130: 74 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49  t".export ROOTDI
0140: 52 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e  R TESTDIR..# Han
0150: 64 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65  dle command-line
0160: 20 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20   arguments.if [ 
0170: 22 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d  "$1" = "clean" ]
0180: 3b 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22  ; then..rm -rf "
0190: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
01a0: 0a 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c  .fi..# Create pl
01b0: 61 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a  ace to put kits.
01c0: 6d 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52  mkdir "${TESTDIR
01d0: 7d 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75  }/kits" >/dev/nu
01e0: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d  ll 2>/dev/null.m
01f0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
0200: 2f 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f  /kits/failed" >/
0210: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
0220: 6e 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22  null.if [ ! -d "
0230: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
0240: 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27   ]; then..echo '
0250: 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65  Unable to create
0260: 20 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79   kits/ directory
0270: 2c 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32  , aborting.' >&2
0280: 0a 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20  ...exit 1.fi..# 
0290: 43 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65  Cleanup.for file
02a0: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
02b0: 2f 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a  /kits/*.log; do.
02c0: 09 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65  .if echo "${file
02d0: 7d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62  }" | grep -- '-b
02e0: 75 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76  uild.log$' >/dev
02f0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f  /null; then...co
0300: 6e 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20  ntinue..fi...rm 
0310: 2d 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e  -f "${file}".don
0320: 65 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e  e..# Disable WIN
0330: 45 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45  E debugging.WINE
0340: 50 52 45 46 49 58 3d 22 24 7b 54 45 53 54 44 49  PREFIX="${TESTDI
0350: 52 7d 2f 2e 77 69 6e 65 22 0a 65 78 70 6f 72 74  R}/.wine".export
0360: 20 57 49 4e 45 50 52 45 46 49 58 0a 72 6d 20 2d   WINEPREFIX.rm -
0370: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
0380: 7d 22 0a 6d 6b 64 69 72 20 22 24 7b 57 49 4e 45  }".mkdir "${WINE
0390: 50 52 45 46 49 58 7d 22 0a 0a 63 61 74 20 3c 3c  PREFIX}"..cat <<
03a0: 20 5c 5f 45 4f 46 5f 20 3e 20 22 24 7b 57 49 4e   \_EOF_ > "${WIN
03b0: 45 50 52 45 46 49 58 7d 2f 75 70 64 61 74 65 2d  EPREFIX}/update-
03c0: 72 65 67 22 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c  reg".[HKEY_LOCAL
03d0: 5f 4d 41 43 48 49 4e 45 5c 53 6f 66 74 77 61 72  _MACHINE\Softwar
03e0: 65 5c 4d 69 63 72 6f 73 6f 66 74 5c 57 69 6e 64  e\Microsoft\Wind
03f0: 6f 77 73 20 4e 54 5c 43 75 72 72 65 6e 74 56 65  ows NT\CurrentVe
0400: 72 73 69 6f 6e 5c 41 65 44 65 62 75 67 5d 0a 22  rsion\AeDebug]."
0410: 41 75 74 6f 22 3d 64 77 6f 72 64 3a 30 30 30 30  Auto"=dword:0000
0420: 30 30 30 31 0a 22 44 65 62 75 67 67 65 72 22 3d  0001."Debugger"=
0430: 22 66 61 6c 73 65 22 0a 5f 45 4f 46 5f 0a 0a 72  "false"._EOF_..r
0440: 65 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52  egedit "${WINEPR
0450: 45 46 49 58 7d 2f 75 70 64 61 74 65 2d 72 65 67  EFIX}/update-reg
0460: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
0470: 64 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61 72  dev/null..# Star
0480: 74 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d 62  t Xvfb for X11-b
0490: 61 73 65 64 20 74 65 73 74 73 0a 58 56 46 42 5f  ased tests.XVFB_
04a0: 50 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a 33  PID="$(..Xvfb :3
04b0: 31 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30 78  1 -screen 0 800x
04c0: 36 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65 6e  600x24 -nolisten
04d0: 20 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20   tcp >/dev/null 
04e0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 65  2>/dev/null &..e
04f0: 63 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53 50  cho "$!".)".DISP
0500: 4c 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20 44  LAY=:31.export D
0510: 49 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24 7b  ISPLAY..if [ "${
0520: 42 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31 22  BIGBUILD}" = "1"
0530: 20 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d 22   ]; then..kits="
0540: 24 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c 2d  $(echo normal{,-
0550: 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68  zip,-nomk4}{,-th
0560: 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63  readed}{,-static
0570: 74 6b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d 61 6c  tk,-notk} normal
0580: 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e  {,-threaded}{,-n
0590: 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  otk}{,-nomk4}{,-
05a0: 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 77 69  debug}-kitdll wi
05b0: 6e 33 32 2d 69 35 38 36 7b 2c 2d 7a 69 70 2c 2d  n32-i586{,-zip,-
05c0: 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65  nomk4}{,-threade
05d0: 64 7d 7b 2c 2d 6e 6f 74 6b 7d 20 77 69 6e 33 32  d}{,-notk} win32
05e0: 2d 69 35 38 36 7b 2c 2d 74 68 72 65 61 64 65 64  -i586{,-threaded
05f0: 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b  }{,-notk}{,-nomk
0600: 34 7d 2d 6b 69 74 64 6c 6c 20 6d 69 6e 7b 2c 2d  4}-kitdll min{,-
0610: 73 74 61 74 69 63 7d 20 7b 6c 69 6e 75 78 2d 6d  static} {linux-m
0620: 69 70 73 65 6c 2d 6d 69 6e 7d 7b 2c 2d 64 65 62  ipsel-min}{,-deb
0630: 75 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b 6c  ug}{,-kitdll} {l
0640: 69 6e 75 78 2d 61 6d 64 36 34 2c 73 6f 6c 61 72  inux-amd64,solar
0650: 69 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d  is-i386,solaris-
0660: 61 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70  amd64,solaris-sp
0670: 61 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72  arc,solaris-spar
0680: 63 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36  c64,freebsd-amd6
0690: 34 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b  4,netbsd-amd64}{
06a0: 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  ,-zip,-nomk4}{,-
06b0: 74 68 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74  threaded}{,-stat
06c0: 69 63 74 6b 2c 2d 6e 6f 74 6b 7d 7b 2c 64 65 62  ictk,-notk}{,deb
06d0: 75 67 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38  ug} {solaris-i38
06e0: 36 2c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c  6,solaris-amd64,
06f0: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f  solaris-sparc,so
0700: 6c 61 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72  laris-sparc64,fr
0710: 65 65 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62  eebsd-amd64,netb
0720: 73 64 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65  sd-amd64}{,-thre
0730: 61 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d  aded}{,-notk}{,-
0740: 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d 6b  nomk4}{,debug}-k
0750: 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38  itdll netbsd-i38
0760: 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b  6{,-zip,-nomk4}{
0770: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 64 65 62  ,-threaded}{,deb
0780: 75 67 7d 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d  ug}-notk netbsd-
0790: 69 33 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d  i386{,-threaded}
07a0: 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67  {,-nomk4}{,debug
07b0: 7d 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 29 22 0a  }-notk-kitdll)".
07c0: 65 6c 73 65 0a 09 6b 69 74 73 3d 22 6e 6f 72 6d  else..kits="norm
07d0: 61 6c 20 6e 6f 72 6d 61 6c 2d 7a 69 70 20 6e 6f  al normal-zip no
07e0: 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 20 6e 6f  rmal-threaded no
07f0: 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 7a 69  rmal-threaded-zi
0800: 70 20 6e 6f 72 6d 61 6c 2d 73 74 61 74 69 63 74  p normal-statict
0810: 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 20 6e 6f  k normal-notk no
0820: 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e 6f  rmal-threaded-no
0830: 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  tk normal-thread
0840: 65 64 2d 7a 69 70 2d 6e 6f 74 6b 20 6e 6f 72 6d  ed-zip-notk norm
0850: 61 6c 2d 6e 6f 6d 6b 34 20 6e 6f 72 6d 61 6c 2d  al-nomk4 normal-
0860: 64 65 62 75 67 20 6d 69 6e 20 6d 69 6e 2d 73 74  debug min min-st
0870: 61 74 69 63 20 6e 6f 72 6d 61 6c 2d 6b 69 74 64  atic normal-kitd
0880: 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ll normal-thread
0890: 65 64 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c  ed-kitdll normal
08a0: 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6e 6f 72  -notk-kitdll nor
08b0: 6d 61 6c 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c  mal-nomk4-kitdll
08c0: 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d 6e 6f   normal-nomk4-no
08d0: 74 6b 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c  tk-kitdll normal
08e0: 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d  -threaded-nomk4-
08f0: 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68  kitdll normal-th
0900: 72 65 61 64 65 64 2d 6e 6f 74 6b 2d 6e 6f 6d 6b  readed-notk-nomk
0910: 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d  4-kitdll normal-
0920: 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 6d 69 6e  debug-kitdll min
0930: 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35  -kitdll win32-i5
0940: 38 36 20 77 69 6e 33 32 2d 69 35 38 36 2d 7a 69  86 win32-i586-zi
0950: 70 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72  p win32-i586-thr
0960: 65 61 64 65 64 20 77 69 6e 33 32 2d 69 35 38 36  eaded win32-i586
0970: 2d 74 68 72 65 61 64 65 64 2d 7a 69 70 20 77 69  -threaded-zip wi
0980: 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 20 77 69  n32-i586-notk wi
0990: 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65  n32-i586-threade
09a0: 64 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69 35 38  d-notk win32-i58
09b0: 36 2d 6e 6f 6d 6b 34 20 77 69 6e 33 32 2d 69 35  6-nomk4 win32-i5
09c0: 38 36 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  86-kitdll win32-
09d0: 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6b 69  i586-threaded-ki
09e0: 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d  tdll win32-i586-
09f0: 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  notk-kitdll win3
0a00: 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6b 69 74  2-i586-nomk4-kit
0a10: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e  dll win32-i586-n
0a20: 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c  omk4-notk-kitdll
0a30: 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65   win32-i586-thre
0a40: 61 64 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c  aded-nomk4-kitdl
0a50: 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72  l win32-i586-thr
0a60: 65 61 64 65 64 2d 6e 6f 74 6b 2d 6e 6f 6d 6b 34  eaded-notk-nomk4
0a70: 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 6d 69  -kitdll linux-mi
0a80: 70 73 65 6c 2d 6d 69 6e 20 6c 69 6e 75 78 2d 6d  psel-min linux-m
0a90: 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64 6c 6c  ipsel-min-kitdll
0aa0: 20 6c 69 6e 75 78 2d 61 6d 64 36 34 20 6c 69 6e   linux-amd64 lin
0ab0: 75 78 2d 61 6d 64 36 34 2d 64 65 62 75 67 20 6c  ux-amd64-debug l
0ac0: 69 6e 75 78 2d 61 6d 64 36 34 2d 6b 69 74 64 6c  inux-amd64-kitdl
0ad0: 6c 20 6c 69 6e 75 78 2d 61 6d 64 36 34 2d 64 65  l linux-amd64-de
0ae0: 62 75 67 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  bug-kitdll linux
0af0: 2d 61 6d 64 36 34 2d 6e 6f 74 6b 20 6c 69 6e 75  -amd64-notk linu
0b00: 78 2d 61 6d 64 36 34 2d 6e 6f 74 6b 2d 64 65 62  x-amd64-notk-deb
0b10: 75 67 20 6c 69 6e 75 78 2d 61 6d 64 36 34 2d 6e  ug linux-amd64-n
0b20: 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  otk-kitdll linux
0b30: 2d 61 6d 64 36 34 2d 6e 6f 74 6b 2d 64 65 62 75  -amd64-notk-debu
0b40: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0b50: 2d 69 33 38 36 20 73 6f 6c 61 72 69 73 2d 69 33  -i386 solaris-i3
0b60: 38 36 2d 64 65 62 75 67 20 73 6f 6c 61 72 69 73  86-debug solaris
0b70: 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73 6f 6c  -i386-kitdll sol
0b80: 61 72 69 73 2d 69 33 38 36 2d 64 65 62 75 67 2d  aris-i386-debug-
0b90: 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 61  kitdll solaris-a
0ba0: 6d 64 36 34 20 73 6f 6c 61 72 69 73 2d 61 6d 64  md64 solaris-amd
0bb0: 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72 69 73  64-debug solaris
0bc0: 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 73 6f  -amd64-kitdll so
0bd0: 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65 62 75  laris-amd64-debu
0be0: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0bf0: 2d 73 70 61 72 63 20 73 6f 6c 61 72 69 73 2d 73  -sparc solaris-s
0c00: 70 61 72 63 2d 64 65 62 75 67 20 73 6f 6c 61 72  parc-debug solar
0c10: 69 73 2d 73 70 61 72 63 2d 6b 69 74 64 6c 6c 20  is-sparc-kitdll 
0c20: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 64 65  solaris-sparc-de
0c30: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0c40: 69 73 2d 73 70 61 72 63 36 34 20 73 6f 6c 61 72  is-sparc64 solar
0c50: 69 73 2d 73 70 61 72 63 36 34 2d 64 65 62 75 67  is-sparc64-debug
0c60: 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34   solaris-sparc64
0c70: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0c80: 73 70 61 72 63 36 34 2d 64 65 62 75 67 2d 6b 69  sparc64-debug-ki
0c90: 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61 6d 64  tdll freebsd-amd
0ca0: 36 34 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64 freebsd-amd64
0cb0: 2d 64 65 62 75 67 20 66 72 65 65 62 73 64 2d 61  -debug freebsd-a
0cc0: 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 66 72 65 65  md64-kitdll free
0cd0: 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d  bsd-amd64-debug-
0ce0: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33  kitdll netbsd-i3
0cf0: 38 36 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d 69  86-notk netbsd-i
0d00: 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 6e  386-notk-debug n
0d10: 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74 6b 2d  etbsd-i386-notk-
0d20: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33  kitdll netbsd-i3
0d30: 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69  86-notk-debug-ki
0d40: 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36  tdll netbsd-amd6
0d50: 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 64  4 netbsd-amd64-d
0d60: 65 62 75 67 20 6e 65 74 62 73 64 2d 61 6d 64 36  ebug netbsd-amd6
0d70: 34 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  4-kitdll netbsd-
0d80: 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64  amd64-debug-kitd
0d90: 6c 6c 22 0a 66 69 0a 0a 66 61 69 6c 65 64 3d 22  ll".fi..failed="
0da0: 22 0a 66 6f 72 20 6b 69 74 20 69 6e 20 24 6b 69  ".for kit in $ki
0db0: 74 73 3b 20 64 6f 0a 09 6b 69 74 63 72 65 61 74  ts; do..kitcreat
0dc0: 6f 72 3d 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72  or="./kitcreator
0dd0: 22 0a 09 61 72 67 73 3d 22 22 0a 09 72 75 6e 6e  "..args=""..runn
0de0: 61 62 6c 65 3d 22 31 22 0a 09 69 73 7a 69 70 3d  able="1"..iszip=
0df0: 22 30 22 0a 09 73 74 61 74 69 63 74 6b 3d 22 30  "0"..statictk="0
0e00: 22 0a 09 6e 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d  "..notk="0"..nom
0e10: 6b 34 3d 22 30 22 0a 09 78 63 6f 6d 70 69 6c 65  k4="0"..xcompile
0e20: 3d 22 30 22 0a 09 6b 69 74 64 6c 6c 3d 22 30 22  ="0"..kitdll="0"
0e30: 0a 09 6b 69 74 72 75 6e 63 6d 64 3d 22 22 0a 0a  ..kitruncmd=""..
0e40: 09 23 20 48 61 6e 64 6c 65 20 62 61 73 65 20 63  .# Handle base c
0e50: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09 6f 73  onfiguration..os
0e60: 3d 22 24 28 75 6e 61 6d 65 20 2d 73 20 7c 20 64  ="$(uname -s | d
0e70: 64 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f  d conv=lcase 2>/
0e80: 64 65 76 2f 6e 75 6c 6c 29 22 0a 09 63 70 75 3d  dev/null)"..cpu=
0e90: 22 24 28 75 6e 61 6d 65 20 2d 6d 20 7c 20 64 64  "$(uname -m | dd
0ea0: 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64   conv=lcase 2>/d
0eb0: 65 76 2f 6e 75 6c 6c 29 22 0a 09 63 61 73 65 20  ev/null)"..case 
0ec0: 22 24 7b 6b 69 74 7d 22 20 69 6e 0a 09 09 6e 6f  "${kit}" in...no
0ed0: 72 6d 61 6c 7c 6e 6f 72 6d 61 6c 2d 2a 29 0a 09  rmal|normal-*)..
0ee0: 09 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24  ..kit="$(echo "$
0ef0: 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40  {kit}" | sed "s@
0f00: 5e 6e 6f 72 6d 61 6c 40 24 6f 73 2d 24 63 70 75  ^normal@$os-$cpu
0f10: 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e  @")"....;;...min
0f20: 7c 6d 69 6e 2d 6b 69 74 64 6c 6c 29 0a 09 09 09  |min-kitdll)....
0f30: 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75  kitcreator="./bu
0f40: 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22  ild/make-minkit"
0f50: 0a 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09  ....iszip="1"...
0f60: 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 6b 69 74  .notk="1"....kit
0f70: 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d  ="$(echo "${kit}
0f80: 22 20 7c 20 73 65 64 20 22 73 40 5e 6d 69 6e 40  " | sed "s@^min@
0f90: 24 6f 73 2d 24 63 70 75 2d 6d 69 6e 40 22 29 22  $os-$cpu-min@")"
0fa0: 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e 2d 73 74 61  ....;;...min-sta
0fb0: 74 69 63 29 0a 09 09 09 6b 69 74 63 72 65 61 74  tic)....kitcreat
0fc0: 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  or="./build/make
0fd0: 2d 6d 69 6e 6b 69 74 2d 73 74 61 74 69 63 22 0a  -minkit-static".
0fe0: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
0ff0: 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 6b 69 74 3d  notk="1"....kit=
1000: 22 24 7b 6f 73 7d 2d 24 7b 63 70 75 7d 2d 6d 69  "${os}-${cpu}-mi
1010: 6e 2d 73 74 61 74 69 63 22 0a 09 09 09 3b 3b 0a  n-static"....;;.
1020: 09 09 77 69 6e 33 32 7c 77 69 6e 33 32 2d 2a 29  ..win32|win32-*)
1030: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
1040: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74  ./build/make-kit
1050: 2d 77 69 6e 33 32 22 0a 09 09 09 78 63 6f 6d 70  -win32"....xcomp
1060: 69 6c 65 3d 22 31 22 0a 09 09 09 6b 69 74 72 75  ile="1"....kitru
1070: 6e 63 6d 64 3d 22 77 69 6e 65 22 0a 09 09 09 3b  ncmd="wine"....;
1080: 3b 0a 09 09 6c 69 6e 75 78 2d 6d 69 70 73 65 6c  ;...linux-mipsel
1090: 2d 6d 69 6e 7c 6c 69 6e 75 78 2d 6d 69 70 73 65  -min|linux-mipse
10a0: 6c 2d 6d 69 6e 2d 6b 69 74 64 6c 6c 29 0a 09 09  l-min-kitdll)...
10b0: 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62  .kitcreator="./b
10c0: 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 6d 69  uild/make-kit-mi
10d0: 70 73 65 6c 22 0a 09 09 09 72 75 6e 6e 61 62 6c  psel"....runnabl
10e0: 65 3d 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c  e="0"....xcompil
10f0: 65 3d 22 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31  e="1"....notk="1
1100: 22 0a 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09  "....iszip="1"..
1110: 09 09 6b 69 74 72 75 6e 63 6d 64 3d 22 71 65 6d  ..kitruncmd="qem
1120: 75 2d 6d 69 70 73 65 6c 20 2d 4c 20 2f 68 6f 6d  u-mipsel -L /hom
1130: 65 2f 72 6b 65 65 6e 65 2f 72 6f 6f 74 2f 63 72  e/rkeene/root/cr
1140: 6f 73 73 2d 63 6f 6d 70 69 6c 65 72 73 2f 6d 69  oss-compilers/mi
1150: 70 73 65 6c 2d 75 6e 6b 6e 6f 77 6e 2d 6c 69 6e  psel-unknown-lin
1160: 75 78 2d 75 63 6c 69 62 63 2f 6d 69 70 73 65 6c  ux-uclibc/mipsel
1170: 2d 75 6e 6b 6e 6f 77 6e 2d 6c 69 6e 75 78 2d 75  -unknown-linux-u
1180: 63 6c 69 62 63 2f 73 79 73 72 6f 6f 74 2f 22 0a  clibc/sysroot/".
1190: 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 61 6d  ...;;...linux-am
11a0: 64 36 34 7c 6c 69 6e 75 78 2d 61 6d 64 36 34 2d  d64|linux-amd64-
11b0: 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 69 33  *|\...solaris-i3
11c0: 38 36 7c 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d  86|solaris-i386-
11d0: 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 61 6d  *|\...solaris-am
11e0: 64 36 34 7c 73 6f 6c 61 72 69 73 2d 61 6d 64 36  d64|solaris-amd6
11f0: 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d  4-*|\...solaris-
1200: 73 70 61 72 63 7c 73 6f 6c 61 72 69 73 2d 73 70  sparc|solaris-sp
1210: 61 72 63 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69  arc-*|\...solari
1220: 73 2d 73 70 61 72 63 36 34 7c 73 6f 6c 61 72 69  s-sparc64|solari
1230: 73 2d 73 70 61 72 63 36 34 2d 2a 7c 5c 0a 09 09  s-sparc64-*|\...
1240: 66 72 65 65 62 73 64 2d 61 6d 64 36 34 7c 66 72  freebsd-amd64|fr
1250: 65 65 62 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c 0a  eebsd-amd64-*|\.
1260: 09 09 6e 65 74 62 73 64 2d 69 33 38 36 7c 6e 65  ..netbsd-i386|ne
1270: 74 62 73 64 2d 69 33 38 36 2d 2a 7c 5c 0a 09 09  tbsd-i386-*|\...
1280: 6e 65 74 62 73 64 2d 61 6d 64 36 34 7c 6e 65 74  netbsd-amd64|net
1290: 62 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09  bsd-amd64-*|\...
12a0: 68 70 75 78 2d 68 70 70 61 36 34 7c 68 70 75 78  hpux-hppa64|hpux
12b0: 2d 68 70 70 61 36 34 2d 2a 29 0a 09 09 09 70 6c  -hppa64-*)....pl
12c0: 61 74 66 6f 72 6d 3d 22 24 28 65 63 68 6f 20 22  atform="$(echo "
12d0: 24 7b 6b 69 74 7d 22 20 7c 20 63 75 74 20 2d 66  ${kit}" | cut -f
12e0: 20 31 2d 32 20 2d 64 20 27 2d 27 29 22 0a 09 09   1-2 -d '-')"...
12f0: 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62  .kitcreator="./b
1300: 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 24 7b  uild/make-kit-${
1310: 70 6c 61 74 66 6f 72 6d 7d 22 0a 09 09 09 72 75  platform}"....ru
1320: 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09 09 78 63  nnable="0"....xc
1330: 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 69 73  ompile="1"....is
1340: 7a 69 70 3d 22 30 22 0a 0a 09 09 09 69 66 20 65  zip="0".....if e
1350: 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 65  cho "${kit}" | e
1360: 67 72 65 70 20 2d 2d 20 27 2d 28 68 70 70 61 36  grep -- '-(hppa6
1370: 34 7c 61 6d 64 36 34 7c 73 70 61 72 63 36 34 29  4|amd64|sparc64)
1380: 2d 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  -' >/dev/null; t
1390: 68 65 6e 0a 09 09 09 09 61 72 67 73 3d 22 24 7b  hen.....args="${
13a0: 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 36  args} --enable-6
13b0: 34 62 69 74 22 0a 09 09 09 66 69 0a 0a 09 09 09  4bit"....fi.....
13c0: 69 66 20 65 63 68 6f 20 22 2d 24 7b 6b 69 74 7d  if echo "-${kit}
13d0: 2d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 6c  -" | grep -- '-l
13e0: 69 6e 75 78 2d 61 6d 64 36 34 2d 27 20 3e 2f 64  inux-amd64-' >/d
13f0: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
1400: 09 09 6b 69 74 72 75 6e 63 6d 64 3d 22 71 65 6d  ..kitruncmd="qem
1410: 75 2d 78 38 36 5f 36 34 20 2d 4c 20 2f 68 6f 6d  u-x86_64 -L /hom
1420: 65 2f 72 6b 65 65 6e 65 2f 72 6f 6f 74 2f 63 72  e/rkeene/root/cr
1430: 6f 73 73 2d 63 6f 6d 70 69 6c 65 72 73 2f 78 38  oss-compilers/x8
1440: 36 5f 36 34 2d 73 6c 61 63 6b 77 61 72 65 2d 6c  6_64-slackware-l
1450: 69 6e 75 78 2f 78 38 36 5f 36 34 2d 73 6c 61 63  inux/x86_64-slac
1460: 6b 77 61 72 65 2d 6c 69 6e 75 78 22 0a 09 09 09  kware-linux"....
1470: 66 69 0a 09 09 09 3b 3b 0a 09 65 73 61 63 0a 0a  fi....;;..esac..
1480: 09 69 66 20 5b 20 22 24 7b 78 63 6f 6d 70 69 6c  .if [ "${xcompil
1490: 65 7d 22 20 21 3d 20 22 30 22 20 5d 3b 20 74 68  e}" != "0" ]; th
14a0: 65 6e 0a 09 09 6b 69 74 3d 22 24 7b 6b 69 74 7d  en...kit="${kit}
14b0: 2d 78 63 6f 6d 70 69 6c 65 22 0a 09 66 69 0a 0a  -xcompile"..fi..
14c0: 09 23 20 48 61 6e 64 6c 65 20 61 64 64 69 74 69  .# Handle additi
14d0: 6f 6e 61 6c 20 63 6f 6e 66 69 67 75 72 61 74 69  onal configurati
14e0: 6f 6e 0a 09 74 65 6d 70 6b 69 74 3d 22 2d 24 7b  on..tempkit="-${
14f0: 6b 69 74 7d 2d 22 0a 09 66 6f 72 20 74 72 79 20  kit}-"..for try 
1500: 69 6e 20 31 20 32 20 33 20 34 20 35 20 36 20 37  in 1 2 3 4 5 6 7
1510: 20 38 20 39 3b 20 64 6f 0a 09 09 63 61 73 65 20   8 9; do...case 
1520: 22 2d 24 7b 74 65 6d 70 6b 69 74 7d 2d 22 20 69  "-${tempkit}-" i
1530: 6e 0a 09 09 09 2a 2d 74 68 72 65 61 64 65 64 2d  n....*-threaded-
1540: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
1550: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1560: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 74 68  t}" | sed 's@-th
1570: 72 65 61 64 65 64 2d 40 2d 40 27 29 22 0a 09 09  readed-@-@')"...
1580: 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20  ..args="${args} 
1590: 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64 73  --enable-threads
15a0: 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 7a 69  ".....;;....*-zi
15b0: 70 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  p-*).....tempkit
15c0: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
15d0: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
15e0: 7a 69 70 2d 40 2d 40 27 29 22 0a 09 09 09 09 61  zip-@-@')".....a
15f0: 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65  rgs="${args} --e
1600: 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72 61 67  nable-kit-storag
1610: 65 3d 7a 69 70 22 0a 09 09 09 09 69 73 7a 69 70  e=zip".....iszip
1620: 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a  ="1".....;;....*
1630: 2d 73 74 61 74 69 63 74 6b 2d 2a 29 0a 09 09 09  -statictk-*)....
1640: 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f  .tempkit="$(echo
1650: 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20   "${tempkit}" | 
1660: 73 65 64 20 27 73 40 2d 73 74 61 74 69 63 74 6b  sed 's@-statictk
1670: 2d 40 2d 40 27 29 22 0a 09 09 09 09 69 66 20 5b  -@-@')".....if [
1680: 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 30 22   "${notk}" = "0"
1690: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 73 74   ]; then......st
16a0: 61 74 69 63 74 6b 3d 22 31 22 0a 09 09 09 09 65  atictk="1".....e
16b0: 6c 73 65 0a 09 09 09 09 09 65 63 68 6f 20 22 24  lse......echo "$
16c0: 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f  {kit}: Unable to
16d0: 20 63 72 65 61 74 65 20 53 74 61 74 69 63 54 6b   create StaticTk
16e0: 20 61 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72   and NoTk, ignor
16f0: 69 6e 67 20 53 74 61 74 69 63 54 6b 22 20 3e 26  ing StaticTk" >&
1700: 32 0a 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a  2.....fi.....;;.
1710: 09 09 09 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09  ...*-notk-*)....
1720: 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f  .tempkit="$(echo
1730: 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20   "${tempkit}" | 
1740: 73 65 64 20 27 73 40 2d 6e 6f 74 6b 2d 40 2d 40  sed 's@-notk-@-@
1750: 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22 24 7b  ')".....if [ "${
1760: 73 74 61 74 69 63 74 6b 7d 22 20 3d 20 22 30 22  statictk}" = "0"
1770: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 6e 6f   ]; then......no
1780: 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73 65 0a  tk="1".....else.
1790: 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b 69 74  .....echo "${kit
17a0: 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63 72 65  }: Unable to cre
17b0: 61 74 65 20 53 74 61 74 69 63 54 6b 20 61 6e 64  ate StaticTk and
17c0: 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67 20   NoTk, ignoring 
17d0: 4e 6f 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69  NoTk" >&2.....fi
17e0: 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 6d  .....;;....*-nom
17f0: 6b 34 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69  k4-*).....tempki
1800: 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d  t="$(echo "${tem
1810: 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40  pkit}" | sed 's@
1820: 2d 6e 6f 6d 6b 34 2d 40 2d 40 27 29 22 0a 09 09  -nomk4-@-@')"...
1830: 09 09 6e 6f 6d 6b 34 3d 22 31 22 0a 09 09 09 09  ..nomk4="1".....
1840: 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b 3b  iszip="1".....;;
1850: 0a 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a  ....*-kitdll-*).
1860: 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65  ....tempkit="$(e
1870: 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22  cho "${tempkit}"
1880: 20 7c 20 73 65 64 20 27 73 40 2d 6b 69 74 64 6c   | sed 's@-kitdl
1890: 6c 2d 40 2d 40 27 29 22 0a 09 09 09 09 6b 69 74  l-@-@')".....kit
18a0: 64 6c 6c 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09  dll="1".....;;..
18b0: 09 09 2a 2d 64 65 62 75 67 2d 2a 29 0a 09 09 09  ..*-debug-*)....
18c0: 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f  .tempkit="$(echo
18d0: 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20   "${tempkit}" | 
18e0: 73 65 64 20 27 73 40 2d 64 65 62 75 67 2d 40 2d  sed 's@-debug-@-
18f0: 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24  @')".....args="$
1900: 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d  {args} --enable-
1910: 73 79 6d 62 6f 6c 73 22 0a 09 09 09 09 3b 3b 0a  symbols".....;;.
1920: 09 09 65 73 61 63 0a 09 64 6f 6e 65 0a 0a 09 69  ..esac..done...i
1930: 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20  f [ "${kitdll}" 
1940: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
1950: 23 20 43 75 72 72 65 6e 74 6c 79 20 6e 6f 20 4b  # Currently no K
1960: 69 74 44 4c 4c 20 75 73 65 73 20 5a 69 70 0a 09  itDLL uses Zip..
1970: 09 69 73 7a 69 70 3d 22 30 22 0a 09 66 69 0a 0a  .iszip="0"..fi..
1980: 09 66 6f 72 20 76 65 72 73 69 6f 6e 20 69 6e 20  .for version in 
1990: 24 7b 56 45 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a  ${VERSIONS}; do.
19a0: 09 09 23 20 57 6f 72 6b 20 61 72 6f 75 6e 64 20  ..# Work around 
19b0: 63 68 61 6e 67 65 73 20 69 6e 20 64 65 66 61 75  changes in defau
19c0: 6c 74 20 62 65 68 61 76 69 6f 75 72 0a 09 09 69  lt behaviour...i
19d0: 66 20 5b 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22  f [ "${version}"
19e0: 20 3d 20 22 63 76 73 5f 48 45 41 44 22 20 5d 3b   = "cvs_HEAD" ];
19f0: 20 74 68 65 6e 0a 09 09 09 6b 69 74 3d 22 24 28   then....kit="$(
1a00: 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20  echo "${kit}" | 
1a10: 73 65 64 20 27 73 40 2d 74 68 72 65 61 64 65 64  sed 's@-threaded
1a20: 40 2d 75 6e 74 68 72 65 61 64 65 64 40 27 29 22  @-unthreaded@')"
1a30: 0a 09 09 09 61 72 67 73 3d 22 24 28 65 63 68 6f  ....args="$(echo
1a40: 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 73 65 64   "${args}" | sed
1a50: 20 27 73 40 20 2d 2d 65 6e 61 62 6c 65 2d 74 68   's@ --enable-th
1a60: 72 65 61 64 73 40 20 2d 2d 64 69 73 61 62 6c 65  reads@ --disable
1a70: 2d 74 68 72 65 61 64 73 40 27 29 22 0a 09 09 66  -threads@')"...f
1a80: 69 0a 0a 09 09 23 20 43 72 65 61 74 65 20 54 63  i....# Create Tc
1a90: 6c 6b 69 74 0a 09 09 69 66 20 5b 20 22 24 7b 6b  lkit...if [ "${k
1aa0: 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b  itdll}" = "1" ];
1ab0: 20 74 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64   then....created
1ac0: 6b 69 74 3d 22 6c 69 62 74 63 6c 6b 69 74 2a 2e  kit="libtclkit*.
1ad0: 64 6c 6c 20 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a  dll libtclkit*.*
1ae0: 22 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d  "....outputname=
1af0: 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73  "${TESTDIR}/kits
1b00: 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b 76 65 72  /libtclkit-${ver
1b10: 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09  sion}-${kit}"...
1b20: 09 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d  .failoutputname=
1b30: 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73  "${TESTDIR}/kits
1b40: 2f 66 61 69 6c 65 64 2f 6c 69 62 74 63 6c 6b 69  /failed/libtclki
1b50: 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b  t-${version}-${k
1b60: 69 74 7d 22 0a 09 09 09 73 64 6b 3d 22 6c 69 62  it}"....sdk="lib
1b70: 74 63 6c 6b 69 74 2d 73 64 6b 2d 24 7b 76 65 72  tclkit-sdk-${ver
1b80: 73 69 6f 6e 7d 2e 74 61 72 2e 67 7a 22 0a 09 09  sion}.tar.gz"...
1b90: 65 6c 73 65 0a 09 09 09 63 72 65 61 74 65 64 6b  else....createdk
1ba0: 69 74 3d 22 74 63 6c 6b 69 74 2d 24 7b 76 65 72  it="tclkit-${ver
1bb0: 73 69 6f 6e 7d 22 0a 09 09 09 6f 75 74 70 75 74  sion}"....output
1bc0: 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d  name="${TESTDIR}
1bd0: 2f 6b 69 74 73 2f 74 63 6c 6b 69 74 2d 24 7b 76  /kits/tclkit-${v
1be0: 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a  ersion}-${kit}".
1bf0: 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d  ...failoutputnam
1c00: 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69  e="${TESTDIR}/ki
1c10: 74 73 2f 66 61 69 6c 65 64 2f 74 63 6c 6b 69 74  ts/failed/tclkit
1c20: 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69  -${version}-${ki
1c30: 74 7d 22 0a 09 09 09 73 64 6b 3d 27 27 0a 09 09  t}"....sdk=''...
1c40: 66 69 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22 24  fi...buildlog="$
1c50: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69  {outputname}-bui
1c60: 6c 64 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62 75  ld.log"...failbu
1c70: 69 6c 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f 75  ildlog="${failou
1c80: 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e  tputname}-build.
1c90: 6c 6f 67 22 0a 09 09 74 65 73 74 72 65 73 75 6c  log"...testresul
1ca0: 74 73 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74 6e  tslog="${outputn
1cb0: 61 6d 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22 0a  ame}-tests.log".
1cc0: 0a 09 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b  ...if [ ! -f "${
1cd0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20  outputname}" ]; 
1ce0: 74 68 65 6e 0a 09 09 09 75 6e 73 65 74 20 4b 49  then....unset KI
1cf0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20 53 54  TCREATOR_PKGS ST
1d00: 41 54 49 43 54 4b 20 53 54 52 49 50 0a 0a 09 09  ATICTK STRIP....
1d10: 09 69 66 20 5b 20 2d 66 20 22 24 7b 66 61 69 6c  .if [ -f "${fail
1d20: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20  outputname}" ]; 
1d30: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53  then.....echo "S
1d40: 6b 69 70 70 69 6e 67 20 72 65 62 75 69 6c 64 69  kipping rebuildi
1d50: 6e 67 20 66 61 69 6c 65 64 20 6b 69 74 20 24 7b  ng failed kit ${
1d60: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20  version}/${kit} 
1d70: 2e 2e 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65 64  ..."......failed
1d80: 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65  ="${failed} ${ve
1d90: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75  rsion}/${kit}-bu
1da0: 69 6c 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e  ild"......contin
1db0: 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d 20  ue....fi.....rm 
1dc0: 2d 66 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b 69  -f tclsh...../ki
1dd0: 74 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 20 3e  tcreator clean >
1de0: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
1df0: 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20 22  /null.....echo "
1e00: 43 72 65 61 74 69 6e 67 20 54 63 6c 6b 69 74 20  Creating Tclkit 
1e10: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
1e20: 7d 2e 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22 20  }..."....echo " 
1e30: 2a 2a 2a 20 42 75 69 6c 64 20 73 74 61 72 74 65  *** Build starte
1e40: 64 20 24 28 77 68 6f 61 6d 69 29 40 24 28 68 6f  d $(whoami)@$(ho
1e50: 73 74 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61 74  stname) on $(dat
1e60: 65 29 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  e)" > "${buildlo
1e70: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
1e80: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
1e90: 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75  ...echo " *** Bu
1ea0: 69 6c 64 20 53 63 72 69 70 74 22 20 3e 3e 20 22  ild Script" >> "
1eb0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09  ${buildlog}"....
1ec0: 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20  .if [ "${notk}" 
1ed0: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
1ee0: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
1ef0: 53 3d 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27 0a  S='itcl mk4tcl'.
1f00: 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22  ...fi.....if [ "
1f10: 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22 20  ${nomk4}" = "1" 
1f20: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 69 66 20 5b  ]; then.....if [
1f30: 20 2d 7a 20 22 24 7b 4b 49 54 43 52 45 41 54 4f   -z "${KITCREATO
1f40: 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e  R_PKGS}" ]; then
1f50: 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52  ......KITCREATOR
1f60: 5f 50 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27 0a  _PKGS='itcl tk'.
1f70: 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 4b 49  ....else......KI
1f80: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22 24  TCREATOR_PKGS="$
1f90: 28 65 63 68 6f 20 22 24 7b 4b 49 54 43 52 45 41  (echo "${KITCREA
1fa0: 54 4f 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65 64  TOR_PKGS}" | sed
1fb0: 20 27 73 40 6d 6b 34 74 63 6c 40 40 27 29 22 0a   's@mk4tcl@@')".
1fc0: 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09  ....fi....fi....
1fd0: 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d  .if [ "${kitdll}
1fe0: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
1ff0: 09 09 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b  ....if [ -z "${K
2000: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22  ITCREATOR_PKGS}"
2010: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b 49   ]; then......KI
2020: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74  TCREATOR_PKGS='t
2030: 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b 69  k itcl mk4tcl ki
2040: 74 64 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a 09  tdll'.....else..
2050: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
2060: 4b 47 53 3d 22 24 7b 4b 49 54 43 52 45 41 54 4f  KGS="${KITCREATO
2070: 52 5f 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22 0a  R_PKGS} kitdll".
2080: 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09  ....fi....fi....
2090: 09 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54  .export KITCREAT
20a0: 4f 52 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20 5b  OR_PKGS.....if [
20b0: 20 2d 6e 20 22 24 7b 4b 49 54 43 52 45 41 54 4f   -n "${KITCREATO
20c0: 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e  R_PKGS}" ]; then
20d0: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 4b 49 54  .....echo "  KIT
20e0: 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22 24  CREATOR_PKGS=\"$
20f0: 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53  {KITCREATOR_PKGS
2100: 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  }\"" >> "${build
2110: 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22  log}".....echo "
2120: 20 20 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41    export KITCREA
2130: 54 4f 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24 7b  TOR_PKGS" >> "${
2140: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69  buildlog}"....fi
2150: 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61  .....if [ "${sta
2160: 74 69 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b  tictk}" = "1" ];
2170: 20 74 68 65 6e 0a 09 09 09 09 53 54 41 54 49 43   then.....STATIC
2180: 54 4b 3d 22 31 22 0a 09 09 09 09 65 78 70 6f 72  TK="1".....expor
2190: 74 20 53 54 41 54 49 43 54 4b 0a 0a 09 09 09 09  t STATICTK......
21a0: 65 63 68 6f 20 22 20 20 53 54 41 54 49 43 54 4b  echo "  STATICTK
21b0: 3d 5c 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c 22  =\"${STATICTK}\"
21c0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
21d0: 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65  }".....echo "  e
21e0: 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 22 20  xport STATICTK" 
21f0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2200: 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 65 63  ....fi.....if ec
2210: 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 67  ho "${args}" | g
2220: 72 65 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65  rep -- '--enable
2230: 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76 2f  -symbols' >/dev/
2240: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 53  null; then.....S
2250: 54 52 49 50 3d 27 74 72 75 65 27 0a 09 09 09 09  TRIP='true'.....
2260: 65 78 70 6f 72 74 20 53 54 52 49 50 0a 0a 09 09  export STRIP....
2270: 09 09 65 63 68 6f 20 22 20 20 53 54 52 49 50 3d  ..echo "  STRIP=
2280: 27 74 72 75 65 27 22 20 3e 3e 20 22 24 7b 62 75  'true'" >> "${bu
2290: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
22a0: 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54 52 49  o "  export STRI
22b0: 50 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  P" >> "${buildlo
22c0: 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66  g}"....fi.....if
22d0: 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72   [ "${kitcreator
22e0: 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65 61  }" != "./kitcrea
22f0: 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  tor" ]; then....
2300: 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72 20 62  .echo "  mkdir b
2310: 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69 6c  uild" >> "${buil
2320: 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53 65  dlog}"......# Se
2330: 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69  veral build scri
2340: 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b  pts rely on mink
2350: 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69  it to work.....i
2360: 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f  f grep './build/
2370: 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24 7b  make-minkit' "${
2380: 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f 64  kitcreator}" >/d
2390: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
23a0: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 65  ull; then......e
23b0: 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f  cho "  cat << \_
23c0: 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64  _EOF__ > ./build
23d0: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e  /make-minkit" >>
23e0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
23f0: 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40  ....sed 's@^@  @
2400: 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  '  './build/make
2410: 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b 62  -minkit' >> "${b
2420: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65  uildlog}"......e
2430: 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20  cho "  __EOF__" 
2440: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2450: 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e  ......echo '' >>
2460: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2470: 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53 65 76  ...fi......# Sev
2480: 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70  eral build scrip
2490: 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d  ts rely on make-
24a0: 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65  kit-crosscompile
24b0: 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20   to work.....if 
24c0: 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61  grep './build/ma
24d0: 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70  ke-kit-crosscomp
24e0: 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65 61 74  ile' "${kitcreat
24f0: 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  or}" >/dev/null 
2500: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65  2>/dev/null; the
2510: 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20 63  n......echo "  c
2520: 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e  at << \__EOF__ >
2530: 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69   ./build/make-ki
2540: 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22 20  t-crosscompile" 
2550: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2560: 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ......sed 's@^@ 
2570: 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61   @'  './build/ma
2580: 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70  ke-kit-crosscomp
2590: 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  ile' >> "${build
25a0: 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20  log}"......echo 
25b0: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
25c0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
25d0: 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b  ..echo '' >> "${
25e0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66  buildlog}".....f
25f0: 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20 63  i......echo "  c
2600: 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e  at << \__EOF__ >
2610: 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20   ${kitcreator}" 
2620: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2630: 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20  .....sed 's@^@  
2640: 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61 74 6f  @'  "${kitcreato
2650: 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  r}" >> "${buildl
2660: 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20  og}".....echo " 
2670: 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b   __EOF__" >> "${
2680: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65  buildlog}".....e
2690: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
26a0: 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09 09  ldlog}"....fi...
26b0: 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69 74  .echo "  \"${kit
26c0: 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b 76  creator}\" \"${v
26d0: 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67 73  ersion}\" ${args
26e0: 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  }" >> "${buildlo
26f0: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
2700: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2710: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2720: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
2730: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
2740: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2750: 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73 75  " *** Build Resu
2760: 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  lts" >> "${build
2770: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
2780: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2790: 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69 6c 65  ".....buildfaile
27a0: 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69 74 63  d="0"...."${kitc
27b0: 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65 72 73  reator}" "${vers
27c0: 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e 3e  ion}" ${args} >>
27d0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32   "${buildlog}" 2
27e0: 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61 69 6c  >&1 || buildfail
27f0: 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70 20 2d  ed="1"....grep -
2800: 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f  n '^' */build.lo
2810: 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  g >> "${buildlog
2820: 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b  }" 2>&1.....if [
2830: 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22   "${kitdll}" = "
2840: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 23  1" ]; then.....#
2850: 20 43 72 65 61 74 65 20 74 65 73 74 20 64 72 69   Create test dri
2860: 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c 0a  vers for KitDLL.
2870: 09 09 09 09 28 0a 09 09 09 09 09 65 63 68 6f 20  ....(......echo 
2880: 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a  ""......echo "".
2890: 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09  .....echo ""....
28a0: 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69  ..echo " *** Bui
28b0: 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65 73  lding KitDLL tes
28c0: 74 20 64 72 69 76 65 72 20 28 74 63 6c 73 68 29  t driver (tclsh)
28d0: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 0a  "......echo ""..
28e0: 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f 62 75  .....cd kitsh/bu
28f0: 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20  ild/kitsh-*/ || 
2900: 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61 6b 65  exit 1......make
2910: 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70 20 74   tclsh......cp t
2920: 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09  clsh ../../../..
2930: 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c 64  ...) >> "${build
2940: 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09 66 69  log}" 2>&1....fi
2950: 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d 20 77  .....# Perform w
2960: 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73 69 6f  ildcard expansio
2970: 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d  n....createdkit=
2980: 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72 65 61  "$(ls -f1 ${crea
2990: 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f 6e  tedkit} 2>/dev/n
29a0: 75 6c 6c 20 7c 20 67 72 65 70 20 2d 76 20 27 5c  ull | grep -v '\
29b0: 2e 74 61 72 5c 2e 67 7a 24 27 20 7c 20 68 65 61  .tar\.gz$' | hea
29c0: 64 20 2d 6e 20 31 29 22 0a 0a 09 09 09 69 66 20  d -n 1)".....if 
29d0: 5b 20 21 20 2d 66 20 22 24 7b 63 72 65 61 74 65  [ ! -f "${create
29e0: 64 6b 69 74 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  dkit}" ]; then..
29f0: 09 09 09 65 63 68 6f 20 22 46 61 69 6c 65 64 20  ...echo "Failed 
2a00: 74 6f 20 63 72 65 61 74 65 20 6b 69 74 20 24 7b  to create kit ${
2a10: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22  version}/${kit}"
2a20: 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64   >&2......failed
2a30: 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65  ="${failed} ${ve
2a40: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75  rsion}/${kit}-bu
2a50: 69 6c 64 22 0a 0a 09 09 09 09 74 6f 75 63 68 20  ild"......touch 
2a60: 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d  "${failoutputnam
2a70: 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b 62 75  e}".....mv "${bu
2a80: 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c  ildlog}" "${fail
2a90: 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09  buildlog}"......
2aa0: 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09  rm -f tclsh.....
2ab0: 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a  .continue....fi.
2ac0: 0a 09 09 09 23 20 56 65 72 69 66 79 20 73 61 6e  ....# Verify san
2ad0: 69 74 79 20 6f 66 20 63 72 65 61 74 65 64 20 6b  ity of created k
2ae0: 69 74 0a 09 09 09 69 73 73 61 6e 65 3d 31 0a 0a  it....issane=1..
2af0: 09 09 09 23 23 20 56 65 72 69 66 79 20 74 68 61  ...## Verify tha
2b00: 74 20 57 69 6e 33 32 20 62 75 69 6c 64 73 20 61  t Win32 builds a
2b10: 72 65 20 6f 66 20 63 6f 72 72 65 63 74 20 74 79  re of correct ty
2b20: 70 65 0a 09 09 09 23 23 20 56 65 72 69 66 79 20  pe....## Verify 
2b30: 74 68 61 74 20 44 4c 4c 20 62 75 69 6c 64 73 20  that DLL builds 
2b40: 61 72 65 20 6f 66 20 63 6f 72 72 65 63 74 20 74  are of correct t
2b50: 79 70 65 0a 09 09 09 63 61 73 65 20 22 2d 24 7b  ype....case "-${
2b60: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d  version}-${kit}-
2b70: 22 20 69 6e 0a 09 09 09 09 2a 2d 77 69 6e 33 32  " in.....*-win32
2b80: 2d 6b 69 74 64 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33  -kitdll-*|*-win3
2b90: 32 2d 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09  2-*-kitdll-*)...
2ba0: 09 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b  ...if ! file "${
2bb0: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67  createdkit}" | g
2bc0: 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 20  rep 'MS Windows 
2bd0: 28 44 4c 4c 29 27 20 3e 2f 64 65 76 2f 6e 75 6c  (DLL)' >/dev/nul
2be0: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73  l; then.......is
2bf0: 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09  sane=0......fi..
2c00: 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 6b 69 74  ....;;.....*-kit
2c10: 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  dll-*)......if !
2c20: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
2c30: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 73 68  kit}" | grep 'sh
2c40: 61 72 65 64 20 6f 62 6a 65 63 74 27 20 3e 2f 64  ared object' >/d
2c50: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2c60: 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09  ....issane=0....
2c70: 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09  ..fi......;;....
2c80: 09 2a 2d 77 69 6e 33 32 2d 6e 6f 74 6b 2d 2a 7c  .*-win32-notk-*|
2c90: 2a 2d 77 69 6e 33 32 2d 2a 2d 6e 6f 74 6b 2d 2a  *-win32-*-notk-*
2ca0: 29 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65  )......if ! file
2cb0: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
2cc0: 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64   | grep 'MS Wind
2cd0: 6f 77 73 20 28 63 6f 6e 73 6f 6c 65 29 27 20 3e  ows (console)' >
2ce0: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
2cf0: 09 09 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20  ......echo "Kit 
2d00: 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68  failed sanity ch
2d10: 65 63 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20  eck for being a 
2d20: 63 6f 6e 73 6f 6c 65 20 61 70 70 6c 69 63 61 74  console applicat
2d30: 69 6f 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69  ion" >&2.......i
2d40: 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a  ssane=0......fi.
2d50: 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69  .....;;.....*-wi
2d60: 6e 33 32 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  n32-*)......if !
2d70: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
2d80: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53  kit}" | grep 'MS
2d90: 20 57 69 6e 64 6f 77 73 20 28 47 55 49 29 27 20   Windows (GUI)' 
2da0: 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e  >/dev/null; then
2db0: 0a 09 09 09 09 09 09 65 63 68 6f 20 22 4b 69 74  .......echo "Kit
2dc0: 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63   failed sanity c
2dd0: 68 65 63 6b 20 66 6f 72 20 62 65 69 6e 67 20 61  heck for being a
2de0: 20 47 55 49 20 61 70 70 6c 69 63 61 74 69 6f 6e   GUI application
2df0: 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73 61  " >&2.......issa
2e00: 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09  ne=0......fi....
2e10: 09 09 3b 3b 0a 09 09 09 65 73 61 63 0a 0a 09 09  ..;;....esac....
2e20: 09 23 23 20 56 65 72 69 66 79 20 74 68 65 20 62  .## Verify the b
2e30: 75 69 6c 64 20 63 6f 6d 70 6c 65 74 65 64 20 77  uild completed w
2e40: 69 74 68 6f 75 74 20 77 61 72 6e 69 6e 67 73 0a  ithout warnings.
2e50: 09 09 09 69 66 20 5b 20 22 24 7b 62 75 69 6c 64  ...if [ "${build
2e60: 66 61 69 6c 65 64 7d 22 20 3d 20 22 31 22 20 5d  failed}" = "1" ]
2e70: 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20  ; then.....echo 
2e80: 22 4b 69 74 20 66 61 69 6c 65 64 20 73 61 6e 69  "Kit failed sani
2e90: 74 79 20 63 68 65 63 6b 20 66 6f 72 20 42 75 69  ty check for Bui
2ea0: 6c 64 69 6e 67 22 20 3e 26 32 0a 0a 09 09 09 09  lding" >&2......
2eb0: 69 73 73 61 6e 65 3d 30 0a 09 09 09 66 69 0a 0a  issane=0....fi..
2ec0: 09 09 09 23 20 4d 61 6b 65 20 6e 6f 74 65 20 6f  ...# Make note o
2ed0: 66 20 73 61 6e 69 74 79 20 66 61 69 6c 75 72 65  f sanity failure
2ee0: 0a 09 09 09 69 66 20 5b 20 22 24 7b 69 73 73 61  ....if [ "${issa
2ef0: 6e 65 7d 22 20 21 3d 20 22 31 22 20 5d 3b 20 74  ne}" != "1" ]; t
2f00: 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b 69  hen.....echo "Ki
2f10: 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20  t failed sanity 
2f20: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
2f30: 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c  }" >&2......fail
2f40: 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b  ed="${failed} ${
2f50: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d  version}/${kit}-
2f60: 73 61 6e 69 74 79 22 0a 0a 09 09 09 09 6d 76 20  sanity"......mv 
2f70: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
2f80: 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d  "${failoutputnam
2f90: 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b 62 75  e}".....mv "${bu
2fa0: 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c  ildlog}" "${fail
2fb0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09  buildlog}"......
2fc0: 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09  rm -f tclsh.....
2fd0: 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a  .continue....fi.
2fe0: 0a 09 09 09 23 20 52 65 6e 61 6d 65 20 63 72 65  ....# Rename cre
2ff0: 61 74 65 64 20 6b 69 74 20 74 6f 20 66 69 6e 61  ated kit to fina
3000: 6c 20 64 65 73 74 69 6e 61 74 69 6f 6e 0a 09 09  l destination...
3010: 09 6d 76 20 22 24 7b 63 72 65 61 74 65 64 6b 69  .mv "${createdki
3020: 74 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  t}" "${outputnam
3030: 65 7d 22 0a 09 09 09 69 66 20 5b 20 2d 66 20 22  e}"....if [ -f "
3040: 74 63 6c 73 68 22 20 5d 3b 20 74 68 65 6e 0a 09  tclsh" ]; then..
3050: 09 09 09 6d 76 20 22 74 63 6c 73 68 22 20 22 24  ...mv "tclsh" "$
3060: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63 6c  {outputname}-tcl
3070: 73 68 22 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  sh"....fi.....# 
3080: 46 6f 72 20 4b 69 74 44 4c 4c 2c 20 6d 61 6b 65  For KitDLL, make
3090: 20 61 20 6e 6f 74 65 20 6f 66 20 74 68 65 20 6f   a note of the o
30a0: 72 69 67 69 6e 61 6c 20 6e 61 6d 65 0a 09 09 09  riginal name....
30b0: 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22  if [ "${kitdll}"
30c0: 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09   = "1" ]; then..
30d0: 09 09 09 65 63 68 6f 20 22 24 7b 63 72 65 61 74  ...echo "${creat
30e0: 65 64 6b 69 74 7d 22 20 3e 20 22 24 7b 6f 75 74  edkit}" > "${out
30f0: 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d  putname}-orignam
3100: 65 22 0a 0a 09 09 09 09 69 66 20 5b 20 2d 66 20  e"......if [ -f 
3110: 22 24 7b 73 64 6b 7d 22 20 5d 3b 20 74 68 65 6e  "${sdk}" ]; then
3120: 0a 09 09 09 09 09 6d 76 20 22 24 7b 73 64 6b 7d  ......mv "${sdk}
3130: 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  " "${outputname}
3140: 2d 73 64 6b 2e 74 61 72 2e 67 7a 22 0a 09 09 09  -sdk.tar.gz"....
3150: 09 66 69 0a 09 09 09 66 69 0a 09 09 66 69 0a 0a  .fi....fi...fi..
3160: 09 09 23 20 54 65 73 74 20 7a 69 70 20 73 74 61  ..# Test zip sta
3170: 74 75 73 0a 09 09 69 66 20 75 6e 7a 69 70 20 2d  tus...if unzip -
3180: 6c 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  l "${outputname}
3190: 22 20 32 3e 26 31 20 7c 20 67 72 65 70 20 27 62  " 2>&1 | grep 'b
31a0: 6f 6f 74 5c 2e 74 63 6c 27 20 3e 2f 64 65 76 2f  oot\.tcl' >/dev/
31b0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 63 61  null; then....ca
31c0: 6e 75 6e 7a 69 70 3d 22 31 22 0a 09 09 65 6c 73  nunzip="1"...els
31d0: 65 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22 30  e....canunzip="0
31e0: 22 0a 09 09 66 69 0a 0a 09 09 69 66 20 5b 20 22  "...fi....if [ "
31f0: 24 7b 69 73 7a 69 70 7d 22 20 21 3d 20 22 24 7b  ${iszip}" != "${
3200: 63 61 6e 75 6e 7a 69 70 7d 22 20 5d 3b 20 74 68  canunzip}" ]; th
3210: 65 6e 0a 09 09 09 65 63 68 6f 20 22 46 61 69 6c  en....echo "Fail
3220: 65 64 20 74 6f 20 75 6e 7a 69 70 20 7a 69 70 6b  ed to unzip zipk
3230: 69 74 20 6f 72 20 77 61 73 20 61 62 6c 65 20 74  it or was able t
3240: 6f 20 75 6e 7a 69 70 20 6e 6f 6e 2d 7a 69 70 6b  o unzip non-zipk
3250: 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b  it ${version}/${
3260: 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 66 61  kit}" >&2.....fa
3270: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
3280: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
3290: 7d 2d 7a 69 70 22 0a 0a 09 09 09 63 6f 6e 74 69  }-zip".....conti
32a0: 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20 44 6f  nue...fi....# Do
32b0: 20 6e 6f 74 20 63 6f 6e 74 69 6e 75 65 20 70 61   not continue pa
32c0: 73 74 20 68 65 72 65 20 66 6f 72 20 75 6e 2d 72  st here for un-r
32d0: 75 6e 6e 61 62 6c 65 20 6b 69 74 73 0a 09 09 69  unnable kits...i
32e0: 66 20 5b 20 22 24 7b 72 75 6e 6e 61 62 6c 65 7d  f [ "${runnable}
32f0: 22 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  " != "1" ]; then
3300: 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66  ....continue...f
3310: 69 0a 0a 09 09 23 20 49 66 20 74 68 65 20 6e 61  i....# If the na
3320: 6d 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e  me of the origin
3330: 61 6c 20 62 75 69 6c 64 20 6d 61 74 74 65 72 73  al build matters
3340: 2c 20 73 79 6d 6c 69 6e 6b 20 69 74 20 75 70 0a  , symlink it up.
3350: 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74  ..if [ -f "${out
3360: 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d  putname}-orignam
3370: 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72  e" ]; then....cr
3380: 65 61 74 65 64 6b 69 74 3d 22 24 28 63 61 74 20  eatedkit="$(cat 
3390: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 6f  "${outputname}-o
33a0: 72 69 67 6e 61 6d 65 22 29 22 0a 0a 09 09 09 6c  rigname")".....l
33b0: 6e 20 2d 73 20 22 24 7b 6f 75 74 70 75 74 6e 61  n -s "${outputna
33c0: 6d 65 7d 22 20 22 24 7b 63 72 65 61 74 65 64 6b  me}" "${createdk
33d0: 69 74 7d 22 0a 09 09 66 69 0a 0a 09 09 23 20 50  it}"...fi....# P
33e0: 65 72 66 6f 72 6d 20 62 61 74 74 65 72 79 20 6f  erform battery o
33f0: 66 20 74 65 73 74 73 0a 09 09 23 23 20 43 6c 65  f tests...## Cle
3400: 61 6e 20 74 65 73 74 73 20 6c 6f 67 0a 09 09 72  an tests log...r
3410: 6d 20 2d 66 20 22 24 7b 74 65 73 74 72 65 73 75  m -f "${testresu
3420: 6c 74 73 6c 6f 67 7d 22 0a 09 09 66 6f 72 20 74  ltslog}"...for t
3430: 65 73 74 73 63 70 20 69 6e 20 22 24 7b 54 45 53  estscp in "${TES
3440: 54 44 49 52 7d 22 2f 74 65 73 74 73 2f 2a 2e 74  TDIR}"/tests/*.t
3450: 63 6c 3b 20 64 6f 0a 09 09 09 74 65 73 74 73 63  cl; do....testsc
3460: 70 5f 74 61 67 3d 22 24 28 62 61 73 65 6e 61 6d  p_tag="$(basenam
3470: 65 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20 2e  e "${testscp}" .
3480: 74 63 6c 29 22 0a 09 09 09 74 65 73 74 73 63 70  tcl)"....testscp
3490: 70 72 65 3d 22 24 28 64 69 72 6e 61 6d 65 20 22  pre="$(dirname "
34a0: 24 7b 74 65 73 74 73 63 70 7d 22 29 2f 24 7b 74  ${testscp}")/${t
34b0: 65 73 74 73 63 70 5f 74 61 67 7d 2e 73 68 22 0a  estscp_tag}.sh".
34c0: 09 09 09 73 63 70 6c 6f 67 66 69 6c 65 3d 22 24  ...scplogfile="$
34d0: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 24 7b 74  {outputname}-${t
34e0: 65 73 74 73 63 70 5f 74 61 67 7d 2e 6c 6f 67 22  estscp_tag}.log"
34f0: 0a 0a 09 09 09 23 20 49 66 20 61 20 63 6f 6d 6d  .....# If a comm
3500: 61 6e 64 20 69 73 20 72 65 71 75 69 72 65 64 20  and is required 
3510: 74 6f 20 73 74 61 72 74 20 74 68 65 20 6b 69 74  to start the kit
3520: 2c 20 70 72 65 70 61 72 65 20 74 6f 20 6b 69 6c  , prepare to kil
3530: 6c 20 69 74 0a 09 09 09 23 20 69 6e 20 63 61 73  l it....# in cas
3540: 65 20 6f 66 20 74 69 6d 65 6f 75 74 2e 0a 09 09  e of timeout....
3550: 09 23 23 20 54 65 6d 70 6f 72 61 72 69 6c 79 20  .## Temporarily 
3560: 64 69 73 61 62 6c 65 64 20 73 69 6e 63 65 20 63  disabled since c
3570: 75 72 72 65 6e 74 6c 79 20 69 74 20 69 73 20 63  urrently it is c
3580: 61 75 73 69 6e 67 0a 09 09 09 23 23 20 6d 6f 72  ausing....## mor
3590: 65 20 70 72 6f 62 6c 65 6d 73 20 69 6e 20 74 68  e problems in th
35a0: 65 20 66 6f 72 6d 20 6f 66 20 74 65 73 74 73 20  e form of tests 
35b0: 62 65 69 6e 67 20 6b 69 6c 6c 65 64 0a 09 09 09  being killed....
35c0: 23 23 20 70 72 65 6d 61 74 75 72 65 6c 79 20 74  ## prematurely t
35d0: 68 61 6e 20 77 65 20 61 72 65 20 68 61 76 69 6e  han we are havin
35e0: 67 20 69 73 73 75 65 73 20 77 69 74 68 20 74 65  g issues with te
35f0: 73 74 73 0a 09 09 09 23 23 20 68 61 6e 67 69 6e  sts....## hangin
3600: 67 0a 09 09 09 6b 69 74 72 75 6e 6b 69 6c 6c 70  g....kitrunkillp
3610: 69 64 3d 22 22 0a 09 09 09 69 66 20 5b 20 22 31  id=""....if [ "1
3620: 22 20 3d 20 22 30 22 20 2d 61 20 2d 6e 20 22 24  " = "0" -a -n "$
3630: 7b 6b 69 74 72 75 6e 63 6d 64 7d 22 20 5d 3b 20  {kitruncmd}" ]; 
3640: 74 68 65 6e 0a 09 09 09 09 28 0a 09 09 09 09 09  then.....(......
3650: 73 6c 65 65 70 20 31 32 30 0a 09 09 09 09 09 6b  sleep 120......k
3660: 69 6c 6c 61 6c 6c 20 22 24 28 62 61 73 65 6e 61  illall "$(basena
3670: 6d 65 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  me "${outputname
3680: 7d 22 29 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  }")" >/dev/null 
3690: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 09  2>/dev/null.....
36a0: 29 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  ) >/dev/null 2>/
36b0: 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 09 09 09 6b  dev/null &.....k
36c0: 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 24 21  itrunkillpid="$!
36d0: 22 0a 09 09 09 66 69 0a 0a 09 09 09 28 0a 09 09  "....fi.....(...
36e0: 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 74 65 73  ..if [ -f "${tes
36f0: 74 73 63 70 70 72 65 7d 22 20 5d 3b 20 74 68 65  tscppre}" ]; the
3700: 6e 0a 09 09 09 09 09 2e 20 22 24 7b 74 65 73 74  n....... "${test
3710: 73 63 70 70 72 65 7d 22 0a 09 09 09 09 66 69 0a  scppre}".....fi.
3720: 0a 09 09 09 09 69 66 20 5b 20 22 24 7b 6b 69 74  .....if [ "${kit
3730: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
3740: 68 65 6e 0a 09 09 09 09 09 24 7b 6b 69 74 72 75  hen......${kitru
3750: 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e  ncmd} "${outputn
3760: 61 6d 65 7d 2d 74 63 6c 73 68 22 20 22 24 7b 74  ame}-tclsh" "${t
3770: 65 73 74 73 63 70 7d 22 20 22 24 7b 6f 75 74 70  estscp}" "${outp
3780: 75 74 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d  utname}" "${kit}
3790: 22 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09  " "${version}"..
37a0: 09 09 09 65 6c 73 65 0a 09 09 09 09 09 24 7b 6b  ...else......${k
37b0: 69 74 72 75 6e 63 6d 64 7d 20 22 24 7b 6f 75 74  itruncmd} "${out
37c0: 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 74 65 73  putname}" "${tes
37d0: 74 73 63 70 7d 22 20 22 24 7b 6f 75 74 70 75 74  tscp}" "${output
37e0: 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20  name}" "${kit}" 
37f0: 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09  "${version}"....
3800: 09 66 69 0a 09 09 09 29 20 3e 20 22 24 7b 73 63  .fi....) > "${sc
3810: 70 6c 6f 67 66 69 6c 65 7d 22 20 32 3e 26 31 0a  plogfile}" 2>&1.
3820: 0a 09 09 09 69 66 20 5b 20 22 24 3f 22 20 21 3d  ....if [ "$?" !=
3830: 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "0" ]; then....
3840: 09 65 63 68 6f 20 22 53 63 72 69 70 74 20 66 61  .echo "Script fa
3850: 69 6c 65 64 3a 20 24 7b 74 65 73 74 73 63 70 5f  iled: ${testscp_
3860: 74 61 67 7d 20 6f 6e 20 24 7b 76 65 72 73 69 6f  tag} on ${versio
3870: 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a  n}/${kit}" >&2..
3880: 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66 61  ....failed="${fa
3890: 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d  iled} ${version}
38a0: 2f 24 7b 6b 69 74 7d 2d 74 65 73 74 2d 24 7b 74  /${kit}-test-${t
38b0: 65 73 74 73 63 70 5f 74 61 67 7d 22 0a 0a 09 09  estscp_tag}"....
38c0: 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74 73 63  ..echo "${testsc
38d0: 70 5f 74 61 67 7d 3a 20 46 41 49 4c 22 20 3e 3e  p_tag}: FAIL" >>
38e0: 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74 73    "${testresults
38f0: 6c 6f 67 7d 22 0a 0a 09 09 09 09 63 6f 6e 74 69  log}"......conti
3900: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  nue....fi.....# 
3910: 4b 69 6c 6c 20 74 68 65 20 77 61 74 63 68 64 6f  Kill the watchdo
3920: 67 20 66 6f 72 20 74 68 69 73 20 69 74 65 72 61  g for this itera
3930: 74 69 6f 6e 0a 09 09 09 69 66 20 5b 20 2d 6e 20  tion....if [ -n 
3940: 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64  "${kitrunkillpid
3950: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6b  }" ]; then.....k
3960: 69 6c 6c 20 2d 39 20 22 24 7b 6b 69 74 72 75 6e  ill -9 "${kitrun
3970: 6b 69 6c 6c 70 69 64 7d 22 20 3e 2f 64 65 76 2f  killpid}" >/dev/
3980: 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c  null 2>/dev/null
3990: 0a 09 09 09 66 69 0a 0a 09 09 09 65 63 68 6f 20  ....fi.....echo 
39a0: 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a  "${testscp_tag}:
39b0: 20 50 41 53 53 22 20 3e 3e 20 20 22 24 7b 74 65   PASS" >>  "${te
39c0: 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a  stresultslog}"..
39d0: 09 09 09 72 6d 20 2d 66 20 22 24 7b 73 63 70 6c  ...rm -f "${scpl
39e0: 6f 67 66 69 6c 65 7d 22 0a 09 09 64 6f 6e 65 0a  ogfile}"...done.
39f0: 0a 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75  ...if [ -f "${ou
3a00: 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61  tputname}-origna
3a10: 6d 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 72  me" ]; then....r
3a20: 6d 20 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b  m -f "${createdk
3a30: 69 74 7d 22 0a 09 09 66 69 0a 09 64 6f 6e 65 0a  it}"...fi..done.
3a40: 64 6f 6e 65 0a 0a 69 66 20 5b 20 2d 6e 20 22 24  done..if [ -n "$
3a50: 7b 66 61 69 6c 65 64 7d 22 20 5d 3b 20 74 68 65  {failed}" ]; the
3a60: 6e 0a 09 65 63 68 6f 20 22 46 61 69 6c 65 64 3a  n..echo "Failed:
3a70: 20 24 7b 66 61 69 6c 65 64 7d 22 0a 66 69 0a 0a   ${failed}".fi..
3a80: 23 20 43 6c 65 61 6e 75 70 0a 23 23 20 54 65 72  # Cleanup.## Ter
3a90: 6d 69 6e 61 74 65 20 58 76 66 62 0a 6b 69 6c 6c  minate Xvfb.kill
3aa0: 20 2d 39 20 22 24 7b 58 56 46 42 5f 50 49 44 7d   -9 "${XVFB_PID}
3ab0: 22 0a 0a 23 23 20 52 65 6d 6f 76 65 20 77 69 6e  "..## Remove win
3ac0: 65 0a 72 6d 20 2d 72 66 20 22 24 7b 57 49 4e 45  e.rm -rf "${WINE
3ad0: 50 52 45 46 49 58 7d 22 0a 0a 2e 2f 6b 69 74 63  PREFIX}".../kitc
3ae0: 72 65 61 74 6f 72 20 63 6c 65 61 6e 0a 72 6d 20  reator clean.rm 
3af0: 2d 66 20 74 63 6c 73 68 0a                       -f tclsh.