Hex Artifact Content

Artifact 7efd62ba50dfccd7b2f589ea0499076195af701f:


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 30 20 63 76 73 5f 48 45 41 44 22 0a  .5.10 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 2c 6c 69 6e 75 78 2d  ipsel-min,linux-
0630: 61 6d 64 36 34 2d 6e 6f 74 6b 7d 7b 2c 2d 64 65  amd64-notk}{,-de
0640: 62 75 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b  bug}{,-kitdll} {
0650: 73 6f 6c 61 72 69 73 2d 69 33 38 36 2c 73 6f 6c  solaris-i386,sol
0660: 61 72 69 73 2d 61 6d 64 36 34 2c 73 6f 6c 61 72  aris-amd64,solar
0670: 69 73 2d 73 70 61 72 63 2c 73 6f 6c 61 72 69 73  is-sparc,solaris
0680: 2d 73 70 61 72 63 36 34 2c 66 72 65 65 62 73 64  -sparc64,freebsd
0690: 2d 61 6d 64 36 34 2c 6e 65 74 62 73 64 2d 61 6d  -amd64,netbsd-am
06a0: 64 36 34 7d 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b  d64}{,-zip,-nomk
06b0: 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c  4}{,-threaded}{,
06c0: 2d 73 74 61 74 69 63 74 6b 2c 2d 6e 6f 74 6b 7d  -statictk,-notk}
06d0: 7b 2c 64 65 62 75 67 7d 20 7b 73 6f 6c 61 72 69  {,debug} {solari
06e0: 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d 61  s-i386,solaris-a
06f0: 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70 61  md64,solaris-spa
0700: 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  rc,solaris-sparc
0710: 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64,freebsd-amd64
0720: 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b 2c  ,netbsd-amd64}{,
0730: 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f 74  -threaded}{,-not
0740: 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62  k}{,-nomk4}{,deb
0750: 75 67 7d 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73  ug}-kitdll netbs
0760: 64 2d 69 33 38 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f  d-i386{,-zip,-no
0770: 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d  mk4}{,-threaded}
0780: 7b 2c 64 65 62 75 67 7d 2d 6e 6f 74 6b 20 6e 65  {,debug}-notk ne
0790: 74 62 73 64 2d 69 33 38 36 7b 2c 2d 74 68 72 65  tbsd-i386{,-thre
07a0: 61 64 65 64 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c  aded}{,-nomk4}{,
07b0: 64 65 62 75 67 7d 2d 6e 6f 74 6b 2d 6b 69 74 64  debug}-notk-kitd
07c0: 6c 6c 29 22 0a 65 6c 73 65 0a 09 6b 69 74 73 3d  ll)".else..kits=
07d0: 22 6e 6f 72 6d 61 6c 20 6e 6f 72 6d 61 6c 2d 7a  "normal normal-z
07e0: 69 70 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ip normal-thread
07f0: 65 64 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ed normal-thread
0800: 65 64 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 73 74  ed-zip normal-st
0810: 61 74 69 63 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f  atictk normal-no
0820: 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  tk normal-thread
0830: 65 64 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74  ed-notk normal-t
0840: 68 72 65 61 64 65 64 2d 7a 69 70 2d 6e 6f 74 6b  hreaded-zip-notk
0850: 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 20 6e 6f   normal-nomk4 no
0860: 72 6d 61 6c 2d 64 65 62 75 67 20 6d 69 6e 20 6d  rmal-debug min m
0870: 69 6e 2d 73 74 61 74 69 63 20 6e 6f 72 6d 61 6c  in-static normal
0880: 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74  -kitdll normal-t
0890: 68 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 6e  hreaded-kitdll n
08a0: 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d 6b 69 74 64 6c  ormal-notk-kitdl
08b0: 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d 6b  l normal-nomk4-k
08c0: 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d  itdll normal-nom
08d0: 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6e  k4-notk-kitdll n
08e0: 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e  ormal-threaded-n
08f0: 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d  omk4-kitdll norm
0900: 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b  al-threaded-notk
0910: 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f  -nomk4-kitdll no
0920: 72 6d 61 6c 2d 64 65 62 75 67 2d 6b 69 74 64 6c  rmal-debug-kitdl
0930: 6c 20 6d 69 6e 2d 6b 69 74 64 6c 6c 20 77 69 6e  l min-kitdll win
0940: 33 32 2d 69 35 38 36 20 77 69 6e 33 32 2d 69 35  32-i586 win32-i5
0950: 38 36 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35 38  86-zip win32-i58
0960: 36 2d 74 68 72 65 61 64 65 64 20 77 69 6e 33 32  6-threaded win32
0970: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 7a  -i586-threaded-z
0980: 69 70 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f  ip win32-i586-no
0990: 74 6b 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68  tk win32-i586-th
09a0: 72 65 61 64 65 64 2d 6e 6f 74 6b 20 77 69 6e 33  readed-notk win3
09b0: 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 20 77 69 6e  2-i586-nomk4 win
09c0: 33 32 2d 69 35 38 36 2d 6b 69 74 64 6c 6c 20 77  32-i586-kitdll w
09d0: 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61 64  in32-i586-thread
09e0: 65 64 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  ed-kitdll win32-
09f0: 69 35 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c  i586-notk-kitdll
0a00: 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b   win32-i586-nomk
0a10: 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69  4-kitdll win32-i
0a20: 35 38 36 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b  586-nomk4-notk-k
0a30: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
0a40: 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d  -threaded-nomk4-
0a50: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
0a60: 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b 2d  6-threaded-notk-
0a70: 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6c 69 6e  nomk4-kitdll lin
0a80: 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 20 6c 69  ux-mipsel-min li
0a90: 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b  nux-mipsel-min-k
0aa0: 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36  itdll linux-amd6
0ab0: 34 2d 6e 6f 74 6b 20 6c 69 6e 75 78 2d 61 6d 64  4-notk linux-amd
0ac0: 36 34 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 6c 69  64-notk-debug li
0ad0: 6e 75 78 2d 61 6d 64 36 34 2d 6e 6f 74 6b 2d 6b  nux-amd64-notk-k
0ae0: 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36  itdll linux-amd6
0af0: 34 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74  4-notk-debug-kit
0b00: 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 69 33 38 36  dll solaris-i386
0b10: 20 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64 65   solaris-i386-de
0b20: 62 75 67 20 73 6f 6c 61 72 69 73 2d 69 33 38 36  bug solaris-i386
0b30: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0b40: 69 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c  i386-debug-kitdl
0b50: 6c 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 20  l solaris-amd64 
0b60: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65  solaris-amd64-de
0b70: 62 75 67 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36  bug solaris-amd6
0b80: 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  4-kitdll solaris
0b90: 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74  -amd64-debug-kit
0ba0: 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72  dll solaris-spar
0bb0: 63 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d  c solaris-sparc-
0bc0: 64 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 73 70  debug solaris-sp
0bd0: 61 72 63 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  arc-kitdll solar
0be0: 69 73 2d 73 70 61 72 63 2d 64 65 62 75 67 2d 6b  is-sparc-debug-k
0bf0: 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70  itdll solaris-sp
0c00: 61 72 63 36 34 20 73 6f 6c 61 72 69 73 2d 73 70  arc64 solaris-sp
0c10: 61 72 63 36 34 2d 64 65 62 75 67 20 73 6f 6c 61  arc64-debug sola
0c20: 72 69 73 2d 73 70 61 72 63 36 34 2d 6b 69 74 64  ris-sparc64-kitd
0c30: 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ll solaris-sparc
0c40: 36 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20  64-debug-kitdll 
0c50: 66 72 65 65 62 73 64 2d 61 6d 64 36 34 20 66 72  freebsd-amd64 fr
0c60: 65 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75  eebsd-amd64-debu
0c70: 67 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d  g freebsd-amd64-
0c80: 6b 69 74 64 6c 6c 69 20 66 72 65 65 62 73 64 2d  kitdlli freebsd-
0c90: 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64  amd64-debug-kitd
0ca0: 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e  ll netbsd-i386-n
0cb0: 6f 74 6b 20 6e 65 74 62 73 64 2d 69 33 38 36 2d  otk netbsd-i386-
0cc0: 6e 6f 74 6b 2d 64 65 62 75 67 20 6e 65 74 62 73  notk-debug netbs
0cd0: 64 2d 69 33 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64  d-i386-notk-kitd
0ce0: 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e  ll netbsd-i386-n
0cf0: 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  otk-debug-kitdll
0d00: 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 20 6e 65   netbsd-amd64 ne
0d10: 74 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67  tbsd-amd64-debug
0d20: 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 6b 69   netbsd-amd64-ki
0d30: 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36  tdll netbsd-amd6
0d40: 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 22 0a  4-debug-kitdll".
0d50: 66 69 0a 0a 66 61 69 6c 65 64 3d 22 22 0a 66 6f  fi..failed="".fo
0d60: 72 20 6b 69 74 20 69 6e 20 24 6b 69 74 73 3b 20  r kit in $kits; 
0d70: 64 6f 0a 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  do..kitcreator="
0d80: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 22 0a 09 61  ./kitcreator"..a
0d90: 72 67 73 3d 22 22 0a 09 72 75 6e 6e 61 62 6c 65  rgs=""..runnable
0da0: 3d 22 31 22 0a 09 69 73 7a 69 70 3d 22 30 22 0a  ="1"..iszip="0".
0db0: 09 73 74 61 74 69 63 74 6b 3d 22 30 22 0a 09 6e  .statictk="0"..n
0dc0: 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d 6b 34 3d 22  otk="0"..nomk4="
0dd0: 30 22 0a 09 78 63 6f 6d 70 69 6c 65 3d 22 30 22  0"..xcompile="0"
0de0: 0a 09 6b 69 74 64 6c 6c 3d 22 30 22 0a 09 6b 69  ..kitdll="0"..ki
0df0: 74 72 75 6e 63 6d 64 3d 22 22 0a 0a 09 23 20 48  truncmd=""...# H
0e00: 61 6e 64 6c 65 20 62 61 73 65 20 63 6f 6e 66 69  andle base confi
0e10: 67 75 72 61 74 69 6f 6e 0a 09 6f 73 3d 22 24 28  guration..os="$(
0e20: 75 6e 61 6d 65 20 2d 73 20 7c 20 64 64 20 63 6f  uname -s | dd co
0e30: 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f  nv=lcase 2>/dev/
0e40: 6e 75 6c 6c 29 22 0a 09 63 70 75 3d 22 24 28 75  null)"..cpu="$(u
0e50: 6e 61 6d 65 20 2d 6d 20 7c 20 64 64 20 63 6f 6e  name -m | dd con
0e60: 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e  v=lcase 2>/dev/n
0e70: 75 6c 6c 29 22 0a 09 63 61 73 65 20 22 24 7b 6b  ull)"..case "${k
0e80: 69 74 7d 22 20 69 6e 0a 09 09 6e 6f 72 6d 61 6c  it}" in...normal
0e90: 7c 6e 6f 72 6d 61 6c 2d 2a 29 0a 09 09 09 6b 69  |normal-*)....ki
0ea0: 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74  t="$(echo "${kit
0eb0: 7d 22 20 7c 20 73 65 64 20 22 73 40 5e 6e 6f 72  }" | sed "s@^nor
0ec0: 6d 61 6c 40 24 6f 73 2d 24 63 70 75 40 22 29 22  mal@$os-$cpu@")"
0ed0: 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e 7c 6d 69 6e  ....;;...min|min
0ee0: 2d 6b 69 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63  -kitdll)....kitc
0ef0: 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f  reator="./build/
0f00: 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 0a 09 09 09  make-minkit"....
0f10: 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 6e 6f 74  iszip="1"....not
0f20: 6b 3d 22 31 22 0a 09 09 09 6b 69 74 3d 22 24 28  k="1"....kit="$(
0f30: 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20  echo "${kit}" | 
0f40: 73 65 64 20 22 73 40 5e 6d 69 6e 40 24 6f 73 2d  sed "s@^min@$os-
0f50: 24 63 70 75 2d 6d 69 6e 40 22 29 22 0a 09 09 09  $cpu-min@")"....
0f60: 3b 3b 0a 09 09 6d 69 6e 2d 73 74 61 74 69 63 29  ;;...min-static)
0f70: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
0f80: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e  ./build/make-min
0f90: 6b 69 74 2d 73 74 61 74 69 63 22 0a 09 09 09 69  kit-static"....i
0fa0: 73 7a 69 70 3d 22 31 22 0a 09 09 09 6e 6f 74 6b  szip="1"....notk
0fb0: 3d 22 31 22 0a 09 09 09 6b 69 74 3d 22 24 7b 6f  ="1"....kit="${o
0fc0: 73 7d 2d 24 7b 63 70 75 7d 2d 6d 69 6e 2d 73 74  s}-${cpu}-min-st
0fd0: 61 74 69 63 22 0a 09 09 09 3b 3b 0a 09 09 77 69  atic"....;;...wi
0fe0: 6e 33 32 7c 77 69 6e 33 32 2d 2a 29 0a 09 09 09  n32|win32-*)....
0ff0: 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75  kitcreator="./bu
1000: 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 77 69 6e  ild/make-kit-win
1010: 33 32 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d  32"....xcompile=
1020: 22 31 22 0a 09 09 09 6b 69 74 72 75 6e 63 6d 64  "1"....kitruncmd
1030: 3d 22 77 69 6e 65 22 0a 09 09 09 3b 3b 0a 09 09  ="wine"....;;...
1040: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e  linux-mipsel-min
1050: 7c 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69  |linux-mipsel-mi
1060: 6e 2d 6b 69 74 64 6c 6c 29 0a 09 09 09 6b 69 74  n-kitdll)....kit
1070: 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64  creator="./build
1080: 2f 6d 61 6b 65 2d 6b 69 74 2d 6d 69 70 73 65 6c  /make-kit-mipsel
1090: 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30  "....runnable="0
10a0: 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31  "....xcompile="1
10b0: 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09  "....notk="1"...
10c0: 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 3b 3b  .iszip="1"....;;
10d0: 0a 09 09 6c 69 6e 75 78 2d 61 6d 64 36 34 7c 6c  ...linux-amd64|l
10e0: 69 6e 75 78 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09  inux-amd64-*|\..
10f0: 09 73 6f 6c 61 72 69 73 2d 69 33 38 36 7c 73 6f  .solaris-i386|so
1100: 6c 61 72 69 73 2d 69 33 38 36 2d 2a 7c 5c 0a 09  laris-i386-*|\..
1110: 09 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 7c 73  .solaris-amd64|s
1120: 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 2a 7c 5c  olaris-amd64-*|\
1130: 0a 09 09 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ...solaris-sparc
1140: 7c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 2a  |solaris-sparc-*
1150: 7c 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 73 70 61  |\...solaris-spa
1160: 72 63 36 34 7c 73 6f 6c 61 72 69 73 2d 73 70 61  rc64|solaris-spa
1170: 72 63 36 34 2d 2a 7c 5c 0a 09 09 66 72 65 65 62  rc64-*|\...freeb
1180: 73 64 2d 61 6d 64 36 34 7c 66 72 65 65 62 73 64  sd-amd64|freebsd
1190: 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 6e 65 74  -amd64-*|\...net
11a0: 62 73 64 2d 69 33 38 36 7c 6e 65 74 62 73 64 2d  bsd-i386|netbsd-
11b0: 69 33 38 36 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73  i386-*|\...netbs
11c0: 64 2d 61 6d 64 36 34 7c 6e 65 74 62 73 64 2d 61  d-amd64|netbsd-a
11d0: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 68 70 75 78 2d  md64-*|\...hpux-
11e0: 68 70 70 61 36 34 7c 68 70 75 78 2d 68 70 70 61  hppa64|hpux-hppa
11f0: 36 34 2d 2a 29 0a 09 09 09 70 6c 61 74 66 6f 72  64-*)....platfor
1200: 6d 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74  m="$(echo "${kit
1210: 7d 22 20 7c 20 63 75 74 20 2d 66 20 31 2d 32 20  }" | cut -f 1-2 
1220: 2d 64 20 27 2d 27 29 22 0a 09 09 09 6b 69 74 63  -d '-')"....kitc
1230: 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f  reator="./build/
1240: 6d 61 6b 65 2d 6b 69 74 2d 24 7b 70 6c 61 74 66  make-kit-${platf
1250: 6f 72 6d 7d 22 0a 09 09 09 72 75 6e 6e 61 62 6c  orm}"....runnabl
1260: 65 3d 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c  e="0"....xcompil
1270: 65 3d 22 31 22 0a 09 09 09 69 73 7a 69 70 3d 22  e="1"....iszip="
1280: 30 22 0a 0a 09 09 09 69 66 20 65 63 68 6f 20 22  0".....if echo "
1290: 24 7b 6b 69 74 7d 22 20 7c 20 65 67 72 65 70 20  ${kit}" | egrep 
12a0: 2d 2d 20 27 2d 28 68 70 70 61 36 34 7c 61 6d 64  -- '-(hppa64|amd
12b0: 36 34 7c 73 70 61 72 63 36 34 29 2d 27 20 3e 2f  64|sparc64)-' >/
12c0: 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09  dev/null; then..
12d0: 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d  ...args="${args}
12e0: 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74 22   --enable-64bit"
12f0: 0a 09 09 09 66 69 0a 09 09 09 3b 3b 0a 09 65 73  ....fi....;;..es
1300: 61 63 0a 0a 09 69 66 20 5b 20 22 24 7b 78 63 6f  ac...if [ "${xco
1310: 6d 70 69 6c 65 7d 22 20 21 3d 20 22 30 22 20 5d  mpile}" != "0" ]
1320: 3b 20 74 68 65 6e 0a 09 09 6b 69 74 3d 22 24 7b  ; then...kit="${
1330: 6b 69 74 7d 2d 78 63 6f 6d 70 69 6c 65 22 0a 09  kit}-xcompile"..
1340: 66 69 0a 0a 09 23 20 48 61 6e 64 6c 65 20 61 64  fi...# Handle ad
1350: 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 66 69 67 75  ditional configu
1360: 72 61 74 69 6f 6e 0a 09 74 65 6d 70 6b 69 74 3d  ration..tempkit=
1370: 22 2d 24 7b 6b 69 74 7d 2d 22 0a 09 66 6f 72 20  "-${kit}-"..for 
1380: 74 72 79 20 69 6e 20 31 20 32 20 33 20 34 20 35  try in 1 2 3 4 5
1390: 20 36 20 37 20 38 20 39 3b 20 64 6f 0a 09 09 63   6 7 8 9; do...c
13a0: 61 73 65 20 22 2d 24 7b 74 65 6d 70 6b 69 74 7d  ase "-${tempkit}
13b0: 2d 22 20 69 6e 0a 09 09 09 2a 2d 74 68 72 65 61  -" in....*-threa
13c0: 64 65 64 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b  ded-*).....tempk
13d0: 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65  it="$(echo "${te
13e0: 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73  mpkit}" | sed 's
13f0: 40 2d 74 68 72 65 61 64 65 64 2d 40 2d 40 27 29  @-threaded-@-@')
1400: 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72  ".....args="${ar
1410: 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72  gs} --enable-thr
1420: 65 61 64 73 22 0a 09 09 09 09 3b 3b 0a 09 09 09  eads".....;;....
1430: 2a 2d 7a 69 70 2d 2a 29 0a 09 09 09 09 74 65 6d  *-zip-*).....tem
1440: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1450: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1460: 27 73 40 2d 7a 69 70 2d 40 2d 40 27 29 22 0a 09  's@-zip-@-@')"..
1470: 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d  ...args="${args}
1480: 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74   --enable-kit-st
1490: 6f 72 61 67 65 3d 7a 69 70 22 0a 09 09 09 09 69  orage=zip".....i
14a0: 73 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a  szip="1".....;;.
14b0: 09 09 09 2a 2d 73 74 61 74 69 63 74 6b 2d 2a 29  ...*-statictk-*)
14c0: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
14d0: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
14e0: 22 20 7c 20 73 65 64 20 27 73 40 2d 73 74 61 74  " | sed 's@-stat
14f0: 69 63 74 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09  ictk-@-@')".....
1500: 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d  if [ "${notk}" =
1510: 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "0" ]; then....
1520: 09 09 73 74 61 74 69 63 74 6b 3d 22 31 22 0a 09  ..statictk="1"..
1530: 09 09 09 65 6c 73 65 0a 09 09 09 09 09 65 63 68  ...else......ech
1540: 6f 20 22 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c  o "${kit}: Unabl
1550: 65 20 74 6f 20 63 72 65 61 74 65 20 53 74 61 74  e to create Stat
1560: 69 63 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69  icTk and NoTk, i
1570: 67 6e 6f 72 69 6e 67 20 53 74 61 74 69 63 54 6b  gnoring StaticTk
1580: 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09 09 09  " >&2.....fi....
1590: 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 74 6b 2d 2a 29  .;;....*-notk-*)
15a0: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
15b0: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
15c0: 22 20 7c 20 73 65 64 20 27 73 40 2d 6e 6f 74 6b  " | sed 's@-notk
15d0: 2d 40 2d 40 27 29 22 0a 09 09 09 09 69 66 20 5b  -@-@')".....if [
15e0: 20 22 24 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d   "${statictk}" =
15f0: 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "0" ]; then....
1600: 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 09 65  ..notk="1".....e
1610: 6c 73 65 0a 09 09 09 09 09 65 63 68 6f 20 22 24  lse......echo "$
1620: 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f  {kit}: Unable to
1630: 20 63 72 65 61 74 65 20 53 74 61 74 69 63 54 6b   create StaticTk
1640: 20 61 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72   and NoTk, ignor
1650: 69 6e 67 20 4e 6f 54 6b 22 20 3e 26 32 0a 09 09  ing NoTk" >&2...
1660: 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09 09 2a  ..fi.....;;....*
1670: 2d 6e 6f 6d 6b 34 2d 2a 29 0a 09 09 09 09 74 65  -nomk4-*).....te
1680: 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24  mpkit="$(echo "$
1690: 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64  {tempkit}" | sed
16a0: 20 27 73 40 2d 6e 6f 6d 6b 34 2d 40 2d 40 27 29   's@-nomk4-@-@')
16b0: 22 0a 09 09 09 09 6e 6f 6d 6b 34 3d 22 31 22 0a  ".....nomk4="1".
16c0: 09 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09  ....iszip="1"...
16d0: 09 09 3b 3b 0a 09 09 09 2a 2d 6b 69 74 64 6c 6c  ..;;....*-kitdll
16e0: 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d  -*).....tempkit=
16f0: 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b  "$(echo "${tempk
1700: 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6b  it}" | sed 's@-k
1710: 69 74 64 6c 6c 2d 40 2d 40 27 29 22 0a 09 09 09  itdll-@-@')"....
1720: 09 6b 69 74 64 6c 6c 3d 22 31 22 0a 09 09 09 09  .kitdll="1".....
1730: 3b 3b 0a 09 09 09 2a 2d 64 65 62 75 67 2d 2a 29  ;;....*-debug-*)
1740: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
1750: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
1760: 22 20 7c 20 73 65 64 20 27 73 40 2d 64 65 62 75  " | sed 's@-debu
1770: 67 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67  g-@-@')".....arg
1780: 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61  s="${args} --ena
1790: 62 6c 65 2d 73 79 6d 62 6f 6c 73 22 0a 09 09 09  ble-symbols"....
17a0: 09 3b 3b 0a 09 09 65 73 61 63 0a 09 64 6f 6e 65  .;;...esac..done
17b0: 0a 0a 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c  ...if [ "${kitdl
17c0: 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  l}" = "1" ]; the
17d0: 6e 0a 09 09 23 20 43 75 72 72 65 6e 74 6c 79 20  n...# Currently 
17e0: 6e 6f 20 4b 69 74 44 4c 4c 20 75 73 65 73 20 5a  no KitDLL uses Z
17f0: 69 70 0a 09 09 69 73 7a 69 70 3d 22 30 22 0a 09  ip...iszip="0"..
1800: 66 69 0a 0a 09 66 6f 72 20 76 65 72 73 69 6f 6e  fi...for version
1810: 20 69 6e 20 24 7b 56 45 52 53 49 4f 4e 53 7d 3b   in ${VERSIONS};
1820: 20 64 6f 0a 09 09 23 20 57 6f 72 6b 20 61 72 6f   do...# Work aro
1830: 75 6e 64 20 63 68 61 6e 67 65 73 20 69 6e 20 64  und changes in d
1840: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 75 72  efault behaviour
1850: 0a 09 09 69 66 20 5b 20 22 24 7b 76 65 72 73 69  ...if [ "${versi
1860: 6f 6e 7d 22 20 3d 20 22 63 76 73 5f 48 45 41 44  on}" = "cvs_HEAD
1870: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 6b 69 74  " ]; then....kit
1880: 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d  ="$(echo "${kit}
1890: 22 20 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65  " | sed 's@-thre
18a0: 61 64 65 64 40 2d 75 6e 74 68 72 65 61 64 65 64  aded@-unthreaded
18b0: 40 27 29 22 0a 09 09 09 61 72 67 73 3d 22 24 28  @')"....args="$(
18c0: 65 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c  echo "${args}" |
18d0: 20 73 65 64 20 27 73 40 20 2d 2d 65 6e 61 62 6c   sed 's@ --enabl
18e0: 65 2d 74 68 72 65 61 64 73 40 20 2d 2d 64 69 73  e-threads@ --dis
18f0: 61 62 6c 65 2d 74 68 72 65 61 64 73 40 27 29 22  able-threads@')"
1900: 0a 09 09 66 69 0a 0a 09 09 23 20 43 72 65 61 74  ...fi....# Creat
1910: 65 20 54 63 6c 6b 69 74 0a 09 09 69 66 20 5b 20  e Tclkit...if [ 
1920: 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31  "${kitdll}" = "1
1930: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65  " ]; then....cre
1940: 61 74 65 64 6b 69 74 3d 22 6c 69 62 74 63 6c 6b  atedkit="libtclk
1950: 69 74 2a 2e 64 6c 6c 20 6c 69 62 74 63 6c 6b 69  it*.dll libtclki
1960: 74 2a 2e 2a 22 0a 09 09 09 6f 75 74 70 75 74 6e  t*.*"....outputn
1970: 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f  ame="${TESTDIR}/
1980: 6b 69 74 73 2f 6c 69 62 74 63 6c 6b 69 74 2d 24  kits/libtclkit-$
1990: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
19a0: 22 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e  "....failoutputn
19b0: 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f  ame="${TESTDIR}/
19c0: 6b 69 74 73 2f 66 61 69 6c 65 64 2f 6c 69 62 74  kits/failed/libt
19d0: 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d  clkit-${version}
19e0: 2d 24 7b 6b 69 74 7d 22 0a 09 09 65 6c 73 65 0a  -${kit}"...else.
19f0: 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22 74  ...createdkit="t
1a00: 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d  clkit-${version}
1a10: 22 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d  "....outputname=
1a20: 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73  "${TESTDIR}/kits
1a30: 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f  /tclkit-${versio
1a40: 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66 61  n}-${kit}"....fa
1a50: 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b  iloutputname="${
1a60: 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66 61  TESTDIR}/kits/fa
1a70: 69 6c 65 64 2f 74 63 6c 6b 69 74 2d 24 7b 76 65  iled/tclkit-${ve
1a80: 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09  rsion}-${kit}"..
1a90: 09 66 69 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22  .fi...buildlog="
1aa0: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75  ${outputname}-bu
1ab0: 69 6c 64 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62  ild.log"...failb
1ac0: 75 69 6c 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f  uildlog="${failo
1ad0: 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64  utputname}-build
1ae0: 2e 6c 6f 67 22 0a 09 09 74 65 73 74 72 65 73 75  .log"...testresu
1af0: 6c 74 73 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74  ltslog="${output
1b00: 6e 61 6d 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22  name}-tests.log"
1b10: 0a 0a 09 09 69 66 20 5b 20 21 20 2d 66 20 22 24  ....if [ ! -f "$
1b20: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b  {outputname}" ];
1b30: 20 74 68 65 6e 0a 09 09 09 75 6e 73 65 74 20 4b   then....unset K
1b40: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20 53  ITCREATOR_PKGS S
1b50: 54 41 54 49 43 54 4b 20 53 54 52 49 50 0a 0a 09  TATICTK STRIP...
1b60: 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 66 61 69  ..if [ -f "${fai
1b70: 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b  loutputname}" ];
1b80: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
1b90: 53 6b 69 70 70 69 6e 67 20 72 65 62 75 69 6c 64  Skipping rebuild
1ba0: 69 6e 67 20 66 61 69 6c 65 64 20 6b 69 74 20 24  ing failed kit $
1bb0: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
1bc0: 20 2e 2e 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65   ..."......faile
1bd0: 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76  d="${failed} ${v
1be0: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62  ersion}/${kit}-b
1bf0: 75 69 6c 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69  uild"......conti
1c00: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d  nue....fi.....rm
1c10: 20 2d 66 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b   -f tclsh...../k
1c20: 69 74 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 20  itcreator clean 
1c30: 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65  >/dev/null 2>/de
1c40: 76 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20  v/null.....echo 
1c50: 22 43 72 65 61 74 69 6e 67 20 54 63 6c 6b 69 74  "Creating Tclkit
1c60: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
1c70: 74 7d 2e 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22  t}..."....echo "
1c80: 20 2a 2a 2a 20 42 75 69 6c 64 20 73 74 61 72 74   *** Build start
1c90: 65 64 20 24 28 77 68 6f 61 6d 69 29 40 24 28 68  ed $(whoami)@$(h
1ca0: 6f 73 74 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61  ostname) on $(da
1cb0: 74 65 29 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c  te)" > "${buildl
1cc0: 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20  og}"....echo '' 
1cd0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
1ce0: 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42  ....echo " *** B
1cf0: 75 69 6c 64 20 53 63 72 69 70 74 22 20 3e 3e 20  uild Script" >> 
1d00: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09  "${buildlog}"...
1d10: 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22  ..if [ "${notk}"
1d20: 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09   = "1" ]; then..
1d30: 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  ...KITCREATOR_PK
1d40: 47 53 3d 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27  GS='itcl mk4tcl'
1d50: 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20  ....fi.....if [ 
1d60: 22 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22  "${nomk4}" = "1"
1d70: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 69 66 20   ]; then.....if 
1d80: 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52 45 41 54  [ -z "${KITCREAT
1d90: 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65  OR_PKGS}" ]; the
1da0: 6e 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f  n......KITCREATO
1db0: 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27  R_PKGS='itcl tk'
1dc0: 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 4b  .....else......K
1dd0: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22  ITCREATOR_PKGS="
1de0: 24 28 65 63 68 6f 20 22 24 7b 4b 49 54 43 52 45  $(echo "${KITCRE
1df0: 41 54 4f 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65  ATOR_PKGS}" | se
1e00: 64 20 27 73 40 6d 6b 34 74 63 6c 40 40 27 29 22  d 's@mk4tcl@@')"
1e10: 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09  .....fi....fi...
1e20: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
1e30: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
1e40: 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b  .....if [ -z "${
1e50: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d  KITCREATOR_PKGS}
1e60: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b  " ]; then......K
1e70: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27  ITCREATOR_PKGS='
1e80: 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b  tk itcl mk4tcl k
1e90: 69 74 64 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a  itdll'.....else.
1ea0: 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f  .....KITCREATOR_
1eb0: 50 4b 47 53 3d 22 24 7b 4b 49 54 43 52 45 41 54  PKGS="${KITCREAT
1ec0: 4f 52 5f 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22  OR_PKGS} kitdll"
1ed0: 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09  .....fi....fi...
1ee0: 09 09 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41  ..export KITCREA
1ef0: 54 4f 52 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20  TOR_PKGS.....if 
1f00: 5b 20 2d 6e 20 22 24 7b 4b 49 54 43 52 45 41 54  [ -n "${KITCREAT
1f10: 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65  OR_PKGS}" ]; the
1f20: 6e 0a 09 09 09 09 65 63 68 6f 20 22 20 20 4b 49  n.....echo "  KI
1f30: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22  TCREATOR_PKGS=\"
1f40: 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ${KITCREATOR_PKG
1f50: 53 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c  S}\"" >> "${buil
1f60: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
1f70: 22 20 20 65 78 70 6f 72 74 20 4b 49 54 43 52 45  "  export KITCRE
1f80: 41 54 4f 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24  ATOR_PKGS" >> "$
1f90: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66  {buildlog}"....f
1fa0: 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 73 74  i.....if [ "${st
1fb0: 61 74 69 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d  atictk}" = "1" ]
1fc0: 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 41 54 49  ; then.....STATI
1fd0: 43 54 4b 3d 22 31 22 0a 09 09 09 09 65 78 70 6f  CTK="1".....expo
1fe0: 72 74 20 53 54 41 54 49 43 54 4b 0a 0a 09 09 09  rt STATICTK.....
1ff0: 09 65 63 68 6f 20 22 20 20 53 54 41 54 49 43 54  .echo "  STATICT
2000: 4b 3d 5c 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c  K=\"${STATICTK}\
2010: 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  "" >> "${buildlo
2020: 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20  g}".....echo "  
2030: 65 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 22  export STATICTK"
2040: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2050: 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 65  "....fi.....if e
2060: 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20  cho "${args}" | 
2070: 67 72 65 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c  grep -- '--enabl
2080: 65 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76  e-symbols' >/dev
2090: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
20a0: 53 54 52 49 50 3d 27 74 72 75 65 27 0a 09 09 09  STRIP='true'....
20b0: 09 65 78 70 6f 72 74 20 53 54 52 49 50 0a 0a 09  .export STRIP...
20c0: 09 09 09 65 63 68 6f 20 22 20 20 53 54 52 49 50  ...echo "  STRIP
20d0: 3d 27 74 72 75 65 27 22 20 3e 3e 20 22 24 7b 62  ='true'" >> "${b
20e0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63  uildlog}".....ec
20f0: 68 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54 52  ho "  export STR
2100: 49 50 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  IP" >> "${buildl
2110: 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69  og}"....fi.....i
2120: 66 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74 6f  f [ "${kitcreato
2130: 72 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65  r}" != "./kitcre
2140: 61 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09  ator" ]; then...
2150: 09 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72 20  ..echo "  mkdir 
2160: 62 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69  build" >> "${bui
2170: 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53  ldlog}"......# S
2180: 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72  everal build scr
2190: 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e  ipts rely on min
21a0: 6b 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09  kit to work.....
21b0: 69 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64  if grep './build
21c0: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24  /make-minkit' "$
21d0: 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f  {kitcreator}" >/
21e0: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
21f0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
2200: 65 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c  echo "  cat << \
2210: 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c  __EOF__ > ./buil
2220: 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e  d/make-minkit" >
2230: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2240: 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20  .....sed 's@^@  
2250: 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b  @'  './build/mak
2260: 65 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b  e-minkit' >> "${
2270: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
2280: 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22  echo "  __EOF__"
2290: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
22a0: 22 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20 3e  "......echo '' >
22b0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
22c0: 09 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53 65  ....fi......# Se
22d0: 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69  veral build scri
22e0: 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65  pts rely on make
22f0: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
2300: 65 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66  e to work.....if
2310: 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d   grep './build/m
2320: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
2330: 70 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65 61  pile' "${kitcrea
2340: 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c  tor}" >/dev/null
2350: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68   2>/dev/null; th
2360: 65 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20  en......echo "  
2370: 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20  cat << \__EOF__ 
2380: 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b  > ./build/make-k
2390: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22  it-crosscompile"
23a0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
23b0: 22 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40  "......sed 's@^@
23c0: 20 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d    @'  './build/m
23d0: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
23e0: 70 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c  pile' >> "${buil
23f0: 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f  dlog}"......echo
2400: 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20   "  __EOF__" >> 
2410: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
2420: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2430: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
2440: 66 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20  fi......echo "  
2450: 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20  cat << \__EOF__ 
2460: 3e 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22  > ${kitcreator}"
2470: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2480: 22 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ".....sed 's@^@ 
2490: 20 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61 74   @'  "${kitcreat
24a0: 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  or}" >> "${build
24b0: 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22  log}".....echo "
24c0: 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24    __EOF__" >> "$
24d0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
24e0: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
24f0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09  ildlog}"....fi..
2500: 09 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69  ..echo "  \"${ki
2510: 74 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b  tcreator}\" \"${
2520: 76 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67  version}\" ${arg
2530: 73 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  s}" >> "${buildl
2540: 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20  og}"....echo '' 
2550: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2560: 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
2570: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2580: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
2590: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f  ildlog}"....echo
25a0: 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73   " *** Build Res
25b0: 75 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c  ults" >> "${buil
25c0: 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27  dlog}"....echo '
25d0: 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ' >> "${buildlog
25e0: 7d 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69 6c  }".....buildfail
25f0: 65 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69 74  ed="0"...."${kit
2600: 63 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65 72  creator}" "${ver
2610: 73 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e  sion}" ${args} >
2620: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20  > "${buildlog}" 
2630: 32 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61 69  2>&1 || buildfai
2640: 6c 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70 20  led="1"....grep 
2650: 2d 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c  -n '^' */build.l
2660: 6f 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  og >> "${buildlo
2670: 67 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20  g}" 2>&1.....if 
2680: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
2690: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
26a0: 23 20 43 72 65 61 74 65 20 74 65 73 74 20 64 72  # Create test dr
26b0: 69 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c  ivers for KitDLL
26c0: 0a 09 09 09 09 28 0a 09 09 09 09 09 65 63 68 6f  .....(......echo
26d0: 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22   ""......echo ""
26e0: 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09  ......echo ""...
26f0: 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75  ...echo " *** Bu
2700: 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65  ilding KitDLL te
2710: 73 74 20 64 72 69 76 65 72 20 28 74 63 6c 73 68  st driver (tclsh
2720: 29 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a  )"......echo "".
2730: 0a 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f 62  ......cd kitsh/b
2740: 75 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c  uild/kitsh-*/ ||
2750: 20 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61 6b   exit 1......mak
2760: 65 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70 20  e tclsh......cp 
2770: 74 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a  tclsh ../../../.
2780: 09 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c  ....) >> "${buil
2790: 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09 66  dlog}" 2>&1....f
27a0: 69 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d 20  i.....# Perform 
27b0: 77 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73 69  wildcard expansi
27c0: 6f 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74  on....createdkit
27d0: 3d 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72 65  ="$(ls -f1 ${cre
27e0: 61 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f  atedkit} 2>/dev/
27f0: 6e 75 6c 6c 20 7c 20 68 65 61 64 20 2d 6e 20 31  null | head -n 1
2800: 29 22 0a 0a 09 09 09 69 66 20 5b 20 21 20 2d 66  )".....if [ ! -f
2810: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
2820: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
2830: 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 63 72 65  o "Failed to cre
2840: 61 74 65 20 6b 69 74 20 24 7b 76 65 72 73 69 6f  ate kit ${versio
2850: 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a  n}/${kit}" >&2..
2860: 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66 61  ....failed="${fa
2870: 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d  iled} ${version}
2880: 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22 0a 0a  /${kit}-build"..
2890: 09 09 09 09 74 6f 75 63 68 20 22 24 7b 66 61 69  ....touch "${fai
28a0: 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09  loutputname}"...
28b0: 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ..mv "${buildlog
28c0: 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c  }" "${failbuildl
28d0: 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20  og}"......rm -f 
28e0: 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69  tclsh......conti
28f0: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  nue....fi.....# 
2900: 56 65 72 69 66 79 20 73 61 6e 69 74 79 20 6f 66  Verify sanity of
2910: 20 63 72 65 61 74 65 64 20 6b 69 74 0a 09 09 09   created kit....
2920: 69 73 73 61 6e 65 3d 31 0a 0a 09 09 09 23 23 20  issane=1.....## 
2930: 56 65 72 69 66 79 20 74 68 61 74 20 57 69 6e 33  Verify that Win3
2940: 32 20 62 75 69 6c 64 73 20 61 72 65 20 6f 66 20  2 builds are of 
2950: 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09 09 09  correct type....
2960: 23 23 20 56 65 72 69 66 79 20 74 68 61 74 20 44  ## Verify that D
2970: 4c 4c 20 62 75 69 6c 64 73 20 61 72 65 20 6f 66  LL builds are of
2980: 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09 09   correct type...
2990: 09 63 61 73 65 20 22 2d 24 7b 76 65 72 73 69 6f  .case "-${versio
29a0: 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20 69 6e 0a 09  n}-${kit}-" in..
29b0: 09 09 09 2a 2d 77 69 6e 33 32 2d 6b 69 74 64 6c  ...*-win32-kitdl
29c0: 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d 6b 69  l-*|*-win32-*-ki
29d0: 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66 20  tdll-*)......if 
29e0: 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65  ! file "${create
29f0: 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d  dkit}" | grep 'M
2a00: 53 20 57 69 6e 64 6f 77 73 20 28 44 4c 4c 29 27  S Windows (DLL)'
2a10: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65   >/dev/null; the
2a20: 6e 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30  n.......issane=0
2a30: 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b  ......fi......;;
2a40: 0a 09 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29  .....*-kitdll-*)
2a50: 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20  ......if ! file 
2a60: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
2a70: 7c 20 67 72 65 70 20 27 73 68 61 72 65 64 20 6f  | grep 'shared o
2a80: 62 6a 65 63 74 27 20 3e 2f 64 65 76 2f 6e 75 6c  bject' >/dev/nul
2a90: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73  l; then.......is
2aa0: 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09  sane=0......fi..
2ab0: 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e  ....;;.....*-win
2ac0: 33 32 2d 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69 6e 33  32-notk-*|*-win3
2ad0: 32 2d 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09  2-*-notk-*).....
2ae0: 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72  .if ! file "${cr
2af0: 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65  eatedkit}" | gre
2b00: 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 20 28 63  p 'MS Windows (c
2b10: 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64 65 76 2f 6e  onsole)' >/dev/n
2b20: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09  ull; then.......
2b30: 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64  echo "Kit failed
2b40: 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f   sanity check fo
2b50: 72 20 62 65 69 6e 67 20 61 20 63 6f 6e 73 6f 6c  r being a consol
2b60: 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e  e application" >
2b70: 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d  &2.......issane=
2b80: 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b  0......fi......;
2b90: 3b 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 2a 29  ;.....*-win32-*)
2ba0: 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20  ......if ! file 
2bb0: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
2bc0: 7c 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f  | grep 'MS Windo
2bd0: 77 73 20 28 47 55 49 29 27 20 3e 2f 64 65 76 2f  ws (GUI)' >/dev/
2be0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
2bf0: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
2c00: 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66  d sanity check f
2c10: 6f 72 20 62 65 69 6e 67 20 61 20 47 55 49 20 61  or being a GUI a
2c20: 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32 0a  pplication" >&2.
2c30: 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09  ......issane=0..
2c40: 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09  ....fi......;;..
2c50: 09 09 65 73 61 63 0a 0a 09 09 09 23 23 20 56 65  ..esac.....## Ve
2c60: 72 69 66 79 20 74 68 65 20 62 75 69 6c 64 20 63  rify the build c
2c70: 6f 6d 70 6c 65 74 65 64 20 77 69 74 68 6f 75 74  ompleted without
2c80: 20 77 61 72 6e 69 6e 67 73 0a 09 09 09 69 66 20   warnings....if 
2c90: 5b 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65 64  [ "${buildfailed
2ca0: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
2cb0: 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66  .....echo "Kit f
2cc0: 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65  ailed sanity che
2cd0: 63 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e 67 22  ck for Building"
2ce0: 20 3e 26 32 0a 0a 09 09 09 09 69 73 73 61 6e 65   >&2......issane
2cf0: 3d 30 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4d  =0....fi.....# M
2d00: 61 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61 6e 69  ake note of sani
2d10: 74 79 20 66 61 69 6c 75 72 65 0a 09 09 09 69 66  ty failure....if
2d20: 20 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22 20 21   [ "${issane}" !
2d30: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
2d40: 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c  ..echo "Kit fail
2d50: 65 64 20 73 61 6e 69 74 79 20 24 7b 76 65 72 73  ed sanity ${vers
2d60: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32  ion}/${kit}" >&2
2d70: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
2d80: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
2d90: 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69 74 79  n}/${kit}-sanity
2da0: 22 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63 72 65  "......mv "${cre
2db0: 61 74 65 64 6b 69 74 7d 22 20 22 24 7b 66 61 69  atedkit}" "${fai
2dc0: 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09  loutputname}"...
2dd0: 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ..mv "${buildlog
2de0: 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c  }" "${failbuildl
2df0: 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20  og}"......rm -f 
2e00: 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69  tclsh......conti
2e10: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  nue....fi.....# 
2e20: 52 65 6e 61 6d 65 20 63 72 65 61 74 65 64 20 6b  Rename created k
2e30: 69 74 20 74 6f 20 66 69 6e 61 6c 20 64 65 73 74  it to final dest
2e40: 69 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20 22 24  ination....mv "$
2e50: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24  {createdkit}" "$
2e60: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09  {outputname}"...
2e70: 09 69 66 20 5b 20 2d 66 20 22 74 63 6c 73 68 22  .if [ -f "tclsh"
2e80: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d 76 20   ]; then.....mv 
2e90: 22 74 63 6c 73 68 22 20 22 24 7b 6f 75 74 70 75  "tclsh" "${outpu
2ea0: 74 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a 09 09  tname}-tclsh"...
2eb0: 09 66 69 0a 0a 09 09 09 23 20 46 6f 72 20 4b 69  .fi.....# For Ki
2ec0: 74 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f 74  tDLL, make a not
2ed0: 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61  e of the origina
2ee0: 6c 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b 20 22  l name....if [ "
2ef0: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
2f00: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
2f10: 6f 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  o "${createdkit}
2f20: 22 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  " > "${outputnam
2f30: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 09 09 09  e}-origname"....
2f40: 66 69 0a 09 09 66 69 0a 0a 09 09 23 20 54 65 73  fi...fi....# Tes
2f50: 74 20 7a 69 70 20 73 74 61 74 75 73 0a 09 09 69  t zip status...i
2f60: 66 20 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f 75  f unzip -l "${ou
2f70: 74 70 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31 20  tputname}" 2>&1 
2f80: 7c 20 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74 63  | grep 'boot\.tc
2f90: 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  l' >/dev/null; t
2fa0: 68 65 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d  hen....canunzip=
2fb0: 22 31 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 61  "1"...else....ca
2fc0: 6e 75 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69 0a  nunzip="0"...fi.
2fd0: 0a 09 09 69 66 20 5b 20 22 24 7b 69 73 7a 69 70  ...if [ "${iszip
2fe0: 7d 22 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a 69  }" != "${canunzi
2ff0: 70 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 65  p}" ]; then....e
3000: 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 75  cho "Failed to u
3010: 6e 7a 69 70 20 7a 69 70 6b 69 74 20 6f 72 20 77  nzip zipkit or w
3020: 61 73 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69 70  as able to unzip
3030: 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76 65   non-zipkit ${ve
3040: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e  rsion}/${kit}" >
3050: 26 32 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22 24  &2.....failed="$
3060: 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69  {failed} ${versi
3070: 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22 0a  on}/${kit}-zip".
3080: 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66  ....continue...f
3090: 69 0a 0a 09 09 23 20 44 6f 20 6e 6f 74 20 63 6f  i....# Do not co
30a0: 6e 74 69 6e 75 65 20 70 61 73 74 20 68 65 72 65  ntinue past here
30b0: 20 66 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c 65   for un-runnable
30c0: 20 6b 69 74 73 0a 09 09 69 66 20 5b 20 22 24 7b   kits...if [ "${
30d0: 72 75 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22 31  runnable}" != "1
30e0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f 6e  " ]; then....con
30f0: 74 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20  tinue...fi....# 
3100: 49 66 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74  If the name of t
3110: 68 65 20 6f 72 69 67 69 6e 61 6c 20 62 75 69 6c  he original buil
3120: 64 20 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c 69  d matters, symli
3130: 6e 6b 20 69 74 20 75 70 0a 09 09 69 66 20 5b 20  nk it up...if [ 
3140: 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -f "${outputname
3150: 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74  }-origname" ]; t
3160: 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  hen....createdki
3170: 74 3d 22 24 28 63 61 74 20 22 24 7b 6f 75 74 70  t="$(cat "${outp
3180: 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65  utname}-origname
3190: 22 29 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22 24  ")".....ln -s "$
31a0: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22 24  {outputname}" "$
31b0: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09  {createdkit}"...
31c0: 66 69 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d 20  fi....# Perform 
31d0: 62 61 74 74 65 72 79 20 6f 66 20 74 65 73 74 73  battery of tests
31e0: 0a 09 09 23 23 20 43 6c 65 61 6e 20 74 65 73 74  ...## Clean test
31f0: 73 20 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22 24  s log...rm -f "$
3200: 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d  {testresultslog}
3210: 22 0a 09 09 66 6f 72 20 74 65 73 74 73 63 70 20  "...for testscp 
3220: 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f  in "${TESTDIR}"/
3230: 74 65 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f 0a  tests/*.tcl; do.
3240: 09 09 09 74 65 73 74 73 63 70 5f 74 61 67 3d 22  ...testscp_tag="
3250: 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 74 65  $(basename "${te
3260: 73 74 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a 09  stscp}" .tcl)"..
3270: 09 09 74 65 73 74 73 63 70 70 72 65 3d 22 24 28  ..testscppre="$(
3280: 64 69 72 6e 61 6d 65 20 22 24 7b 74 65 73 74 73  dirname "${tests
3290: 63 70 7d 22 29 2f 24 7b 74 65 73 74 73 63 70 5f  cp}")/${testscp_
32a0: 74 61 67 7d 2e 73 68 22 0a 09 09 09 73 63 70 6c  tag}.sh"....scpl
32b0: 6f 67 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75 74  ogfile="${output
32c0: 6e 61 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70 5f  name}-${testscp_
32d0: 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23 20  tag}.log".....# 
32e0: 49 66 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73 20  If a command is 
32f0: 72 65 71 75 69 72 65 64 20 74 6f 20 73 74 61 72  required to star
3300: 74 20 74 68 65 20 6b 69 74 2c 20 70 72 65 70 61  t the kit, prepa
3310: 72 65 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09 09  re to kill it...
3320: 09 23 20 69 6e 20 63 61 73 65 20 6f 66 20 74 69  .# in case of ti
3330: 6d 65 6f 75 74 2e 0a 09 09 09 23 23 20 54 65 6d  meout.....## Tem
3340: 70 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c 65  porarily disable
3350: 64 20 73 69 6e 63 65 20 63 75 72 72 65 6e 74 6c  d since currentl
3360: 79 20 69 74 20 69 73 20 63 61 75 73 69 6e 67 0a  y it is causing.
3370: 09 09 09 23 23 20 6d 6f 72 65 20 70 72 6f 62 6c  ...## more probl
3380: 65 6d 73 20 69 6e 20 74 68 65 20 66 6f 72 6d 20  ems in the form 
3390: 6f 66 20 74 65 73 74 73 20 62 65 69 6e 67 20 6b  of tests being k
33a0: 69 6c 6c 65 64 0a 09 09 09 23 23 20 70 72 65 6d  illed....## prem
33b0: 61 74 75 72 65 6c 79 20 74 68 61 6e 20 77 65 20  aturely than we 
33c0: 61 72 65 20 68 61 76 69 6e 67 20 69 73 73 75 65  are having issue
33d0: 73 20 77 69 74 68 20 74 65 73 74 73 0a 09 09 09  s with tests....
33e0: 23 23 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b 69  ## hanging....ki
33f0: 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a 09  trunkillpid=""..
3400: 09 09 69 66 20 5b 20 22 31 22 20 3d 20 22 30 22  ..if [ "1" = "0"
3410: 20 2d 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75 6e   -a -n "${kitrun
3420: 63 6d 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09  cmd}" ]; then...
3430: 09 09 28 0a 09 09 09 09 09 73 6c 65 65 70 20 31  ..(......sleep 1
3440: 32 30 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c 20  20......killall 
3450: 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 6f  "$(basename "${o
3460: 75 74 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e 2f  utputname}")" >/
3470: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
3480: 6e 75 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65 76  null.....) >/dev
3490: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
34a0: 6c 20 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b 69  l &.....kitrunki
34b0: 6c 6c 70 69 64 3d 22 24 21 22 0a 09 09 09 66 69  llpid="$!"....fi
34c0: 0a 0a 09 09 09 28 0a 09 09 09 09 69 66 20 5b 20  .....(.....if [ 
34d0: 2d 66 20 22 24 7b 74 65 73 74 73 63 70 70 72 65  -f "${testscppre
34e0: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09  }" ]; then......
34f0: 2e 20 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d  . "${testscppre}
3500: 22 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 69 66  ".....fi......if
3510: 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d   [ "${kitdll}" =
3520: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
3530: 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20 22  ..${kitruncmd} "
3540: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63  ${outputname}-tc
3550: 6c 73 68 22 20 22 24 7b 74 65 73 74 73 63 70 7d  lsh" "${testscp}
3560: 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  " "${outputname}
3570: 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65  " "${kit}" "${ve
3580: 72 73 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73 65  rsion}".....else
3590: 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d  ......${kitruncm
35a0: 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  d} "${outputname
35b0: 7d 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20  }" "${testscp}" 
35c0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20  "${outputname}" 
35d0: 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72 73  "${kit}" "${vers
35e0: 69 6f 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09 09  ion}".....fi....
35f0: 29 20 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c  ) > "${scplogfil
3600: 65 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20  e}" 2>&1.....if 
3610: 5b 20 22 24 3f 22 20 21 3d 20 22 30 22 20 5d 3b  [ "$?" != "0" ];
3620: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
3630: 53 63 72 69 70 74 20 66 61 69 6c 65 64 3a 20 24  Script failed: $
3640: 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 20 6f 6e  {testscp_tag} on
3650: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
3660: 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69  t}" >&2......fai
3670: 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24  led="${failed} $
3680: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
3690: 2d 74 65 73 74 2d 24 7b 74 65 73 74 73 63 70 5f  -test-${testscp_
36a0: 74 61 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f 20  tag}"......echo 
36b0: 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a  "${testscp_tag}:
36c0: 20 46 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74 65   FAIL" >>  "${te
36d0: 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a  stresultslog}"..
36e0: 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09  ....continue....
36f0: 66 69 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74 68  fi.....# Kill th
3700: 65 20 77 61 74 63 68 64 6f 67 20 66 6f 72 20 74  e watchdog for t
3710: 68 69 73 20 69 74 65 72 61 74 69 6f 6e 0a 09 09  his iteration...
3720: 09 69 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74 72  .if [ -n "${kitr
3730: 75 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20 74  unkillpid}" ]; t
3740: 68 65 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39 20  hen.....kill -9 
3750: 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64  "${kitrunkillpid
3760: 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  }" >/dev/null 2>
3770: 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69 0a  /dev/null....fi.
3780: 0a 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74  ....echo "${test
3790: 73 63 70 5f 74 61 67 7d 3a 20 50 41 53 53 22 20  scp_tag}: PASS" 
37a0: 3e 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c  >>  "${testresul
37b0: 74 73 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20 2d  tslog}".....rm -
37c0: 66 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65 7d  f "${scplogfile}
37d0: 22 0a 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20 5b  "...done....if [
37e0: 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d   -f "${outputnam
37f0: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20  e}-origname" ]; 
3800: 74 68 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22 24  then....rm -f "$
3810: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09  {createdkit}"...
3820: 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a 69  fi..done.done..i
3830: 66 20 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65 64  f [ -n "${failed
3840: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f  }" ]; then..echo
3850: 20 22 46 61 69 6c 65 64 3a 20 24 7b 66 61 69 6c   "Failed: ${fail
3860: 65 64 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61 6e  ed}".fi..# Clean
3870: 75 70 0a 23 23 20 54 65 72 6d 69 6e 61 74 65 20  up.## Terminate 
3880: 58 76 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24 7b  Xvfb.kill -9 "${
3890: 58 56 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20 52  XVFB_PID}"..## R
38a0: 65 6d 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d 72  emove wine.rm -r
38b0: 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d  f "${WINEPREFIX}
38c0: 22 0a 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20  ".../kitcreator 
38d0: 63 6c 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c 73  clean.rm -f tcls
38e0: 68 0a                                            h.