Hex Artifact Content

Artifact a279f86cb1bee3aa701a2f46a39d3890e2c0810a:


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 35 2e 31 32 20 63  RSIONS="8.5.12 c
0020: 76 73 5f 48 45 41 44 22 0a 0a 23 20 46 69 6e 64  vs_HEAD"..# Find
0030: 20 74 68 65 20 62 61 73 65 20 64 69 72 65 63 74   the base direct
0040: 6f 72 79 0a 66 6f 72 20 78 20 69 6e 20 31 20 32  ory.for x in 1 2
0050: 20 33 20 34 20 5f 5f 66 61 69 6c 5f 5f 3b 20 64   3 4 __fail__; d
0060: 6f 0a 09 69 66 20 5b 20 22 24 7b 78 7d 22 20 3d  o..if [ "${x}" =
0070: 20 22 5f 5f 66 61 69 6c 5f 5f 22 20 5d 3b 20 74   "__fail__" ]; t
0080: 68 65 6e 0a 09 09 65 63 68 6f 20 27 55 6e 61 62  hen...echo 'Unab
0090: 6c 65 20 74 6f 20 66 69 6e 64 20 4b 69 74 43 72  le to find KitCr
00a0: 65 61 74 6f 72 2c 20 61 62 6f 72 74 69 6e 67 2e  eator, aborting.
00b0: 27 20 3e 26 32 0a 0a 09 09 65 78 69 74 20 31 0a  ' >&2....exit 1.
00c0: 09 66 69 0a 0a 09 69 66 20 5b 20 2d 78 20 6b 69  .fi...if [ -x ki
00d0: 74 63 72 65 61 74 6f 72 20 5d 3b 20 74 68 65 6e  tcreator ]; then
00e0: 0a 09 09 62 72 65 61 6b 0a 09 66 69 0a 0a 09 63  ...break..fi...c
00f0: 64 20 2e 2e 0a 64 6f 6e 65 0a 0a 52 4f 4f 54 44  d ...done..ROOTD
0100: 49 52 3d 22 24 28 70 77 64 29 22 0a 54 45 53 54  IR="$(pwd)".TEST
0110: 44 49 52 3d 22 24 7b 52 4f 4f 54 44 49 52 7d 2f  DIR="${ROOTDIR}/
0120: 62 75 69 6c 64 2f 74 65 73 74 22 0a 65 78 70 6f  build/test".expo
0130: 72 74 20 52 4f 4f 54 44 49 52 20 54 45 53 54 44  rt ROOTDIR TESTD
0140: 49 52 0a 0a 23 20 48 61 6e 64 6c 65 20 63 6f 6d  IR..# Handle com
0150: 6d 61 6e 64 2d 6c 69 6e 65 20 61 72 67 75 6d 65  mand-line argume
0160: 6e 74 73 0a 69 66 20 5b 20 22 24 31 22 20 3d 20  nts.if [ "$1" = 
0170: 22 63 6c 65 61 6e 22 20 5d 3b 20 74 68 65 6e 0a  "clean" ]; then.
0180: 09 72 6d 20 2d 72 66 20 22 24 7b 54 45 53 54 44  .rm -rf "${TESTD
0190: 49 52 7d 2f 6b 69 74 73 22 0a 66 69 0a 0a 23 20  IR}/kits".fi..# 
01a0: 43 72 65 61 74 65 20 70 6c 61 63 65 20 74 6f 20  Create place to 
01b0: 70 75 74 20 6b 69 74 73 0a 6d 6b 64 69 72 20 22  put kits.mkdir "
01c0: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
01d0: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
01e0: 65 76 2f 6e 75 6c 6c 0a 6d 6b 64 69 72 20 22 24  ev/null.mkdir "$
01f0: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
0200: 61 69 6c 65 64 22 20 3e 2f 64 65 76 2f 6e 75 6c  ailed" >/dev/nul
0210: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 69 66  l 2>/dev/null.if
0220: 20 5b 20 21 20 2d 64 20 22 24 7b 54 45 53 54 44   [ ! -d "${TESTD
0230: 49 52 7d 2f 6b 69 74 73 22 20 5d 3b 20 74 68 65  IR}/kits" ]; the
0240: 6e 0a 09 65 63 68 6f 20 27 55 6e 61 62 6c 65 20  n..echo 'Unable 
0250: 74 6f 20 63 72 65 61 74 65 20 6b 69 74 73 2f 20  to create kits/ 
0260: 64 69 72 65 63 74 6f 72 79 2c 20 61 62 6f 72 74  directory, abort
0270: 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 65 78 69 74  ing.' >&2...exit
0280: 20 31 0a 66 69 0a 0a 23 20 43 6c 65 61 6e 75 70   1.fi..# Cleanup
0290: 0a 66 6f 72 20 66 69 6c 65 20 69 6e 20 22 24 7b  .for file in "${
02a0: 54 45 53 54 44 49 52 7d 22 2f 6b 69 74 73 2f 2a  TESTDIR}"/kits/*
02b0: 2e 6c 6f 67 3b 20 64 6f 0a 09 69 66 20 65 63 68  .log; do..if ech
02c0: 6f 20 22 24 7b 66 69 6c 65 7d 22 20 7c 20 67 72  o "${file}" | gr
02d0: 65 70 20 2d 2d 20 27 2d 62 75 69 6c 64 2e 6c 6f  ep -- '-build.lo
02e0: 67 24 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20  g$' >/dev/null; 
02f0: 74 68 65 6e 0a 09 09 63 6f 6e 74 69 6e 75 65 0a  then...continue.
0300: 09 66 69 0a 0a 09 72 6d 20 2d 66 20 22 24 7b 66  .fi...rm -f "${f
0310: 69 6c 65 7d 22 0a 64 6f 6e 65 0a 0a 23 20 44 69  ile}".done..# Di
0320: 73 61 62 6c 65 20 57 49 4e 45 20 64 65 62 75 67  sable WINE debug
0330: 67 69 6e 67 0a 57 49 4e 45 50 52 45 46 49 58 3d  ging.WINEPREFIX=
0340: 22 24 7b 54 45 53 54 44 49 52 7d 2f 2e 77 69 6e  "${TESTDIR}/.win
0350: 65 22 0a 65 78 70 6f 72 74 20 57 49 4e 45 50 52  e".export WINEPR
0360: 45 46 49 58 0a 72 6d 20 2d 72 66 20 22 24 7b 57  EFIX.rm -rf "${W
0370: 49 4e 45 50 52 45 46 49 58 7d 22 0a 6d 6b 64 69  INEPREFIX}".mkdi
0380: 72 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d  r "${WINEPREFIX}
0390: 22 0a 0a 63 61 74 20 3c 3c 20 5c 5f 45 4f 46 5f  "..cat << \_EOF_
03a0: 20 3e 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58   > "${WINEPREFIX
03b0: 7d 2f 75 70 64 61 74 65 2d 72 65 67 22 0a 5b 48  }/update-reg".[H
03c0: 4b 45 59 5f 4c 4f 43 41 4c 5f 4d 41 43 48 49 4e  KEY_LOCAL_MACHIN
03d0: 45 5c 53 6f 66 74 77 61 72 65 5c 4d 69 63 72 6f  E\Software\Micro
03e0: 73 6f 66 74 5c 57 69 6e 64 6f 77 73 20 4e 54 5c  soft\Windows NT\
03f0: 43 75 72 72 65 6e 74 56 65 72 73 69 6f 6e 5c 41  CurrentVersion\A
0400: 65 44 65 62 75 67 5d 0a 22 41 75 74 6f 22 3d 64  eDebug]."Auto"=d
0410: 77 6f 72 64 3a 30 30 30 30 30 30 30 31 0a 22 44  word:00000001."D
0420: 65 62 75 67 67 65 72 22 3d 22 66 61 6c 73 65 22  ebugger"="false"
0430: 0a 5f 45 4f 46 5f 0a 0a 72 65 67 65 64 69 74 20  ._EOF_..regedit 
0440: 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d 2f 75  "${WINEPREFIX}/u
0450: 70 64 61 74 65 2d 72 65 67 22 20 3e 2f 64 65 76  pdate-reg" >/dev
0460: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
0470: 6c 0a 0a 23 20 53 74 61 72 74 20 58 76 66 62 20  l..# Start Xvfb 
0480: 66 6f 72 20 58 31 31 2d 62 61 73 65 64 20 74 65  for X11-based te
0490: 73 74 73 0a 58 56 46 42 5f 50 49 44 3d 22 24 28  sts.XVFB_PID="$(
04a0: 0a 09 58 76 66 62 20 3a 33 31 20 2d 73 63 72 65  ..Xvfb :31 -scre
04b0: 65 6e 20 30 20 38 30 30 78 36 30 30 78 32 34 20  en 0 800x600x24 
04c0: 2d 6e 6f 6c 69 73 74 65 6e 20 74 63 70 20 3e 2f  -nolisten tcp >/
04d0: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
04e0: 6e 75 6c 6c 20 26 0a 09 65 63 68 6f 20 22 24 21  null &..echo "$!
04f0: 22 0a 29 22 0a 44 49 53 50 4c 41 59 3d 3a 33 31  ".)".DISPLAY=:31
0500: 0a 65 78 70 6f 72 74 20 44 49 53 50 4c 41 59 0a  .export DISPLAY.
0510: 0a 69 66 20 5b 20 22 24 7b 42 49 47 42 55 49 4c  .if [ "${BIGBUIL
0520: 44 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  D}" = "1" ]; the
0530: 6e 0a 09 6b 69 74 73 3d 22 24 28 65 63 68 6f 20  n..kits="$(echo 
0540: 6e 6f 72 6d 61 6c 7b 2c 2d 7a 69 70 2c 2d 6e 6f  normal{,-zip,-no
0550: 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d  mk4}{,-threaded}
0560: 7b 2c 2d 73 74 61 74 69 63 74 6b 2c 2d 6e 6f 74  {,-statictk,-not
0570: 6b 7d 20 6e 6f 72 6d 61 6c 7b 2c 2d 74 68 72 65  k} normal{,-thre
0580: 61 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d  aded}{,-notk}{,-
0590: 6e 6f 6d 6b 34 7d 7b 2c 2d 64 65 62 75 67 7d 2d  nomk4}{,-debug}-
05a0: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
05b0: 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b  6{,-zip,-nomk4}{
05c0: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f  ,-threaded}{,-no
05d0: 74 6b 7d 20 77 69 6e 33 32 2d 69 35 38 36 7b 2c  tk} win32-i586{,
05e0: 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f 74  -threaded}{,-not
05f0: 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 2d 6b 69 74 64  k}{,-nomk4}-kitd
0600: 6c 6c 20 6d 69 6e 7b 2c 2d 73 74 61 74 69 63 7d  ll min{,-static}
0610: 20 7b 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d   {linux-mipsel-m
0620: 69 6e 7d 7b 2c 2d 64 65 62 75 67 7d 7b 2c 2d 6b  in}{,-debug}{,-k
0630: 69 74 64 6c 6c 7d 20 7b 6c 69 6e 75 78 2d 69 33  itdll} {linux-i3
0640: 38 36 2c 73 6f 6c 61 72 69 73 2d 69 33 38 36 2c  86,solaris-i386,
0650: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c 73 6f  solaris-amd64,so
0660: 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f 6c 61  laris-sparc,sola
0670: 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72 65 65  ris-sparc64,free
0680: 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62 73 64  bsd-amd64,netbsd
0690: 2d 61 6d 64 36 34 7d 7b 2c 2d 7a 69 70 2c 2d 6e  -amd64}{,-zip,-n
06a0: 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64  omk4}{,-threaded
06b0: 7d 7b 2c 2d 73 74 61 74 69 63 74 6b 2c 2d 6e 6f  }{,-statictk,-no
06c0: 74 6b 7d 7b 2c 64 65 62 75 67 7d 20 7b 73 6f 6c  tk}{,debug} {sol
06d0: 61 72 69 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69  aris-i386,solari
06e0: 73 2d 61 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d  s-amd64,solaris-
06f0: 73 70 61 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70  sparc,solaris-sp
0700: 61 72 63 36 34 2c 66 72 65 65 62 73 64 2d 61 6d  arc64,freebsd-am
0710: 64 36 34 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34  d64,netbsd-amd64
0720: 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d  }{,-threaded}{,-
0730: 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c  notk}{,-nomk4}{,
0740: 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 6e 65  debug}-kitdll ne
0750: 74 62 73 64 2d 69 33 38 36 7b 2c 2d 7a 69 70 2c  tbsd-i386{,-zip,
0760: 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64  -nomk4}{,-thread
0770: 65 64 7d 7b 2c 64 65 62 75 67 7d 2d 6e 6f 74 6b  ed}{,debug}-notk
0780: 20 6e 65 74 62 73 64 2d 69 33 38 36 7b 2c 2d 74   netbsd-i386{,-t
0790: 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f 6d 6b 34  hreaded}{,-nomk4
07a0: 7d 7b 2c 64 65 62 75 67 7d 2d 6e 6f 74 6b 2d 6b  }{,debug}-notk-k
07b0: 69 74 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72  itdll android-ar
07c0: 6d 2d 6e 6f 74 6b 7b 2c 2d 64 65 62 75 67 7d 20  m-notk{,-debug} 
07d0: 61 6e 64 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 7b  andoid-arm-notk{
07e0: 2c 2d 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 29  ,-debug}-kitdll)
07f0: 22 0a 65 6c 73 65 0a 09 6b 69 74 73 3d 22 6e 6f  ".else..kits="no
0800: 72 6d 61 6c 20 6e 6f 72 6d 61 6c 2d 7a 69 70 20  rmal normal-zip 
0810: 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 20  normal-threaded 
0820: 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d  normal-threaded-
0830: 7a 69 70 20 6e 6f 72 6d 61 6c 2d 73 74 61 74 69  zip normal-stati
0840: 63 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 20  ctk normal-notk 
0850: 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d  normal-threaded-
0860: 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72 65  notk normal-thre
0870: 61 64 65 64 2d 7a 69 70 2d 6e 6f 74 6b 20 6e 6f  aded-zip-notk no
0880: 72 6d 61 6c 2d 6e 6f 6d 6b 34 20 6e 6f 72 6d 61  rmal-nomk4 norma
0890: 6c 2d 64 65 62 75 67 20 6d 69 6e 20 6d 69 6e 2d  l-debug min min-
08a0: 73 74 61 74 69 63 20 6e 6f 72 6d 61 6c 2d 6b 69  static normal-ki
08b0: 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65  tdll normal-thre
08c0: 61 64 65 64 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d  aded-kitdll norm
08d0: 61 6c 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6e  al-notk-kitdll n
08e0: 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d 6b 69 74 64  ormal-nomk4-kitd
08f0: 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d  ll normal-nomk4-
0900: 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d  notk-kitdll norm
0910: 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b  al-threaded-nomk
0920: 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d  4-kitdll normal-
0930: 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b 2d 6e 6f  threaded-notk-no
0940: 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61  mk4-kitdll norma
0950: 6c 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 6d  l-debug-kitdll m
0960: 69 6e 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  in-kitdll win32-
0970: 69 35 38 36 20 77 69 6e 33 32 2d 69 35 38 36 2d  i586 win32-i586-
0980: 7a 69 70 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  zip win32-i586-t
0990: 68 72 65 61 64 65 64 20 77 69 6e 33 32 2d 69 35  hreaded win32-i5
09a0: 38 36 2d 74 68 72 65 61 64 65 64 2d 7a 69 70 20  86-threaded-zip 
09b0: 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 20  win32-i586-notk 
09c0: 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61  win32-i586-threa
09d0: 64 65 64 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69  ded-notk win32-i
09e0: 35 38 36 2d 6e 6f 6d 6b 34 20 77 69 6e 33 32 2d  586-nomk4 win32-
09f0: 69 35 38 36 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  i586-kitdll win3
0a00: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d  2-i586-threaded-
0a10: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
0a20: 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69  6-notk-kitdll wi
0a30: 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6b  n32-i586-nomk4-k
0a40: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
0a50: 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64  -nomk4-notk-kitd
0a60: 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68  ll win32-i586-th
0a70: 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74  readed-nomk4-kit
0a80: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  dll win32-i586-t
0a90: 68 72 65 61 64 65 64 2d 6e 6f 74 6b 2d 6e 6f 6d  hreaded-notk-nom
0aa0: 6b 34 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d  k4-kitdll linux-
0ab0: 6d 69 70 73 65 6c 2d 6e 6f 74 6b 20 6c 69 6e 75  mipsel-notk linu
0ac0: 78 2d 6d 69 70 73 65 6c 2d 6e 6f 74 6b 2d 6b 69  x-mipsel-notk-ki
0ad0: 74 64 6c 6c 20 6c 69 6e 75 78 2d 69 33 38 36 20  tdll linux-i386 
0ae0: 6c 69 6e 75 78 2d 69 33 38 36 2d 64 65 62 75 67  linux-i386-debug
0af0: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6b 69 74 64   linux-i386-kitd
0b00: 6c 6c 20 6c 69 6e 75 78 2d 69 33 38 36 2d 64 65  ll linux-i386-de
0b10: 62 75 67 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  bug-kitdll linux
0b20: 2d 69 33 38 36 2d 6e 6f 74 6b 20 6c 69 6e 75 78  -i386-notk linux
0b30: 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67  -i386-notk-debug
0b40: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b   linux-i386-notk
0b50: 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69 33  -kitdll linux-i3
0b60: 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69  86-notk-debug-ki
0b70: 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 69 33 38  tdll solaris-i38
0b80: 36 20 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64  6 solaris-i386-d
0b90: 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 69 33 38  ebug solaris-i38
0ba0: 36 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  6-kitdll solaris
0bb0: 2d 69 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64  -i386-debug-kitd
0bc0: 6c 6c 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34  ll solaris-amd64
0bd0: 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64   solaris-amd64-d
0be0: 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 61 6d 64  ebug solaris-amd
0bf0: 36 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  64-kitdll solari
0c00: 73 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69  s-amd64-debug-ki
0c10: 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61  tdll solaris-spa
0c20: 72 63 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  rc solaris-sparc
0c30: 2d 64 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 73  -debug solaris-s
0c40: 70 61 72 63 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61  parc-kitdll sola
0c50: 72 69 73 2d 73 70 61 72 63 2d 64 65 62 75 67 2d  ris-sparc-debug-
0c60: 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73  kitdll solaris-s
0c70: 70 61 72 63 36 34 20 73 6f 6c 61 72 69 73 2d 73  parc64 solaris-s
0c80: 70 61 72 63 36 34 2d 64 65 62 75 67 20 73 6f 6c  parc64-debug sol
0c90: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 6b 69 74  aris-sparc64-kit
0ca0: 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72  dll solaris-spar
0cb0: 63 36 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  c64-debug-kitdll
0cc0: 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34 20 66   freebsd-amd64 f
0cd0: 72 65 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62  reebsd-amd64-deb
0ce0: 75 67 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34  ug freebsd-amd64
0cf0: 2d 6b 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d  -kitdll freebsd-
0d00: 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64  amd64-debug-kitd
0d10: 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e  ll netbsd-i386-n
0d20: 6f 74 6b 20 6e 65 74 62 73 64 2d 69 33 38 36 2d  otk netbsd-i386-
0d30: 6e 6f 74 6b 2d 64 65 62 75 67 20 6e 65 74 62 73  notk-debug netbs
0d40: 64 2d 69 33 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64  d-i386-notk-kitd
0d50: 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e  ll netbsd-i386-n
0d60: 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  otk-debug-kitdll
0d70: 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 20 6e 65   netbsd-amd64 ne
0d80: 74 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67  tbsd-amd64-debug
0d90: 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 6b 69   netbsd-amd64-ki
0da0: 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36  tdll netbsd-amd6
0db0: 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 61  4-debug-kitdll a
0dc0: 6e 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 20  ndroid-arm-notk 
0dd0: 61 6e 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b  android-arm-notk
0de0: 2d 64 65 62 75 67 20 61 6e 64 72 6f 69 64 2d 61  -debug android-a
0df0: 72 6d 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61  rm-notk-kitdll a
0e00: 6e 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d  ndroid-arm-notk-
0e10: 64 65 62 75 67 2d 6b 69 74 64 6c 6c 22 0a 66 69  debug-kitdll".fi
0e20: 0a 0a 66 61 69 6c 65 64 3d 22 22 0a 66 6f 72 20  ..failed="".for 
0e30: 6b 69 74 20 69 6e 20 24 6b 69 74 73 3b 20 64 6f  kit in $kits; do
0e40: 0a 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f  ..kitcreator="./
0e50: 6b 69 74 63 72 65 61 74 6f 72 22 0a 09 61 72 67  kitcreator"..arg
0e60: 73 3d 22 22 0a 09 72 75 6e 6e 61 62 6c 65 3d 22  s=""..runnable="
0e70: 31 22 0a 09 69 73 7a 69 70 3d 22 30 22 0a 09 73  1"..iszip="0"..s
0e80: 74 61 74 69 63 74 6b 3d 22 30 22 0a 09 6e 6f 74  tatictk="0"..not
0e90: 6b 3d 22 30 22 0a 09 6e 6f 6d 6b 34 3d 22 30 22  k="0"..nomk4="0"
0ea0: 0a 09 78 63 6f 6d 70 69 6c 65 3d 22 30 22 0a 09  ..xcompile="0"..
0eb0: 6b 69 74 64 6c 6c 3d 22 30 22 0a 09 6b 69 74 72  kitdll="0"..kitr
0ec0: 75 6e 63 6d 64 3d 22 22 0a 0a 09 23 20 48 61 6e  uncmd=""...# Han
0ed0: 64 6c 65 20 62 61 73 65 20 63 6f 6e 66 69 67 75  dle base configu
0ee0: 72 61 74 69 6f 6e 0a 09 6f 73 3d 22 24 28 75 6e  ration..os="$(un
0ef0: 61 6d 65 20 2d 73 20 7c 20 64 64 20 63 6f 6e 76  ame -s | dd conv
0f00: 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e 75  =lcase 2>/dev/nu
0f10: 6c 6c 29 22 0a 09 63 70 75 3d 22 24 28 75 6e 61  ll)"..cpu="$(una
0f20: 6d 65 20 2d 6d 20 7c 20 64 64 20 63 6f 6e 76 3d  me -m | dd conv=
0f30: 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e 75 6c  lcase 2>/dev/nul
0f40: 6c 20 7c 20 73 65 64 20 27 73 40 78 38 36 5f 36  l | sed 's@x86_6
0f50: 34 40 61 6d 64 36 34 40 3b 73 40 69 2e 38 36 40  4@amd64@;s@i.86@
0f60: 69 33 38 36 40 27 29 22 0a 09 63 61 73 65 20 22  i386@')"..case "
0f70: 24 7b 6b 69 74 7d 22 20 69 6e 0a 09 09 6e 6f 72  ${kit}" in...nor
0f80: 6d 61 6c 7c 6e 6f 72 6d 61 6c 2d 2a 29 0a 09 09  mal|normal-*)...
0f90: 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  .kit="$(echo "${
0fa0: 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40 5e  kit}" | sed "s@^
0fb0: 6e 6f 72 6d 61 6c 40 24 6f 73 2d 24 63 70 75 40  normal@$os-$cpu@
0fc0: 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e 7c  ")"....;;...min|
0fd0: 6d 69 6e 2d 6b 69 74 64 6c 6c 29 0a 09 09 09 6b  min-kitdll)....k
0fe0: 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69  itcreator="./bui
0ff0: 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 0a  ld/make-minkit".
1000: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
1010: 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 6b 69 74 3d  notk="1"....kit=
1020: 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22  "$(echo "${kit}"
1030: 20 7c 20 73 65 64 20 22 73 40 5e 6d 69 6e 40 24   | sed "s@^min@$
1040: 6f 73 2d 24 63 70 75 2d 6d 69 6e 40 22 29 22 0a  os-$cpu-min@")".
1050: 09 09 09 3b 3b 0a 09 09 6d 69 6e 2d 73 74 61 74  ...;;...min-stat
1060: 69 63 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f  ic)....kitcreato
1070: 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d  r="./build/make-
1080: 6d 69 6e 6b 69 74 2d 73 74 61 74 69 63 22 0a 09  minkit-static"..
1090: 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 6e  ..iszip="1"....n
10a0: 6f 74 6b 3d 22 31 22 0a 09 09 09 6b 69 74 3d 22  otk="1"....kit="
10b0: 24 7b 6f 73 7d 2d 24 7b 63 70 75 7d 2d 6d 69 6e  ${os}-${cpu}-min
10c0: 2d 73 74 61 74 69 63 22 0a 09 09 09 3b 3b 0a 09  -static"....;;..
10d0: 09 77 69 6e 33 32 7c 77 69 6e 33 32 2d 2a 29 0a  .win32|win32-*).
10e0: 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e  ...kitcreator=".
10f0: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d  /build/make-kit-
1100: 77 69 6e 33 32 22 0a 09 09 09 78 63 6f 6d 70 69  win32"....xcompi
1110: 6c 65 3d 22 31 22 0a 09 09 09 23 20 58 58 58 3a  le="1"....# XXX:
1120: 20 44 69 73 61 62 6c 65 64 20 66 6f 72 20 6e 6f   Disabled for no
1130: 77 2c 20 73 69 6e 63 65 20 49 20 64 6f 6e 27 74  w, since I don't
1140: 20 68 61 76 65 20 57 49 4e 45 20 69 6e 73 74 61   have WINE insta
1150: 6c 6c 65 64 0a 09 09 09 72 75 6e 6e 61 62 6c 65  lled....runnable
1160: 3d 22 30 22 0a 09 09 09 23 6b 69 74 72 75 6e 63  ="0"....#kitrunc
1170: 6d 64 3d 22 77 69 6e 65 22 0a 09 09 09 3b 3b 0a  md="wine"....;;.
1180: 09 09 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d  ..linux-mipsel-m
1190: 69 6e 7c 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d  in|linux-mipsel-
11a0: 6d 69 6e 2d 6b 69 74 64 6c 6c 29 0a 09 09 09 6b  min-kitdll)....k
11b0: 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69  itcreator="./bui
11c0: 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 6c 69 6e 75  ld/make-kit-linu
11d0: 78 2d 6d 69 70 73 65 6c 22 0a 09 09 09 72 75 6e  x-mipsel"....run
11e0: 6e 61 62 6c 65 3d 22 30 22 0a 09 09 09 78 63 6f  nable="0"....xco
11f0: 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 6e 6f 74  mpile="1"....not
1200: 6b 3d 22 31 22 0a 09 09 09 69 73 7a 69 70 3d 22  k="1"....iszip="
1210: 31 22 0a 09 09 09 3b 3b 0a 09 09 61 6e 64 72 6f  1"....;;...andro
1220: 69 64 2d 61 72 6d 7c 61 6e 64 72 6f 69 64 2d 61  id-arm|android-a
1230: 72 6d 2d 2a 7c 5c 0a 09 09 6c 69 6e 75 78 2d 6d  rm-*|\...linux-m
1240: 69 70 73 65 6c 7c 6c 69 6e 75 78 2d 6d 69 70 73  ipsel|linux-mips
1250: 65 6c 2d 2a 7c 5c 0a 09 09 6c 69 6e 75 78 2d 69  el-*|\...linux-i
1260: 33 38 36 7c 6c 69 6e 75 78 2d 69 33 38 36 2d 2a  386|linux-i386-*
1270: 7c 5c 0a 09 09 6c 69 6e 75 78 2d 61 6d 64 36 34  |\...linux-amd64
1280: 7c 6c 69 6e 75 78 2d 61 6d 64 36 34 2d 2a 7c 5c  |linux-amd64-*|\
1290: 0a 09 09 73 6f 6c 61 72 69 73 2d 69 33 38 36 7c  ...solaris-i386|
12a0: 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d 2a 7c 5c  solaris-i386-*|\
12b0: 0a 09 09 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34  ...solaris-amd64
12c0: 7c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 2a  |solaris-amd64-*
12d0: 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 73 70 61  |\...solaris-spa
12e0: 72 63 7c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  rc|solaris-sparc
12f0: 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 73  -*|\...solaris-s
1300: 70 61 72 63 36 34 7c 73 6f 6c 61 72 69 73 2d 73  parc64|solaris-s
1310: 70 61 72 63 36 34 2d 2a 7c 5c 0a 09 09 66 72 65  parc64-*|\...fre
1320: 65 62 73 64 2d 61 6d 64 36 34 7c 66 72 65 65 62  ebsd-amd64|freeb
1330: 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 6e  sd-amd64-*|\...n
1340: 65 74 62 73 64 2d 69 33 38 36 7c 6e 65 74 62 73  etbsd-i386|netbs
1350: 64 2d 69 33 38 36 2d 2a 7c 5c 0a 09 09 6e 65 74  d-i386-*|\...net
1360: 62 73 64 2d 61 6d 64 36 34 7c 6e 65 74 62 73 64  bsd-amd64|netbsd
1370: 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 68 70 75  -amd64-*|\...hpu
1380: 78 2d 68 70 70 61 36 34 7c 68 70 75 78 2d 68 70  x-hppa64|hpux-hp
1390: 70 61 36 34 2d 2a 29 0a 09 09 09 70 6c 61 74 66  pa64-*)....platf
13a0: 6f 72 6d 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b  orm="$(echo "${k
13b0: 69 74 7d 22 20 7c 20 63 75 74 20 2d 66 20 31 2d  it}" | cut -f 1-
13c0: 32 20 2d 64 20 27 2d 27 29 22 0a 09 09 09 6b 69  2 -d '-')"....ki
13d0: 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c  tcreator="./buil
13e0: 64 2f 6d 61 6b 65 2d 6b 69 74 2d 24 7b 70 6c 61  d/make-kit-${pla
13f0: 74 66 6f 72 6d 7d 22 0a 09 09 09 72 75 6e 6e 61  tform}"....runna
1400: 62 6c 65 3d 22 30 22 0a 09 09 09 78 63 6f 6d 70  ble="0"....xcomp
1410: 69 6c 65 3d 22 31 22 0a 09 09 09 69 73 7a 69 70  ile="1"....iszip
1420: 3d 22 30 22 0a 0a 09 09 09 69 66 20 65 63 68 6f  ="0".....if echo
1430: 20 22 24 7b 6b 69 74 7d 22 20 7c 20 65 67 72 65   "${kit}" | egre
1440: 70 20 2d 2d 20 27 2d 28 68 70 70 61 36 34 7c 61  p -- '-(hppa64|a
1450: 6d 64 36 34 7c 73 70 61 72 63 36 34 29 2d 27 20  md64|sparc64)-' 
1460: 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e  >/dev/null; then
1470: 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67  .....args="${arg
1480: 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69  s} --enable-64bi
1490: 74 22 0a 09 09 09 66 69 0a 09 09 09 3b 3b 0a 09  t"....fi....;;..
14a0: 65 73 61 63 0a 0a 09 69 66 20 5b 20 22 24 7b 78  esac...if [ "${x
14b0: 63 6f 6d 70 69 6c 65 7d 22 20 21 3d 20 22 30 22  compile}" != "0"
14c0: 20 5d 3b 20 74 68 65 6e 0a 09 09 6b 69 74 3d 22   ]; then...kit="
14d0: 24 7b 6b 69 74 7d 2d 78 63 6f 6d 70 69 6c 65 22  ${kit}-xcompile"
14e0: 0a 09 66 69 0a 0a 09 23 20 48 61 6e 64 6c 65 20  ..fi...# Handle 
14f0: 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 66 69  additional confi
1500: 67 75 72 61 74 69 6f 6e 0a 09 74 65 6d 70 6b 69  guration..tempki
1510: 74 3d 22 2d 24 7b 6b 69 74 7d 2d 22 0a 09 66 6f  t="-${kit}-"..fo
1520: 72 20 74 72 79 20 69 6e 20 31 20 32 20 33 20 34  r try in 1 2 3 4
1530: 20 35 20 36 20 37 20 38 20 39 3b 20 64 6f 0a 09   5 6 7 8 9; do..
1540: 09 63 61 73 65 20 22 2d 24 7b 74 65 6d 70 6b 69  .case "-${tempki
1550: 74 7d 2d 22 20 69 6e 0a 09 09 09 2a 2d 74 68 72  t}-" in....*-thr
1560: 65 61 64 65 64 2d 2a 29 0a 09 09 09 09 74 65 6d  eaded-*).....tem
1570: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1580: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1590: 27 73 40 2d 74 68 72 65 61 64 65 64 2d 40 2d 40  's@-threaded-@-@
15a0: 27 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b  ')".....args="${
15b0: 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 74  args} --enable-t
15c0: 68 72 65 61 64 73 22 0a 09 09 09 09 3b 3b 0a 09  hreads".....;;..
15d0: 09 09 2a 2d 7a 69 70 2d 2a 29 0a 09 09 09 09 74  ..*-zip-*).....t
15e0: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
15f0: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1600: 64 20 27 73 40 2d 7a 69 70 2d 40 2d 40 27 29 22  d 's@-zip-@-@')"
1610: 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67  .....args="${arg
1620: 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d  s} --enable-kit-
1630: 73 74 6f 72 61 67 65 3d 7a 69 70 22 0a 09 09 09  storage=zip"....
1640: 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b  .iszip="1".....;
1650: 3b 0a 09 09 09 2a 2d 73 74 61 74 69 63 74 6b 2d  ;....*-statictk-
1660: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
1670: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1680: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 73 74  t}" | sed 's@-st
1690: 61 74 69 63 74 6b 2d 40 2d 40 27 29 22 0a 09 09  atictk-@-@')"...
16a0: 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22  ..if [ "${notk}"
16b0: 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09   = "0" ]; then..
16c0: 09 09 09 09 73 74 61 74 69 63 74 6b 3d 22 31 22  ....statictk="1"
16d0: 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 65  .....else......e
16e0: 63 68 6f 20 22 24 7b 6b 69 74 7d 3a 20 55 6e 61  cho "${kit}: Una
16f0: 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20 53 74  ble to create St
1700: 61 74 69 63 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c  aticTk and NoTk,
1710: 20 69 67 6e 6f 72 69 6e 67 20 53 74 61 74 69 63   ignoring Static
1720: 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09  Tk" >&2.....fi..
1730: 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 74 6b 2d  ...;;....*-notk-
1740: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
1750: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1760: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6e 6f  t}" | sed 's@-no
1770: 74 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09 69 66  tk-@-@')".....if
1780: 20 5b 20 22 24 7b 73 74 61 74 69 63 74 6b 7d 22   [ "${statictk}"
1790: 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09   = "0" ]; then..
17a0: 09 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
17b0: 09 65 6c 73 65 0a 09 09 09 09 09 65 63 68 6f 20  .else......echo 
17c0: 22 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c 65 20  "${kit}: Unable 
17d0: 74 6f 20 63 72 65 61 74 65 20 53 74 61 74 69 63  to create Static
17e0: 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e  Tk and NoTk, ign
17f0: 6f 72 69 6e 67 20 4e 6f 54 6b 22 20 3e 26 32 0a  oring NoTk" >&2.
1800: 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09  ....fi.....;;...
1810: 09 2a 2d 6e 6f 6d 6b 34 2d 2a 29 0a 09 09 09 09  .*-nomk4-*).....
1820: 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20  tempkit="$(echo 
1830: 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73  "${tempkit}" | s
1840: 65 64 20 27 73 40 2d 6e 6f 6d 6b 34 2d 40 2d 40  ed 's@-nomk4-@-@
1850: 27 29 22 0a 09 09 09 09 6e 6f 6d 6b 34 3d 22 31  ')".....nomk4="1
1860: 22 0a 09 09 09 09 69 73 7a 69 70 3d 22 31 22 0a  ".....iszip="1".
1870: 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6b 69 74 64  ....;;....*-kitd
1880: 6c 6c 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69  ll-*).....tempki
1890: 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d  t="$(echo "${tem
18a0: 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40  pkit}" | sed 's@
18b0: 2d 6b 69 74 64 6c 6c 2d 40 2d 40 27 29 22 0a 09  -kitdll-@-@')"..
18c0: 09 09 09 6b 69 74 64 6c 6c 3d 22 31 22 0a 09 09  ...kitdll="1"...
18d0: 09 09 3b 3b 0a 09 09 09 2a 2d 64 65 62 75 67 2d  ..;;....*-debug-
18e0: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
18f0: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1900: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 64 65  t}" | sed 's@-de
1910: 62 75 67 2d 40 2d 40 27 29 22 0a 09 09 09 09 61  bug-@-@')".....a
1920: 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65  rgs="${args} --e
1930: 6e 61 62 6c 65 2d 73 79 6d 62 6f 6c 73 22 0a 09  nable-symbols"..
1940: 09 09 09 3b 3b 0a 09 09 65 73 61 63 0a 09 64 6f  ...;;...esac..do
1950: 6e 65 0a 0a 09 69 66 20 5b 20 22 24 7b 6b 69 74  ne...if [ "${kit
1960: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
1970: 68 65 6e 0a 09 09 23 20 43 75 72 72 65 6e 74 6c  hen...# Currentl
1980: 79 20 6e 6f 20 4b 69 74 44 4c 4c 20 75 73 65 73  y no KitDLL uses
1990: 20 5a 69 70 0a 09 09 69 73 7a 69 70 3d 22 30 22   Zip...iszip="0"
19a0: 0a 09 66 69 0a 0a 09 66 6f 72 20 76 65 72 73 69  ..fi...for versi
19b0: 6f 6e 20 69 6e 20 24 7b 56 45 52 53 49 4f 4e 53  on in ${VERSIONS
19c0: 7d 3b 20 64 6f 0a 09 09 23 20 57 6f 72 6b 20 61  }; do...# Work a
19d0: 72 6f 75 6e 64 20 63 68 61 6e 67 65 73 20 69 6e  round changes in
19e0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f   default behavio
19f0: 75 72 0a 09 09 69 66 20 5b 20 22 24 7b 76 65 72  ur...if [ "${ver
1a00: 73 69 6f 6e 7d 22 20 3d 20 22 63 76 73 5f 48 45  sion}" = "cvs_HE
1a10: 41 44 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 6b  AD" ]; then....k
1a20: 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69  it="$(echo "${ki
1a30: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 74 68  t}" | sed 's@-th
1a40: 72 65 61 64 65 64 40 2d 75 6e 74 68 72 65 61 64  readed@-unthread
1a50: 65 64 40 27 29 22 0a 09 09 09 61 72 67 73 3d 22  ed@')"....args="
1a60: 24 28 65 63 68 6f 20 22 24 7b 61 72 67 73 7d 22  $(echo "${args}"
1a70: 20 7c 20 73 65 64 20 27 73 40 20 2d 2d 65 6e 61   | sed 's@ --ena
1a80: 62 6c 65 2d 74 68 72 65 61 64 73 40 20 2d 2d 64  ble-threads@ --d
1a90: 69 73 61 62 6c 65 2d 74 68 72 65 61 64 73 40 27  isable-threads@'
1aa0: 29 22 0a 09 09 66 69 0a 0a 09 09 23 20 43 72 65  )"...fi....# Cre
1ab0: 61 74 65 20 54 63 6c 6b 69 74 0a 09 09 69 66 20  ate Tclkit...if 
1ac0: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
1ad0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63  "1" ]; then....c
1ae0: 72 65 61 74 65 64 6b 69 74 3d 22 6c 69 62 74 63  reatedkit="libtc
1af0: 6c 6b 69 74 2a 2e 64 6c 6c 20 6c 69 62 74 63 6c  lkit*.dll libtcl
1b00: 6b 69 74 2a 2e 2a 22 0a 09 09 09 6f 75 74 70 75  kit*.*"....outpu
1b10: 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52  tname="${TESTDIR
1b20: 7d 2f 6b 69 74 73 2f 6c 69 62 74 63 6c 6b 69 74  }/kits/libtclkit
1b30: 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69  -${version}-${ki
1b40: 74 7d 22 0a 09 09 09 66 61 69 6c 6f 75 74 70 75  t}"....failoutpu
1b50: 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52  tname="${TESTDIR
1b60: 7d 2f 6b 69 74 73 2f 66 61 69 6c 65 64 2f 6c 69  }/kits/failed/li
1b70: 62 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f  btclkit-${versio
1b80: 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 73 64  n}-${kit}"....sd
1b90: 6b 3d 22 6c 69 62 74 63 6c 6b 69 74 2d 73 64 6b  k="libtclkit-sdk
1ba0: 2d 24 7b 76 65 72 73 69 6f 6e 7d 2e 74 61 72 2e  -${version}.tar.
1bb0: 67 7a 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 72  gz"...else....cr
1bc0: 65 61 74 65 64 6b 69 74 3d 22 74 63 6c 6b 69 74  eatedkit="tclkit
1bd0: 2d 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09  -${version}"....
1be0: 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54 45  outputname="${TE
1bf0: 53 54 44 49 52 7d 2f 6b 69 74 73 2f 74 63 6c 6b  STDIR}/kits/tclk
1c00: 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b  it-${version}-${
1c10: 6b 69 74 7d 22 0a 09 09 09 66 61 69 6c 6f 75 74  kit}"....failout
1c20: 70 75 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44  putname="${TESTD
1c30: 49 52 7d 2f 6b 69 74 73 2f 66 61 69 6c 65 64 2f  IR}/kits/failed/
1c40: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
1c50: 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 73 64 6b  }-${kit}"....sdk
1c60: 3d 27 27 0a 09 09 66 69 0a 09 09 62 75 69 6c 64  =''...fi...build
1c70: 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d  log="${outputnam
1c80: 65 7d 2d 62 75 69 6c 64 2e 6c 6f 67 22 0a 09 09  e}-build.log"...
1c90: 66 61 69 6c 62 75 69 6c 64 6c 6f 67 3d 22 24 7b  failbuildlog="${
1ca0: 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 2d  failoutputname}-
1cb0: 62 75 69 6c 64 2e 6c 6f 67 22 0a 09 09 74 65 73  build.log"...tes
1cc0: 74 72 65 73 75 6c 74 73 6c 6f 67 3d 22 24 7b 6f  tresultslog="${o
1cd0: 75 74 70 75 74 6e 61 6d 65 7d 2d 74 65 73 74 73  utputname}-tests
1ce0: 2e 6c 6f 67 22 0a 0a 09 09 69 66 20 5b 20 21 20  .log"....if [ ! 
1cf0: 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -f "${outputname
1d00: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 75 6e  }" ]; then....un
1d10: 73 65 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50  set KITCREATOR_P
1d20: 4b 47 53 20 53 54 41 54 49 43 54 4b 20 53 54 52  KGS STATICTK STR
1d30: 49 50 0a 0a 09 09 09 69 66 20 5b 20 2d 66 20 22  IP.....if [ -f "
1d40: 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65  ${failoutputname
1d50: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  }" ]; then.....e
1d60: 63 68 6f 20 22 53 6b 69 70 70 69 6e 67 20 72 65  cho "Skipping re
1d70: 62 75 69 6c 64 69 6e 67 20 66 61 69 6c 65 64 20  building failed 
1d80: 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  kit ${version}/$
1d90: 7b 6b 69 74 7d 20 2e 2e 2e 22 0a 0a 09 09 09 09  {kit} ..."......
1da0: 66 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64  failed="${failed
1db0: 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  } ${version}/${k
1dc0: 69 74 7d 2d 62 75 69 6c 64 22 0a 0a 09 09 09 09  it}-build"......
1dd0: 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a  continue....fi..
1de0: 09 09 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 09  ...rm -f tclsh..
1df0: 09 09 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 63  .../kitcreator c
1e00: 6c 65 61 6e 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  lean >/dev/null 
1e10: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 0a 09 09 09  2>/dev/null.....
1e20: 65 63 68 6f 20 22 43 72 65 61 74 69 6e 67 20 54  echo "Creating T
1e30: 63 6c 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d  clkit ${version}
1e40: 2f 24 7b 6b 69 74 7d 2e 2e 2e 22 0a 09 09 09 65  /${kit}..."....e
1e50: 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20  cho " *** Build 
1e60: 73 74 61 72 74 65 64 20 24 28 77 68 6f 61 6d 69  started $(whoami
1e70: 29 40 24 28 68 6f 73 74 6e 61 6d 65 29 20 6f 6e  )@$(hostname) on
1e80: 20 24 28 64 61 74 65 29 22 20 3e 20 22 24 7b 62   $(date)" > "${b
1e90: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
1ea0: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
1eb0: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20  log}"....echo " 
1ec0: 2a 2a 2a 20 42 75 69 6c 64 20 53 63 72 69 70 74  *** Build Script
1ed0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
1ee0: 7d 22 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6e  }".....if [ "${n
1ef0: 6f 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  otk}" = "1" ]; t
1f00: 68 65 6e 0a 09 09 09 09 4b 49 54 43 52 45 41 54  hen.....KITCREAT
1f10: 4f 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20 6d 6b  OR_PKGS='itcl mk
1f20: 34 74 63 6c 27 0a 09 09 09 66 69 0a 0a 09 09 09  4tcl'....fi.....
1f30: 69 66 20 5b 20 22 24 7b 6e 6f 6d 6b 34 7d 22 20  if [ "${nomk4}" 
1f40: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
1f50: 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54  ..if [ -z "${KIT
1f60: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d  CREATOR_PKGS}" ]
1f70: 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43  ; then......KITC
1f80: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 69 74 63  REATOR_PKGS='itc
1f90: 6c 20 74 6b 27 0a 09 09 09 09 65 6c 73 65 0a 09  l tk'.....else..
1fa0: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
1fb0: 4b 47 53 3d 22 24 28 65 63 68 6f 20 22 24 7b 4b  KGS="$(echo "${K
1fc0: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22  ITCREATOR_PKGS}"
1fd0: 20 7c 20 73 65 64 20 27 73 40 6d 6b 34 74 63 6c   | sed 's@mk4tcl
1fe0: 40 40 27 29 22 0a 09 09 09 09 66 69 0a 09 09 09  @@')".....fi....
1ff0: 66 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6b  fi.....if [ "${k
2000: 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b  itdll}" = "1" ];
2010: 20 74 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d   then.....if [ -
2020: 7a 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  z "${KITCREATOR_
2030: 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  PKGS}" ]; then..
2040: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
2050: 4b 47 53 3d 27 74 6b 20 69 74 63 6c 20 6d 6b 34  KGS='tk itcl mk4
2060: 74 63 6c 20 6b 69 74 64 6c 6c 27 0a 09 09 09 09  tcl kitdll'.....
2070: 65 6c 73 65 0a 09 09 09 09 09 4b 49 54 43 52 45  else......KITCRE
2080: 41 54 4f 52 5f 50 4b 47 53 3d 22 24 7b 4b 49 54  ATOR_PKGS="${KIT
2090: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 20 6b 69  CREATOR_PKGS} ki
20a0: 74 64 6c 6c 22 0a 09 09 09 09 66 69 0a 09 09 09  tdll".....fi....
20b0: 66 69 0a 0a 09 09 09 65 78 70 6f 72 74 20 4b 49  fi.....export KI
20c0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a 0a 09  TCREATOR_PKGS...
20d0: 09 09 69 66 20 5b 20 2d 6e 20 22 24 7b 4b 49 54  ..if [ -n "${KIT
20e0: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d  CREATOR_PKGS}" ]
20f0: 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20  ; then.....echo 
2100: 22 20 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "  KITCREATOR_PK
2110: 47 53 3d 5c 22 24 7b 4b 49 54 43 52 45 41 54 4f  GS=\"${KITCREATO
2120: 52 5f 50 4b 47 53 7d 5c 22 22 20 3e 3e 20 22 24  R_PKGS}\"" >> "$
2130: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
2140: 65 63 68 6f 20 22 20 20 65 78 70 6f 72 74 20 4b  echo "  export K
2150: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 22 20  ITCREATOR_PKGS" 
2160: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2170: 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20  ....fi.....if [ 
2180: 22 24 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d 20  "${statictk}" = 
2190: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
21a0: 53 54 41 54 49 43 54 4b 3d 22 31 22 0a 09 09 09  STATICTK="1"....
21b0: 09 65 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b  .export STATICTK
21c0: 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20 53 54  ......echo "  ST
21d0: 41 54 49 43 54 4b 3d 5c 22 24 7b 53 54 41 54 49  ATICTK=\"${STATI
21e0: 43 54 4b 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75  CTK}\"" >> "${bu
21f0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
2200: 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54 41 54  o "  export STAT
2210: 49 43 54 4b 22 20 3e 3e 20 22 24 7b 62 75 69 6c  ICTK" >> "${buil
2220: 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09  dlog}"....fi....
2230: 09 69 66 20 65 63 68 6f 20 22 24 7b 61 72 67 73  .if echo "${args
2240: 7d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 2d  }" | grep -- '--
2250: 65 6e 61 62 6c 65 2d 73 79 6d 62 6f 6c 73 27 20  enable-symbols' 
2260: 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e  >/dev/null; then
2270: 0a 09 09 09 09 53 54 52 49 50 3d 27 74 72 75 65  .....STRIP='true
2280: 27 0a 09 09 09 09 65 78 70 6f 72 74 20 53 54 52  '.....export STR
2290: 49 50 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20  IP......echo "  
22a0: 53 54 52 49 50 3d 27 74 72 75 65 27 22 20 3e 3e  STRIP='true'" >>
22b0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
22c0: 09 09 09 65 63 68 6f 20 22 20 20 65 78 70 6f 72  ...echo "  expor
22d0: 74 20 53 54 52 49 50 22 20 3e 3e 20 22 24 7b 62  t STRIP" >> "${b
22e0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a  uildlog}"....fi.
22f0: 0a 09 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 63  ....if [ "${kitc
2300: 72 65 61 74 6f 72 7d 22 20 21 3d 20 22 2e 2f 6b  reator}" != "./k
2310: 69 74 63 72 65 61 74 6f 72 22 20 5d 3b 20 74 68  itcreator" ]; th
2320: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 20 20 6d  en.....echo "  m
2330: 6b 64 69 72 20 62 75 69 6c 64 22 20 3e 3e 20 22  kdir build" >> "
2340: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09  ${buildlog}"....
2350: 09 09 23 20 53 65 76 65 72 61 6c 20 62 75 69 6c  ..# Several buil
2360: 64 20 73 63 72 69 70 74 73 20 72 65 6c 79 20 6f  d scripts rely o
2370: 6e 20 6d 69 6e 6b 69 74 20 74 6f 20 77 6f 72 6b  n minkit to work
2380: 0a 09 09 09 09 69 66 20 67 72 65 70 20 27 2e 2f  .....if grep './
2390: 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69  build/make-minki
23a0: 74 27 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72  t' "${kitcreator
23b0: 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  }" >/dev/null 2>
23c0: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
23d0: 09 09 09 09 09 65 63 68 6f 20 22 20 20 63 61 74  .....echo "  cat
23e0: 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e   << \__EOF__ > .
23f0: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b  /build/make-mink
2400: 69 74 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  it" >> "${buildl
2410: 6f 67 7d 22 0a 09 09 09 09 09 73 65 64 20 27 73  og}"......sed 's
2420: 40 5e 40 20 20 40 27 20 20 27 2e 2f 62 75 69 6c  @^@  @'  './buil
2430: 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 3e  d/make-minkit' >
2440: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2450: 09 09 09 09 09 65 63 68 6f 20 22 20 20 5f 5f 45  .....echo "  __E
2460: 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75 69 6c  OF__" >> "${buil
2470: 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f  dlog}"......echo
2480: 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c   '' >> "${buildl
2490: 6f 67 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09 09  og}".....fi.....
24a0: 09 23 20 53 65 76 65 72 61 6c 20 62 75 69 6c 64  .# Several build
24b0: 20 73 63 72 69 70 74 73 20 72 65 6c 79 20 6f 6e   scripts rely on
24c0: 20 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63   make-kit-crossc
24d0: 6f 6d 70 69 6c 65 20 74 6f 20 77 6f 72 6b 0a 09  ompile to work..
24e0: 09 09 09 69 66 20 67 72 65 70 20 27 2e 2f 62 75  ...if grep './bu
24f0: 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f  ild/make-kit-cro
2500: 73 73 63 6f 6d 70 69 6c 65 27 20 22 24 7b 6b 69  sscompile' "${ki
2510: 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76  tcreator}" >/dev
2520: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
2530: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68  l; then......ech
2540: 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45  o "  cat << \__E
2550: 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d  OF__ > ./build/m
2560: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
2570: 70 69 6c 65 22 20 3e 3e 20 22 24 7b 62 75 69 6c  pile" >> "${buil
2580: 64 6c 6f 67 7d 22 0a 09 09 09 09 09 73 65 64 20  dlog}"......sed 
2590: 27 73 40 5e 40 20 20 40 27 20 20 27 2e 2f 62 75  's@^@  @'  './bu
25a0: 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f  ild/make-kit-cro
25b0: 73 73 63 6f 6d 70 69 6c 65 27 20 3e 3e 20 22 24  sscompile' >> "$
25c0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
25d0: 09 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f  .echo "  __EOF__
25e0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
25f0: 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20  }"......echo '' 
2600: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2610: 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 65 63 68  .....fi......ech
2620: 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45  o "  cat << \__E
2630: 4f 46 5f 5f 20 3e 20 24 7b 6b 69 74 63 72 65 61  OF__ > ${kitcrea
2640: 74 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c  tor}" >> "${buil
2650: 64 6c 6f 67 7d 22 0a 09 09 09 09 73 65 64 20 27  dlog}".....sed '
2660: 73 40 5e 40 20 20 40 27 20 20 22 24 7b 6b 69 74  s@^@  @'  "${kit
2670: 63 72 65 61 74 6f 72 7d 22 20 3e 3e 20 22 24 7b  creator}" >> "${
2680: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65  buildlog}".....e
2690: 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20  cho "  __EOF__" 
26a0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
26b0: 0a 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  .....echo '' >> 
26c0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
26d0: 09 66 69 0a 09 09 09 65 63 68 6f 20 22 20 20 5c  .fi....echo "  \
26e0: 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 5c 22  "${kitcreator}\"
26f0: 20 5c 22 24 7b 76 65 72 73 69 6f 6e 7d 5c 22 20   \"${version}\" 
2700: 24 7b 61 72 67 73 7d 22 20 3e 3e 20 22 24 7b 62  ${args}" >> "${b
2710: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
2720: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
2730: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
2740: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2750: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
2760: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
2770: 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c  .echo " *** Buil
2780: 64 20 52 65 73 75 6c 74 73 22 20 3e 3e 20 22 24  d Results" >> "$
2790: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
27a0: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
27b0: 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 62 75 69 6c  ldlog}".....buil
27c0: 64 66 61 69 6c 65 64 3d 22 30 22 0a 09 09 09 22  dfailed="0"...."
27d0: 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 22  ${kitcreator}" "
27e0: 24 7b 76 65 72 73 69 6f 6e 7d 22 20 24 7b 61 72  ${version}" ${ar
27f0: 67 73 7d 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  gs} >> "${buildl
2800: 6f 67 7d 22 20 32 3e 26 31 20 7c 7c 20 62 75 69  og}" 2>&1 || bui
2810: 6c 64 66 61 69 6c 65 64 3d 22 31 22 0a 09 09 09  ldfailed="1"....
2820: 67 72 65 70 20 2d 6e 20 27 5e 27 20 2a 2f 62 75  grep -n '^' */bu
2830: 69 6c 64 2e 6c 6f 67 20 3e 3e 20 22 24 7b 62 75  ild.log >> "${bu
2840: 69 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 0a 09  ildlog}" 2>&1...
2850: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
2860: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
2870: 0a 09 09 09 09 23 20 43 72 65 61 74 65 20 74 65  .....# Create te
2880: 73 74 20 64 72 69 76 65 72 73 20 66 6f 72 20 4b  st drivers for K
2890: 69 74 44 4c 4c 0a 09 09 09 09 28 0a 09 09 09 09  itDLL.....(.....
28a0: 09 65 63 68 6f 20 22 22 0a 09 09 09 09 09 65 63  .echo ""......ec
28b0: 68 6f 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20  ho ""......echo 
28c0: 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 20 2a  ""......echo " *
28d0: 2a 2a 20 42 75 69 6c 64 69 6e 67 20 4b 69 74 44  ** Building KitD
28e0: 4c 4c 20 74 65 73 74 20 64 72 69 76 65 72 20 28  LL test driver (
28f0: 74 63 6c 73 68 29 22 0a 09 09 09 09 09 65 63 68  tclsh)"......ech
2900: 6f 20 22 22 0a 0a 09 09 09 09 09 63 64 20 6b 69  o "".......cd ki
2910: 74 73 68 2f 62 75 69 6c 64 2f 6b 69 74 73 68 2d  tsh/build/kitsh-
2920: 2a 2f 20 7c 7c 20 65 78 69 74 20 31 0a 09 09 09  */ || exit 1....
2930: 09 09 6d 61 6b 65 20 74 63 6c 73 68 0a 09 09 09  ..make tclsh....
2940: 09 09 63 70 20 74 63 6c 73 68 20 2e 2e 2f 2e 2e  ..cp tclsh ../..
2950: 2f 2e 2e 2f 0a 09 09 09 09 29 20 3e 3e 20 22 24  /../.....) >> "$
2960: 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26 31  {buildlog}" 2>&1
2970: 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 50 65 72  ....fi.....# Per
2980: 66 6f 72 6d 20 77 69 6c 64 63 61 72 64 20 65 78  form wildcard ex
2990: 70 61 6e 73 69 6f 6e 0a 09 09 09 63 72 65 61 74  pansion....creat
29a0: 65 64 6b 69 74 3d 22 24 28 6c 73 20 2d 66 31 20  edkit="$(ls -f1 
29b0: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 20 32 3e  ${createdkit} 2>
29c0: 2f 64 65 76 2f 6e 75 6c 6c 20 7c 20 67 72 65 70  /dev/null | grep
29d0: 20 2d 76 20 27 5c 2e 74 61 72 5c 2e 67 7a 24 27   -v '\.tar\.gz$'
29e0: 20 7c 20 68 65 61 64 20 2d 6e 20 31 29 22 0a 0a   | head -n 1)"..
29f0: 09 09 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b  ...if [ ! -f "${
2a00: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 5d 3b 20  createdkit}" ]; 
2a10: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 46  then.....echo "F
2a20: 61 69 6c 65 64 20 74 6f 20 63 72 65 61 74 65 20  ailed to create 
2a30: 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  kit ${version}/$
2a40: 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09  {kit}" >&2......
2a50: 66 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64  failed="${failed
2a60: 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  } ${version}/${k
2a70: 69 74 7d 2d 62 75 69 6c 64 22 0a 0a 09 09 09 09  it}-build"......
2a80: 74 6f 75 63 68 20 22 24 7b 66 61 69 6c 6f 75 74  touch "${failout
2a90: 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09 09 6d 76  putname}".....mv
2aa0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 22   "${buildlog}" "
2ab0: 24 7b 66 61 69 6c 62 75 69 6c 64 6c 6f 67 7d 22  ${failbuildlog}"
2ac0: 0a 0a 09 09 09 09 72 6d 20 2d 66 20 74 63 6c 73  ......rm -f tcls
2ad0: 68 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a  h......continue.
2ae0: 09 09 09 66 69 0a 0a 09 09 09 23 20 56 65 72 69  ...fi.....# Veri
2af0: 66 79 20 73 61 6e 69 74 79 20 6f 66 20 63 72 65  fy sanity of cre
2b00: 61 74 65 64 20 6b 69 74 0a 09 09 09 69 73 73 61  ated kit....issa
2b10: 6e 65 3d 31 0a 0a 09 09 09 23 23 20 56 65 72 69  ne=1.....## Veri
2b20: 66 79 20 74 68 61 74 20 57 69 6e 33 32 20 62 75  fy that Win32 bu
2b30: 69 6c 64 73 20 61 72 65 20 6f 66 20 63 6f 72 72  ilds are of corr
2b40: 65 63 74 20 74 79 70 65 0a 09 09 09 23 23 20 56  ect type....## V
2b50: 65 72 69 66 79 20 74 68 61 74 20 44 4c 4c 20 62  erify that DLL b
2b60: 75 69 6c 64 73 20 61 72 65 20 6f 66 20 63 6f 72  uilds are of cor
2b70: 72 65 63 74 20 74 79 70 65 0a 09 09 09 63 61 73  rect type....cas
2b80: 65 20 22 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24  e "-${version}-$
2b90: 7b 6b 69 74 7d 2d 22 20 69 6e 0a 09 09 09 09 2a  {kit}-" in.....*
2ba0: 2d 77 69 6e 33 32 2d 6b 69 74 64 6c 6c 2d 2a 7c  -win32-kitdll-*|
2bb0: 2a 2d 77 69 6e 33 32 2d 2a 2d 6b 69 74 64 6c 6c  *-win32-*-kitdll
2bc0: 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66 69  -*)......if ! fi
2bd0: 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  le "${createdkit
2be0: 7d 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69  }" | grep 'MS Wi
2bf0: 6e 64 6f 77 73 27 20 7c 20 67 72 65 70 20 27 28  ndows' | grep '(
2c00: 44 4c 4c 29 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  DLL)' >/dev/null
2c10: 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73 73  ; then.......iss
2c20: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
2c30: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 6b 69 74 64  ...;;.....*-kitd
2c40: 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20  ll-*)......if ! 
2c50: 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b  file "${createdk
2c60: 69 74 7d 22 20 7c 20 67 72 65 70 20 27 73 68 61  it}" | grep 'sha
2c70: 72 65 64 20 6f 62 6a 65 63 74 27 20 3e 2f 64 65  red object' >/de
2c80: 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09  v/null; then....
2c90: 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 09  ...issane=0.....
2ca0: 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09  .fi......;;.....
2cb0: 2a 2d 77 69 6e 33 32 2d 6e 6f 74 6b 2d 2a 7c 2a  *-win32-notk-*|*
2cc0: 2d 77 69 6e 33 32 2d 2a 2d 6e 6f 74 6b 2d 2a 29  -win32-*-notk-*)
2cd0: 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20  ......if ! file 
2ce0: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
2cf0: 7c 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f  | grep 'MS Windo
2d00: 77 73 27 20 7c 20 67 72 65 70 20 27 28 63 6f 6e  ws' | grep '(con
2d10: 73 6f 6c 65 29 27 20 3e 2f 64 65 76 2f 6e 75 6c  sole)' >/dev/nul
2d20: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 65 63  l; then.......ec
2d30: 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64 20 73  ho "Kit failed s
2d40: 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f 72 20  anity check for 
2d50: 62 65 69 6e 67 20 61 20 63 6f 6e 73 6f 6c 65 20  being a console 
2d60: 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32  application" >&2
2d70: 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a  .......issane=0.
2d80: 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a  .....fi......;;.
2d90: 09 09 09 09 2a 2d 77 69 6e 33 32 2d 2a 29 0a 09  ....*-win32-*)..
2da0: 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22 24  ....if ! file "$
2db0: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20  {createdkit}" | 
2dc0: 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77 73  grep 'MS Windows
2dd0: 27 20 7c 20 67 72 65 70 20 27 28 47 55 49 29 27  ' | grep '(GUI)'
2de0: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65   >/dev/null; the
2df0: 6e 0a 09 09 09 09 09 09 65 63 68 6f 20 22 4b 69  n.......echo "Ki
2e00: 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20  t failed sanity 
2e10: 63 68 65 63 6b 20 66 6f 72 20 62 65 69 6e 67 20  check for being 
2e20: 61 20 47 55 49 20 61 70 70 6c 69 63 61 74 69 6f  a GUI applicatio
2e30: 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73  n" >&2.......iss
2e40: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
2e50: 09 09 09 3b 3b 0a 09 09 09 65 73 61 63 0a 0a 09  ...;;....esac...
2e60: 09 09 23 23 20 56 65 72 69 66 79 20 74 68 65 20  ..## Verify the 
2e70: 62 75 69 6c 64 20 63 6f 6d 70 6c 65 74 65 64 20  build completed 
2e80: 77 69 74 68 6f 75 74 20 77 61 72 6e 69 6e 67 73  without warnings
2e90: 0a 09 09 09 69 66 20 5b 20 22 24 7b 62 75 69 6c  ....if [ "${buil
2ea0: 64 66 61 69 6c 65 64 7d 22 20 3d 20 22 31 22 20  dfailed}" = "1" 
2eb0: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f  ]; then.....echo
2ec0: 20 22 4b 69 74 20 66 61 69 6c 65 64 20 73 61 6e   "Kit failed san
2ed0: 69 74 79 20 63 68 65 63 6b 20 66 6f 72 20 42 75  ity check for Bu
2ee0: 69 6c 64 69 6e 67 22 20 3e 26 32 0a 0a 09 09 09  ilding" >&2.....
2ef0: 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 66 69 0a  .issane=0....fi.
2f00: 0a 09 09 09 23 20 4d 61 6b 65 20 6e 6f 74 65 20  ....# Make note 
2f10: 6f 66 20 73 61 6e 69 74 79 20 66 61 69 6c 75 72  of sanity failur
2f20: 65 0a 09 09 09 69 66 20 5b 20 22 24 7b 69 73 73  e....if [ "${iss
2f30: 61 6e 65 7d 22 20 21 3d 20 22 31 22 20 5d 3b 20  ane}" != "1" ]; 
2f40: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b  then.....echo "K
2f50: 69 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79  it failed sanity
2f60: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
2f70: 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69  t}" >&2......fai
2f80: 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24  led="${failed} $
2f90: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
2fa0: 2d 73 61 6e 69 74 79 22 0a 0a 09 09 09 09 6d 76  -sanity"......mv
2fb0: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
2fc0: 20 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61   "${failoutputna
2fd0: 6d 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b 62  me}".....mv "${b
2fe0: 75 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69  uildlog}" "${fai
2ff0: 6c 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09  lbuildlog}".....
3000: 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09  .rm -f tclsh....
3010: 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69  ..continue....fi
3020: 0a 0a 09 09 09 23 20 52 65 6e 61 6d 65 20 63 72  .....# Rename cr
3030: 65 61 74 65 64 20 6b 69 74 20 74 6f 20 66 69 6e  eated kit to fin
3040: 61 6c 20 64 65 73 74 69 6e 61 74 69 6f 6e 0a 09  al destination..
3050: 09 09 6d 76 20 22 24 7b 63 72 65 61 74 65 64 6b  ..mv "${createdk
3060: 69 74 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61  it}" "${outputna
3070: 6d 65 7d 22 0a 09 09 09 69 66 20 5b 20 2d 66 20  me}"....if [ -f 
3080: 22 74 63 6c 73 68 22 20 5d 3b 20 74 68 65 6e 0a  "tclsh" ]; then.
3090: 09 09 09 09 6d 76 20 22 74 63 6c 73 68 22 20 22  ....mv "tclsh" "
30a0: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63  ${outputname}-tc
30b0: 6c 73 68 22 0a 09 09 09 66 69 0a 0a 09 09 09 23  lsh"....fi.....#
30c0: 20 46 6f 72 20 4b 69 74 44 4c 4c 2c 20 6d 61 6b   For KitDLL, mak
30d0: 65 20 61 20 6e 6f 74 65 20 6f 66 20 74 68 65 20  e a note of the 
30e0: 6f 72 69 67 69 6e 61 6c 20 6e 61 6d 65 0a 09 09  original name...
30f0: 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d  .if [ "${kitdll}
3100: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
3110: 09 09 09 09 65 63 68 6f 20 22 24 7b 63 72 65 61  ....echo "${crea
3120: 74 65 64 6b 69 74 7d 22 20 3e 20 22 24 7b 6f 75  tedkit}" > "${ou
3130: 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61  tputname}-origna
3140: 6d 65 22 0a 0a 09 09 09 09 69 66 20 5b 20 2d 66  me"......if [ -f
3150: 20 22 24 7b 73 64 6b 7d 22 20 5d 3b 20 74 68 65   "${sdk}" ]; the
3160: 6e 0a 09 09 09 09 09 6d 76 20 22 24 7b 73 64 6b  n......mv "${sdk
3170: 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  }" "${outputname
3180: 7d 2d 73 64 6b 2e 74 61 72 2e 67 7a 22 0a 09 09  }-sdk.tar.gz"...
3190: 09 09 66 69 0a 09 09 09 66 69 0a 09 09 66 69 0a  ..fi....fi...fi.
31a0: 0a 09 09 23 20 54 65 73 74 20 7a 69 70 20 73 74  ...# Test zip st
31b0: 61 74 75 73 0a 09 09 69 66 20 75 6e 7a 69 70 20  atus...if unzip 
31c0: 2d 6c 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -l "${outputname
31d0: 7d 22 20 32 3e 26 31 20 7c 20 67 72 65 70 20 27  }" 2>&1 | grep '
31e0: 62 6f 6f 74 5c 2e 74 63 6c 27 20 3e 2f 64 65 76  boot\.tcl' >/dev
31f0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 63  /null; then....c
3200: 61 6e 75 6e 7a 69 70 3d 22 31 22 0a 09 09 65 6c  anunzip="1"...el
3210: 73 65 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22  se....canunzip="
3220: 30 22 0a 09 09 66 69 0a 0a 09 09 69 66 20 5b 20  0"...fi....if [ 
3230: 22 24 7b 69 73 7a 69 70 7d 22 20 21 3d 20 22 24  "${iszip}" != "$
3240: 7b 63 61 6e 75 6e 7a 69 70 7d 22 20 5d 3b 20 74  {canunzip}" ]; t
3250: 68 65 6e 0a 09 09 09 65 63 68 6f 20 22 46 61 69  hen....echo "Fai
3260: 6c 65 64 20 74 6f 20 75 6e 7a 69 70 20 7a 69 70  led to unzip zip
3270: 6b 69 74 20 6f 72 20 77 61 73 20 61 62 6c 65 20  kit or was able 
3280: 74 6f 20 75 6e 7a 69 70 20 6e 6f 6e 2d 7a 69 70  to unzip non-zip
3290: 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  kit ${version}/$
32a0: 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 66  {kit}" >&2.....f
32b0: 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d  ailed="${failed}
32c0: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
32d0: 74 7d 2d 7a 69 70 22 0a 0a 09 09 09 63 6f 6e 74  t}-zip".....cont
32e0: 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20 44  inue...fi....# D
32f0: 6f 20 6e 6f 74 20 63 6f 6e 74 69 6e 75 65 20 70  o not continue p
3300: 61 73 74 20 68 65 72 65 20 66 6f 72 20 75 6e 2d  ast here for un-
3310: 72 75 6e 6e 61 62 6c 65 20 6b 69 74 73 0a 09 09  runnable kits...
3320: 69 66 20 5b 20 22 24 7b 72 75 6e 6e 61 62 6c 65  if [ "${runnable
3330: 7d 22 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65  }" != "1" ]; the
3340: 6e 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  n....continue...
3350: 66 69 0a 0a 09 09 23 20 49 66 20 74 68 65 20 6e  fi....# If the n
3360: 61 6d 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69  ame of the origi
3370: 6e 61 6c 20 62 75 69 6c 64 20 6d 61 74 74 65 72  nal build matter
3380: 73 2c 20 73 79 6d 6c 69 6e 6b 20 69 74 20 75 70  s, symlink it up
3390: 0a 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75  ...if [ -f "${ou
33a0: 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61  tputname}-origna
33b0: 6d 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63  me" ]; then....c
33c0: 72 65 61 74 65 64 6b 69 74 3d 22 24 28 63 61 74  reatedkit="$(cat
33d0: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d   "${outputname}-
33e0: 6f 72 69 67 6e 61 6d 65 22 29 22 0a 0a 09 09 09  origname")".....
33f0: 6c 6e 20 2d 73 20 22 24 7b 6f 75 74 70 75 74 6e  ln -s "${outputn
3400: 61 6d 65 7d 22 20 22 24 7b 63 72 65 61 74 65 64  ame}" "${created
3410: 6b 69 74 7d 22 0a 09 09 66 69 0a 0a 09 09 23 20  kit}"...fi....# 
3420: 50 65 72 66 6f 72 6d 20 62 61 74 74 65 72 79 20  Perform battery 
3430: 6f 66 20 74 65 73 74 73 0a 09 09 23 23 20 43 6c  of tests...## Cl
3440: 65 61 6e 20 74 65 73 74 73 20 6c 6f 67 0a 09 09  ean tests log...
3450: 72 6d 20 2d 66 20 22 24 7b 74 65 73 74 72 65 73  rm -f "${testres
3460: 75 6c 74 73 6c 6f 67 7d 22 0a 09 09 66 6f 72 20  ultslog}"...for 
3470: 74 65 73 74 73 63 70 20 69 6e 20 22 24 7b 54 45  testscp in "${TE
3480: 53 54 44 49 52 7d 22 2f 74 65 73 74 73 2f 2a 2e  STDIR}"/tests/*.
3490: 74 63 6c 3b 20 64 6f 0a 09 09 09 74 65 73 74 73  tcl; do....tests
34a0: 63 70 5f 74 61 67 3d 22 24 28 62 61 73 65 6e 61  cp_tag="$(basena
34b0: 6d 65 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20  me "${testscp}" 
34c0: 2e 74 63 6c 29 22 0a 09 09 09 74 65 73 74 73 63  .tcl)"....testsc
34d0: 70 70 72 65 3d 22 24 28 64 69 72 6e 61 6d 65 20  ppre="$(dirname 
34e0: 22 24 7b 74 65 73 74 73 63 70 7d 22 29 2f 24 7b  "${testscp}")/${
34f0: 74 65 73 74 73 63 70 5f 74 61 67 7d 2e 73 68 22  testscp_tag}.sh"
3500: 0a 09 09 09 73 63 70 6c 6f 67 66 69 6c 65 3d 22  ....scplogfile="
3510: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 24 7b  ${outputname}-${
3520: 74 65 73 74 73 63 70 5f 74 61 67 7d 2e 6c 6f 67  testscp_tag}.log
3530: 22 0a 0a 09 09 09 23 20 49 66 20 61 20 63 6f 6d  ".....# If a com
3540: 6d 61 6e 64 20 69 73 20 72 65 71 75 69 72 65 64  mand is required
3550: 20 74 6f 20 73 74 61 72 74 20 74 68 65 20 6b 69   to start the ki
3560: 74 2c 20 70 72 65 70 61 72 65 20 74 6f 20 6b 69  t, prepare to ki
3570: 6c 6c 20 69 74 0a 09 09 09 23 20 69 6e 20 63 61  ll it....# in ca
3580: 73 65 20 6f 66 20 74 69 6d 65 6f 75 74 2e 0a 09  se of timeout...
3590: 09 09 23 23 20 54 65 6d 70 6f 72 61 72 69 6c 79  ..## Temporarily
35a0: 20 64 69 73 61 62 6c 65 64 20 73 69 6e 63 65 20   disabled since 
35b0: 63 75 72 72 65 6e 74 6c 79 20 69 74 20 69 73 20  currently it is 
35c0: 63 61 75 73 69 6e 67 0a 09 09 09 23 23 20 6d 6f  causing....## mo
35d0: 72 65 20 70 72 6f 62 6c 65 6d 73 20 69 6e 20 74  re problems in t
35e0: 68 65 20 66 6f 72 6d 20 6f 66 20 74 65 73 74 73  he form of tests
35f0: 20 62 65 69 6e 67 20 6b 69 6c 6c 65 64 0a 09 09   being killed...
3600: 09 23 23 20 70 72 65 6d 61 74 75 72 65 6c 79 20  .## prematurely 
3610: 74 68 61 6e 20 77 65 20 61 72 65 20 68 61 76 69  than we are havi
3620: 6e 67 20 69 73 73 75 65 73 20 77 69 74 68 20 74  ng issues with t
3630: 65 73 74 73 0a 09 09 09 23 23 20 68 61 6e 67 69  ests....## hangi
3640: 6e 67 0a 09 09 09 6b 69 74 72 75 6e 6b 69 6c 6c  ng....kitrunkill
3650: 70 69 64 3d 22 22 0a 09 09 09 69 66 20 5b 20 22  pid=""....if [ "
3660: 31 22 20 3d 20 22 30 22 20 2d 61 20 2d 6e 20 22  1" = "0" -a -n "
3670: 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 22 20 5d 3b  ${kitruncmd}" ];
3680: 20 74 68 65 6e 0a 09 09 09 09 28 0a 09 09 09 09   then.....(.....
3690: 09 73 6c 65 65 70 20 31 32 30 0a 09 09 09 09 09  .sleep 120......
36a0: 6b 69 6c 6c 61 6c 6c 20 22 24 28 62 61 73 65 6e  killall "$(basen
36b0: 61 6d 65 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  ame "${outputnam
36c0: 65 7d 22 29 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c  e}")" >/dev/null
36d0: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09   2>/dev/null....
36e0: 09 29 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  .) >/dev/null 2>
36f0: 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 09 09 09  /dev/null &.....
3700: 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 24  kitrunkillpid="$
3710: 21 22 0a 09 09 09 66 69 0a 0a 09 09 09 28 0a 09  !"....fi.....(..
3720: 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 74 65  ...if [ -f "${te
3730: 73 74 73 63 70 70 72 65 7d 22 20 5d 3b 20 74 68  stscppre}" ]; th
3740: 65 6e 0a 09 09 09 09 09 2e 20 22 24 7b 74 65 73  en....... "${tes
3750: 74 73 63 70 70 72 65 7d 22 0a 09 09 09 09 66 69  tscppre}".....fi
3760: 0a 0a 09 09 09 09 69 66 20 5b 20 22 24 7b 6b 69  ......if [ "${ki
3770: 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20  tdll}" = "1" ]; 
3780: 74 68 65 6e 0a 09 09 09 09 09 24 7b 6b 69 74 72  then......${kitr
3790: 75 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74  uncmd} "${output
37a0: 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 20 22 24 7b  name}-tclsh" "${
37b0: 74 65 73 74 73 63 70 7d 22 20 22 24 7b 6f 75 74  testscp}" "${out
37c0: 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74  putname}" "${kit
37d0: 7d 22 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a  }" "${version}".
37e0: 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 24 7b  ....else......${
37f0: 6b 69 74 72 75 6e 63 6d 64 7d 20 22 24 7b 6f 75  kitruncmd} "${ou
3800: 74 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 74 65  tputname}" "${te
3810: 73 74 73 63 70 7d 22 20 22 24 7b 6f 75 74 70 75  stscp}" "${outpu
3820: 74 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22  tname}" "${kit}"
3830: 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09   "${version}"...
3840: 09 09 66 69 0a 09 09 09 29 20 3e 20 22 24 7b 73  ..fi....) > "${s
3850: 63 70 6c 6f 67 66 69 6c 65 7d 22 20 32 3e 26 31  cplogfile}" 2>&1
3860: 0a 0a 09 09 09 69 66 20 5b 20 22 24 3f 22 20 21  .....if [ "$?" !
3870: 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "0" ]; then...
3880: 09 09 65 63 68 6f 20 22 53 63 72 69 70 74 20 66  ..echo "Script f
3890: 61 69 6c 65 64 3a 20 24 7b 74 65 73 74 73 63 70  ailed: ${testscp
38a0: 5f 74 61 67 7d 20 6f 6e 20 24 7b 76 65 72 73 69  _tag} on ${versi
38b0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a  on}/${kit}" >&2.
38c0: 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
38d0: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
38e0: 7d 2f 24 7b 6b 69 74 7d 2d 74 65 73 74 2d 24 7b  }/${kit}-test-${
38f0: 74 65 73 74 73 63 70 5f 74 61 67 7d 22 0a 0a 09  testscp_tag}"...
3900: 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74 73  ...echo "${tests
3910: 63 70 5f 74 61 67 7d 3a 20 46 41 49 4c 22 20 3e  cp_tag}: FAIL" >
3920: 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74  >  "${testresult
3930: 73 6c 6f 67 7d 22 0a 0a 09 09 09 09 63 6f 6e 74  slog}"......cont
3940: 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23  inue....fi.....#
3950: 20 4b 69 6c 6c 20 74 68 65 20 77 61 74 63 68 64   Kill the watchd
3960: 6f 67 20 66 6f 72 20 74 68 69 73 20 69 74 65 72  og for this iter
3970: 61 74 69 6f 6e 0a 09 09 09 69 66 20 5b 20 2d 6e  ation....if [ -n
3980: 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69   "${kitrunkillpi
3990: 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  d}" ]; then.....
39a0: 6b 69 6c 6c 20 2d 39 20 22 24 7b 6b 69 74 72 75  kill -9 "${kitru
39b0: 6e 6b 69 6c 6c 70 69 64 7d 22 20 3e 2f 64 65 76  nkillpid}" >/dev
39c0: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
39d0: 6c 0a 09 09 09 66 69 0a 0a 09 09 09 65 63 68 6f  l....fi.....echo
39e0: 20 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d   "${testscp_tag}
39f0: 3a 20 50 41 53 53 22 20 3e 3e 20 20 22 24 7b 74  : PASS" >>  "${t
3a00: 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a  estresultslog}".
3a10: 0a 09 09 09 72 6d 20 2d 66 20 22 24 7b 73 63 70  ....rm -f "${scp
3a20: 6c 6f 67 66 69 6c 65 7d 22 0a 09 09 64 6f 6e 65  logfile}"...done
3a30: 0a 0a 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f  ....if [ -f "${o
3a40: 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e  utputname}-orign
3a50: 61 6d 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  ame" ]; then....
3a60: 72 6d 20 2d 66 20 22 24 7b 63 72 65 61 74 65 64  rm -f "${created
3a70: 6b 69 74 7d 22 0a 09 09 66 69 0a 09 64 6f 6e 65  kit}"...fi..done
3a80: 0a 64 6f 6e 65 0a 0a 69 66 20 5b 20 2d 6e 20 22  .done..if [ -n "
3a90: 24 7b 66 61 69 6c 65 64 7d 22 20 5d 3b 20 74 68  ${failed}" ]; th
3aa0: 65 6e 0a 09 65 63 68 6f 20 22 46 61 69 6c 65 64  en..echo "Failed
3ab0: 3a 20 24 7b 66 61 69 6c 65 64 7d 22 0a 66 69 0a  : ${failed}".fi.
3ac0: 0a 23 20 43 6c 65 61 6e 75 70 0a 23 23 20 54 65  .# Cleanup.## Te
3ad0: 72 6d 69 6e 61 74 65 20 58 76 66 62 0a 6b 69 6c  rminate Xvfb.kil
3ae0: 6c 20 2d 39 20 22 24 7b 58 56 46 42 5f 50 49 44  l -9 "${XVFB_PID
3af0: 7d 22 0a 0a 23 23 20 52 65 6d 6f 76 65 20 77 69  }"..## Remove wi
3b00: 6e 65 0a 72 6d 20 2d 72 66 20 22 24 7b 57 49 4e  ne.rm -rf "${WIN
3b10: 45 50 52 45 46 49 58 7d 22 0a 0a 2e 2f 6b 69 74  EPREFIX}".../kit
3b20: 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 0a 72 6d  creator clean.rm
3b30: 20 2d 66 20 74 63 6c 73 68 0a                     -f tclsh.