Hex Artifact Content

Artifact 92e44308bd7255757b0827a0c3dff8e54b77f0c4:


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 6b 69 74 64 6c 6c 3d 22  -*).....kitdll="
16f0: 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 64  1".....;;....*-d
1700: 65 62 75 67 2d 2a 29 0a 09 09 09 09 61 72 67 73  ebug-*).....args
1710: 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62  ="${args} --enab
1720: 6c 65 2d 73 79 6d 62 6f 6c 73 22 0a 09 09 09 09  le-symbols".....
1730: 3b 3b 0a 09 09 65 73 61 63 0a 09 64 6f 6e 65 0a  ;;...esac..done.
1740: 0a 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
1750: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
1760: 0a 09 09 23 20 43 75 72 72 65 6e 74 6c 79 20 6e  ...# Currently n
1770: 6f 20 4b 69 74 44 4c 4c 20 75 73 65 73 20 5a 69  o KitDLL uses Zi
1780: 70 0a 09 09 69 73 7a 69 70 3d 22 30 22 0a 09 66  p...iszip="0"..f
1790: 69 0a 0a 09 66 6f 72 20 76 65 72 73 69 6f 6e 20  i...for version 
17a0: 69 6e 20 24 7b 56 45 52 53 49 4f 4e 53 7d 3b 20  in ${VERSIONS}; 
17b0: 64 6f 0a 09 09 23 20 57 6f 72 6b 20 61 72 6f 75  do...# Work arou
17c0: 6e 64 20 63 68 61 6e 67 65 73 20 69 6e 20 64 65  nd changes in de
17d0: 66 61 75 6c 74 20 62 65 68 61 76 69 6f 75 72 0a  fault behaviour.
17e0: 09 09 69 66 20 5b 20 22 24 7b 76 65 72 73 69 6f  ..if [ "${versio
17f0: 6e 7d 22 20 3d 20 22 63 76 73 5f 48 45 41 44 22  n}" = "cvs_HEAD"
1800: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 6b 69 74 3d   ]; then....kit=
1810: 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22  "$(echo "${kit}"
1820: 20 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65 61   | sed 's@-threa
1830: 64 65 64 40 2d 75 6e 74 68 72 65 61 64 65 64 40  ded@-unthreaded@
1840: 27 29 22 0a 09 09 09 61 72 67 73 3d 22 24 28 65  ')"....args="$(e
1850: 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20  cho "${args}" | 
1860: 73 65 64 20 27 73 40 20 2d 2d 65 6e 61 62 6c 65  sed 's@ --enable
1870: 2d 74 68 72 65 61 64 73 40 20 2d 2d 64 69 73 61  -threads@ --disa
1880: 62 6c 65 2d 74 68 72 65 61 64 73 40 27 29 22 0a  ble-threads@')".
1890: 09 09 66 69 0a 0a 09 09 23 20 43 72 65 61 74 65  ..fi....# Create
18a0: 20 54 63 6c 6b 69 74 0a 09 09 69 66 20 5b 20 22   Tclkit...if [ "
18b0: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
18c0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61   ]; then....crea
18d0: 74 65 64 6b 69 74 3d 22 6c 69 62 74 63 6c 6b 69  tedkit="libtclki
18e0: 74 2a 2e 64 6c 6c 20 6c 69 62 74 63 6c 6b 69 74  t*.dll libtclkit
18f0: 2a 2e 2a 22 0a 09 09 09 6f 75 74 70 75 74 6e 61  *.*"....outputna
1900: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1910: 69 74 73 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b  its/libtclkit-${
1920: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22  version}-${kit}"
1930: 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e 61  ....failoutputna
1940: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1950: 69 74 73 2f 66 61 69 6c 65 64 2f 6c 69 62 74 63  its/failed/libtc
1960: 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d  lkit-${version}-
1970: 24 7b 6b 69 74 7d 22 0a 09 09 65 6c 73 65 0a 09  ${kit}"...else..
1980: 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22 74 63  ..createdkit="tc
1990: 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 22  lkit-${version}"
19a0: 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22  ....outputname="
19b0: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f  ${TESTDIR}/kits/
19c0: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
19d0: 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66 61 69  }-${kit}"....fai
19e0: 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54  loutputname="${T
19f0: 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66 61 69  ESTDIR}/kits/fai
1a00: 6c 65 64 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72  led/tclkit-${ver
1a10: 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09  sion}-${kit}"...
1a20: 66 69 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22 24  fi...buildlog="$
1a30: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69  {outputname}-bui
1a40: 6c 64 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62 75  ld.log"...failbu
1a50: 69 6c 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f 75  ildlog="${failou
1a60: 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e  tputname}-build.
1a70: 6c 6f 67 22 0a 09 09 74 65 73 74 72 65 73 75 6c  log"...testresul
1a80: 74 73 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74 6e  tslog="${outputn
1a90: 61 6d 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22 0a  ame}-tests.log".
1aa0: 0a 09 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b  ...if [ ! -f "${
1ab0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20  outputname}" ]; 
1ac0: 74 68 65 6e 0a 09 09 09 75 6e 73 65 74 20 4b 49  then....unset KI
1ad0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20 53 54  TCREATOR_PKGS ST
1ae0: 41 54 49 43 54 4b 20 53 54 52 49 50 0a 0a 09 09  ATICTK STRIP....
1af0: 09 69 66 20 5b 20 2d 66 20 22 24 7b 66 61 69 6c  .if [ -f "${fail
1b00: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20  outputname}" ]; 
1b10: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53  then.....echo "S
1b20: 6b 69 70 70 69 6e 67 20 72 65 62 75 69 6c 64 69  kipping rebuildi
1b30: 6e 67 20 66 61 69 6c 65 64 20 6b 69 74 20 24 7b  ng failed kit ${
1b40: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20  version}/${kit} 
1b50: 2e 2e 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65 64  ..."......failed
1b60: 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65  ="${failed} ${ve
1b70: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75  rsion}/${kit}-bu
1b80: 69 6c 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e  ild"......contin
1b90: 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d 20  ue....fi.....rm 
1ba0: 2d 66 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b 69  -f tclsh...../ki
1bb0: 74 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 20 3e  tcreator clean >
1bc0: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
1bd0: 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20 22  /null.....echo "
1be0: 43 72 65 61 74 69 6e 67 20 54 63 6c 6b 69 74 20  Creating Tclkit 
1bf0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
1c00: 7d 2e 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22 20  }..."....echo " 
1c10: 2a 2a 2a 20 42 75 69 6c 64 20 73 74 61 72 74 65  *** Build starte
1c20: 64 20 24 28 77 68 6f 61 6d 69 29 40 24 28 68 6f  d $(whoami)@$(ho
1c30: 73 74 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61 74  stname) on $(dat
1c40: 65 29 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  e)" > "${buildlo
1c50: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
1c60: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
1c70: 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75  ...echo " *** Bu
1c80: 69 6c 64 20 53 63 72 69 70 74 22 20 3e 3e 20 22  ild Script" >> "
1c90: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09  ${buildlog}"....
1ca0: 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20  .if [ "${notk}" 
1cb0: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
1cc0: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
1cd0: 53 3d 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27 0a  S='itcl mk4tcl'.
1ce0: 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22  ...fi.....if [ "
1cf0: 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22 20  ${nomk4}" = "1" 
1d00: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 69 66 20 5b  ]; then.....if [
1d10: 20 2d 7a 20 22 24 7b 4b 49 54 43 52 45 41 54 4f   -z "${KITCREATO
1d20: 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e  R_PKGS}" ]; then
1d30: 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52  ......KITCREATOR
1d40: 5f 50 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27 0a  _PKGS='itcl tk'.
1d50: 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 4b 49  ....else......KI
1d60: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22 24  TCREATOR_PKGS="$
1d70: 28 65 63 68 6f 20 22 24 7b 4b 49 54 43 52 45 41  (echo "${KITCREA
1d80: 54 4f 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65 64  TOR_PKGS}" | sed
1d90: 20 27 73 40 6d 6b 34 74 63 6c 40 40 27 29 22 0a   's@mk4tcl@@')".
1da0: 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09  ....fi....fi....
1db0: 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d  .if [ "${kitdll}
1dc0: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
1dd0: 09 09 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b  ....if [ -z "${K
1de0: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22  ITCREATOR_PKGS}"
1df0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b 49   ]; then......KI
1e00: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74  TCREATOR_PKGS='t
1e10: 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b 69  k itcl mk4tcl ki
1e20: 74 64 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a 09  tdll'.....else..
1e30: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
1e40: 4b 47 53 3d 22 24 7b 4b 49 54 43 52 45 41 54 4f  KGS="${KITCREATO
1e50: 52 5f 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22 0a  R_PKGS} kitdll".
1e60: 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09  ....fi....fi....
1e70: 09 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54  .export KITCREAT
1e80: 4f 52 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20 5b  OR_PKGS.....if [
1e90: 20 2d 6e 20 22 24 7b 4b 49 54 43 52 45 41 54 4f   -n "${KITCREATO
1ea0: 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e  R_PKGS}" ]; then
1eb0: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 4b 49 54  .....echo "  KIT
1ec0: 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22 24  CREATOR_PKGS=\"$
1ed0: 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53  {KITCREATOR_PKGS
1ee0: 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  }\"" >> "${build
1ef0: 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22  log}".....echo "
1f00: 20 20 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41    export KITCREA
1f10: 54 4f 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24 7b  TOR_PKGS" >> "${
1f20: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69  buildlog}"....fi
1f30: 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61  .....if [ "${sta
1f40: 74 69 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b  tictk}" = "1" ];
1f50: 20 74 68 65 6e 0a 09 09 09 09 53 54 41 54 49 43   then.....STATIC
1f60: 54 4b 3d 22 31 22 0a 09 09 09 09 65 78 70 6f 72  TK="1".....expor
1f70: 74 20 53 54 41 54 49 43 54 4b 0a 0a 09 09 09 09  t STATICTK......
1f80: 65 63 68 6f 20 22 20 20 53 54 41 54 49 43 54 4b  echo "  STATICTK
1f90: 3d 5c 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c 22  =\"${STATICTK}\"
1fa0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
1fb0: 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65  }".....echo "  e
1fc0: 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 22 20  xport STATICTK" 
1fd0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
1fe0: 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 65 63  ....fi.....if ec
1ff0: 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 67  ho "${args}" | g
2000: 72 65 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65  rep -- '--enable
2010: 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76 2f  -symbols' >/dev/
2020: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 53  null; then.....S
2030: 54 52 49 50 3d 27 74 72 75 65 27 0a 09 09 09 09  TRIP='true'.....
2040: 65 78 70 6f 72 74 20 53 54 52 49 50 0a 0a 09 09  export STRIP....
2050: 09 09 65 63 68 6f 20 22 20 20 53 54 52 49 50 3d  ..echo "  STRIP=
2060: 27 74 72 75 65 27 22 20 3e 3e 20 22 24 7b 62 75  'true'" >> "${bu
2070: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
2080: 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54 52 49  o "  export STRI
2090: 50 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  P" >> "${buildlo
20a0: 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66  g}"....fi.....if
20b0: 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72   [ "${kitcreator
20c0: 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65 61  }" != "./kitcrea
20d0: 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  tor" ]; then....
20e0: 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72 20 62  .echo "  mkdir b
20f0: 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69 6c  uild" >> "${buil
2100: 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53 65  dlog}"......# Se
2110: 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69  veral build scri
2120: 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b  pts rely on mink
2130: 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69  it to work.....i
2140: 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f  f grep './build/
2150: 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24 7b  make-minkit' "${
2160: 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f 64  kitcreator}" >/d
2170: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
2180: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 65  ull; then......e
2190: 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f  cho "  cat << \_
21a0: 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64  _EOF__ > ./build
21b0: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e  /make-minkit" >>
21c0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
21d0: 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40  ....sed 's@^@  @
21e0: 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  '  './build/make
21f0: 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b 62  -minkit' >> "${b
2200: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65  uildlog}"......e
2210: 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20  cho "  __EOF__" 
2220: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2230: 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e  ......echo '' >>
2240: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2250: 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53 65 76  ...fi......# Sev
2260: 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70  eral build scrip
2270: 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d  ts rely on make-
2280: 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65  kit-crosscompile
2290: 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20   to work.....if 
22a0: 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61  grep './build/ma
22b0: 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70  ke-kit-crosscomp
22c0: 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65 61 74  ile' "${kitcreat
22d0: 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  or}" >/dev/null 
22e0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65  2>/dev/null; the
22f0: 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20 63  n......echo "  c
2300: 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e  at << \__EOF__ >
2310: 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69   ./build/make-ki
2320: 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22 20  t-crosscompile" 
2330: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2340: 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ......sed 's@^@ 
2350: 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61   @'  './build/ma
2360: 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70  ke-kit-crosscomp
2370: 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  ile' >> "${build
2380: 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20  log}"......echo 
2390: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
23a0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
23b0: 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b  ..echo '' >> "${
23c0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66  buildlog}".....f
23d0: 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20 63  i......echo "  c
23e0: 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e  at << \__EOF__ >
23f0: 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20   ${kitcreator}" 
2400: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2410: 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20  .....sed 's@^@  
2420: 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61 74 6f  @'  "${kitcreato
2430: 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  r}" >> "${buildl
2440: 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20  og}".....echo " 
2450: 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b   __EOF__" >> "${
2460: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65  buildlog}".....e
2470: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
2480: 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09 09  ldlog}"....fi...
2490: 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69 74  .echo "  \"${kit
24a0: 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b 76  creator}\" \"${v
24b0: 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67 73  ersion}\" ${args
24c0: 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  }" >> "${buildlo
24d0: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
24e0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
24f0: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2500: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
2510: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
2520: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2530: 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73 75  " *** Build Resu
2540: 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  lts" >> "${build
2550: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
2560: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2570: 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69 6c 65  ".....buildfaile
2580: 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69 74 63  d="0"...."${kitc
2590: 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65 72 73  reator}" "${vers
25a0: 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e 3e  ion}" ${args} >>
25b0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32   "${buildlog}" 2
25c0: 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61 69 6c  >&1 || buildfail
25d0: 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70 20 2d  ed="1"....grep -
25e0: 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f  n '^' */build.lo
25f0: 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  g >> "${buildlog
2600: 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b  }" 2>&1.....if [
2610: 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22   "${kitdll}" = "
2620: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 23  1" ]; then.....#
2630: 20 43 72 65 61 74 65 20 74 65 73 74 20 64 72 69   Create test dri
2640: 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c 0a  vers for KitDLL.
2650: 09 09 09 09 28 0a 09 09 09 09 09 65 63 68 6f 20  ....(......echo 
2660: 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a  ""......echo "".
2670: 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09  .....echo ""....
2680: 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69  ..echo " *** Bui
2690: 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65 73  lding KitDLL tes
26a0: 74 20 64 72 69 76 65 72 20 28 74 63 6c 73 68 29  t driver (tclsh)
26b0: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 0a  "......echo ""..
26c0: 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f 62 75  .....cd kitsh/bu
26d0: 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20  ild/kitsh-*/ || 
26e0: 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61 6b 65  exit 1......make
26f0: 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70 20 74   tclsh......cp t
2700: 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09  clsh ../../../..
2710: 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c 64  ...) >> "${build
2720: 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09 66 69  log}" 2>&1....fi
2730: 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d 20 77  .....# Perform w
2740: 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73 69 6f  ildcard expansio
2750: 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d  n....createdkit=
2760: 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72 65 61  "$(ls -f1 ${crea
2770: 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f 6e  tedkit} 2>/dev/n
2780: 75 6c 6c 20 7c 20 68 65 61 64 20 2d 6e 20 31 29  ull | head -n 1)
2790: 22 0a 0a 09 09 09 69 66 20 5b 20 21 20 2d 66 20  ".....if [ ! -f 
27a0: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
27b0: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f  ]; then.....echo
27c0: 20 22 46 61 69 6c 65 64 20 74 6f 20 63 72 65 61   "Failed to crea
27d0: 74 65 20 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e  te kit ${version
27e0: 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09  }/${kit}" >&2...
27f0: 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66 61 69  ...failed="${fai
2800: 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f  led} ${version}/
2810: 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22 0a 0a 09  ${kit}-build"...
2820: 09 09 09 74 6f 75 63 68 20 22 24 7b 66 61 69 6c  ...touch "${fail
2830: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09  outputname}"....
2840: 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d  .mv "${buildlog}
2850: 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c 6f  " "${failbuildlo
2860: 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20 74  g}"......rm -f t
2870: 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69 6e  clsh......contin
2880: 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 56  ue....fi.....# V
2890: 65 72 69 66 79 20 73 61 6e 69 74 79 20 6f 66 20  erify sanity of 
28a0: 63 72 65 61 74 65 64 20 6b 69 74 0a 09 09 09 69  created kit....i
28b0: 73 73 61 6e 65 3d 31 0a 0a 09 09 09 23 23 20 56  ssane=1.....## V
28c0: 65 72 69 66 79 20 74 68 61 74 20 57 69 6e 33 32  erify that Win32
28d0: 20 62 75 69 6c 64 73 20 61 72 65 20 6f 66 20 63   builds are of c
28e0: 6f 72 72 65 63 74 20 74 79 70 65 0a 09 09 09 23  orrect type....#
28f0: 23 20 56 65 72 69 66 79 20 74 68 61 74 20 44 4c  # Verify that DL
2900: 4c 20 62 75 69 6c 64 73 20 61 72 65 20 6f 66 20  L builds are of 
2910: 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09 09 09  correct type....
2920: 63 61 73 65 20 22 2d 24 7b 76 65 72 73 69 6f 6e  case "-${version
2930: 7d 2d 24 7b 6b 69 74 7d 2d 22 20 69 6e 0a 09 09  }-${kit}-" in...
2940: 09 09 2a 2d 77 69 6e 33 32 2d 6b 69 74 64 6c 6c  ..*-win32-kitdll
2950: 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d 6b 69 74  -*|*-win32-*-kit
2960: 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  dll-*)......if !
2970: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
2980: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53  kit}" | grep 'MS
2990: 20 57 69 6e 64 6f 77 73 20 28 44 4c 4c 29 27 20   Windows (DLL)' 
29a0: 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e  >/dev/null; then
29b0: 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a  .......issane=0.
29c0: 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a  .....fi......;;.
29d0: 09 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a  ....*-kitdll-*).
29e0: 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22  .....if ! file "
29f0: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c  ${createdkit}" |
2a00: 20 67 72 65 70 20 27 73 68 61 72 65 64 20 6f 62   grep 'shared ob
2a10: 6a 65 63 74 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  ject' >/dev/null
2a20: 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73 73  ; then.......iss
2a30: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
2a40: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33  ...;;.....*-win3
2a50: 32 2d 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69 6e 33 32  2-notk-*|*-win32
2a60: 2d 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 09  -*-notk-*)......
2a70: 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65  if ! file "${cre
2a80: 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70  atedkit}" | grep
2a90: 20 27 4d 53 20 57 69 6e 64 6f 77 73 20 28 63 6f   'MS Windows (co
2aa0: 6e 73 6f 6c 65 29 27 20 3e 2f 64 65 76 2f 6e 75  nsole)' >/dev/nu
2ab0: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 65  ll; then.......e
2ac0: 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64 20  cho "Kit failed 
2ad0: 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f 72  sanity check for
2ae0: 20 62 65 69 6e 67 20 61 20 63 6f 6e 73 6f 6c 65   being a console
2af0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26   application" >&
2b00: 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30  2.......issane=0
2b10: 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b  ......fi......;;
2b20: 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 2a 29 0a  .....*-win32-*).
2b30: 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22  .....if ! file "
2b40: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c  ${createdkit}" |
2b50: 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77   grep 'MS Window
2b60: 73 20 28 47 55 49 29 27 20 3e 2f 64 65 76 2f 6e  s (GUI)' >/dev/n
2b70: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09  ull; then.......
2b80: 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64  echo "Kit failed
2b90: 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f   sanity check fo
2ba0: 72 20 62 65 69 6e 67 20 61 20 47 55 49 20 61 70  r being a GUI ap
2bb0: 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32 0a 09  plication" >&2..
2bc0: 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09  .....issane=0...
2bd0: 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09  ...fi......;;...
2be0: 09 65 73 61 63 0a 0a 09 09 09 23 23 20 56 65 72  .esac.....## Ver
2bf0: 69 66 79 20 74 68 65 20 62 75 69 6c 64 20 63 6f  ify the build co
2c00: 6d 70 6c 65 74 65 64 20 77 69 74 68 6f 75 74 20  mpleted without 
2c10: 77 61 72 6e 69 6e 67 73 0a 09 09 09 69 66 20 5b  warnings....if [
2c20: 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65 64 7d   "${buildfailed}
2c30: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
2c40: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
2c50: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
2c60: 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e 67 22 20  k for Building" 
2c70: 3e 26 32 0a 0a 09 09 09 09 69 73 73 61 6e 65 3d  >&2......issane=
2c80: 30 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4d 61  0....fi.....# Ma
2c90: 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61 6e 69 74  ke note of sanit
2ca0: 79 20 66 61 69 6c 75 72 65 0a 09 09 09 69 66 20  y failure....if 
2cb0: 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22 20 21 3d  [ "${issane}" !=
2cc0: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
2cd0: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
2ce0: 64 20 73 61 6e 69 74 79 20 24 7b 76 65 72 73 69  d sanity ${versi
2cf0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a  on}/${kit}" >&2.
2d00: 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
2d10: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
2d20: 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69 74 79 22  }/${kit}-sanity"
2d30: 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63 72 65 61  ......mv "${crea
2d40: 74 65 64 6b 69 74 7d 22 20 22 24 7b 66 61 69 6c  tedkit}" "${fail
2d50: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09  outputname}"....
2d60: 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d  .mv "${buildlog}
2d70: 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c 6f  " "${failbuildlo
2d80: 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20 74  g}"......rm -f t
2d90: 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69 6e  clsh......contin
2da0: 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 52  ue....fi.....# R
2db0: 65 6e 61 6d 65 20 63 72 65 61 74 65 64 20 6b 69  ename created ki
2dc0: 74 20 74 6f 20 66 69 6e 61 6c 20 64 65 73 74 69  t to final desti
2dd0: 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20 22 24 7b  nation....mv "${
2de0: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b  createdkit}" "${
2df0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09  outputname}"....
2e00: 69 66 20 5b 20 2d 66 20 22 74 63 6c 73 68 22 20  if [ -f "tclsh" 
2e10: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d 76 20 22  ]; then.....mv "
2e20: 74 63 6c 73 68 22 20 22 24 7b 6f 75 74 70 75 74  tclsh" "${output
2e30: 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a 09 09 09  name}-tclsh"....
2e40: 66 69 0a 0a 09 09 09 23 20 46 6f 72 20 4b 69 74  fi.....# For Kit
2e50: 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f 74 65  DLL, make a note
2e60: 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c   of the original
2e70: 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b 20 22 24   name....if [ "$
2e80: 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20  {kitdll}" = "1" 
2e90: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f  ]; then.....echo
2ea0: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
2eb0: 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65   > "${outputname
2ec0: 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 09 09 09 66  }-origname"....f
2ed0: 69 0a 09 09 66 69 0a 0a 09 09 23 20 54 65 73 74  i...fi....# Test
2ee0: 20 7a 69 70 20 73 74 61 74 75 73 0a 09 09 69 66   zip status...if
2ef0: 20 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f 75 74   unzip -l "${out
2f00: 70 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31 20 7c  putname}" 2>&1 |
2f10: 20 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74 63 6c   grep 'boot\.tcl
2f20: 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68  ' >/dev/null; th
2f30: 65 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22  en....canunzip="
2f40: 31 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 61 6e  1"...else....can
2f50: 75 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69 0a 0a  unzip="0"...fi..
2f60: 09 09 69 66 20 5b 20 22 24 7b 69 73 7a 69 70 7d  ..if [ "${iszip}
2f70: 22 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a 69 70  " != "${canunzip
2f80: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 65 63  }" ]; then....ec
2f90: 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 75 6e  ho "Failed to un
2fa0: 7a 69 70 20 7a 69 70 6b 69 74 20 6f 72 20 77 61  zip zipkit or wa
2fb0: 73 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69 70 20  s able to unzip 
2fc0: 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76 65 72  non-zipkit ${ver
2fd0: 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26  sion}/${kit}" >&
2fe0: 32 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  2.....failed="${
2ff0: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
3000: 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22 0a 0a  n}/${kit}-zip"..
3010: 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66 69  ...continue...fi
3020: 0a 0a 09 09 23 20 44 6f 20 6e 6f 74 20 63 6f 6e  ....# Do not con
3030: 74 69 6e 75 65 20 70 61 73 74 20 68 65 72 65 20  tinue past here 
3040: 66 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c 65 20  for un-runnable 
3050: 6b 69 74 73 0a 09 09 69 66 20 5b 20 22 24 7b 72  kits...if [ "${r
3060: 75 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22 31 22  unnable}" != "1"
3070: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f 6e 74   ]; then....cont
3080: 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20 49  inue...fi....# I
3090: 66 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68  f the name of th
30a0: 65 20 6f 72 69 67 69 6e 61 6c 20 62 75 69 6c 64  e original build
30b0: 20 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c 69 6e   matters, symlin
30c0: 6b 20 69 74 20 75 70 0a 09 09 69 66 20 5b 20 2d  k it up...if [ -
30d0: 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  f "${outputname}
30e0: 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74 68  -origname" ]; th
30f0: 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74  en....createdkit
3100: 3d 22 24 28 63 61 74 20 22 24 7b 6f 75 74 70 75  ="$(cat "${outpu
3110: 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22  tname}-origname"
3120: 29 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22 24 7b  )".....ln -s "${
3130: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b  outputname}" "${
3140: 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09 66  createdkit}"...f
3150: 69 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d 20 62  i....# Perform b
3160: 61 74 74 65 72 79 20 6f 66 20 74 65 73 74 73 0a  attery of tests.
3170: 09 09 23 23 20 43 6c 65 61 6e 20 74 65 73 74 73  ..## Clean tests
3180: 20 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22 24 7b   log...rm -f "${
3190: 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22  testresultslog}"
31a0: 0a 09 09 66 6f 72 20 74 65 73 74 73 63 70 20 69  ...for testscp i
31b0: 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f 74  n "${TESTDIR}"/t
31c0: 65 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f 0a 09  ests/*.tcl; do..
31d0: 09 09 74 65 73 74 73 63 70 5f 74 61 67 3d 22 24  ..testscp_tag="$
31e0: 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 74 65 73  (basename "${tes
31f0: 74 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a 09 09  tscp}" .tcl)"...
3200: 09 74 65 73 74 73 63 70 70 72 65 3d 22 24 28 64  .testscppre="$(d
3210: 69 72 6e 61 6d 65 20 22 24 7b 74 65 73 74 73 63  irname "${testsc
3220: 70 7d 22 29 2f 24 7b 74 65 73 74 73 63 70 5f 74  p}")/${testscp_t
3230: 61 67 7d 2e 73 68 22 0a 09 09 09 73 63 70 6c 6f  ag}.sh"....scplo
3240: 67 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75 74 6e  gfile="${outputn
3250: 61 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70 5f 74  ame}-${testscp_t
3260: 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23 20 49  ag}.log".....# I
3270: 66 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73 20 72  f a command is r
3280: 65 71 75 69 72 65 64 20 74 6f 20 73 74 61 72 74  equired to start
3290: 20 74 68 65 20 6b 69 74 2c 20 70 72 65 70 61 72   the kit, prepar
32a0: 65 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09 09 09  e to kill it....
32b0: 23 20 69 6e 20 63 61 73 65 20 6f 66 20 74 69 6d  # in case of tim
32c0: 65 6f 75 74 2e 0a 09 09 09 23 23 20 54 65 6d 70  eout.....## Temp
32d0: 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c 65 64  orarily disabled
32e0: 20 73 69 6e 63 65 20 63 75 72 72 65 6e 74 6c 79   since currently
32f0: 20 69 74 20 69 73 20 63 61 75 73 69 6e 67 0a 09   it is causing..
3300: 09 09 23 23 20 6d 6f 72 65 20 70 72 6f 62 6c 65  ..## more proble
3310: 6d 73 20 69 6e 20 74 68 65 20 66 6f 72 6d 20 6f  ms in the form o
3320: 66 20 74 65 73 74 73 20 62 65 69 6e 67 20 6b 69  f tests being ki
3330: 6c 6c 65 64 0a 09 09 09 23 23 20 70 72 65 6d 61  lled....## prema
3340: 74 75 72 65 6c 79 20 74 68 61 6e 20 77 65 20 61  turely than we a
3350: 72 65 20 68 61 76 69 6e 67 20 69 73 73 75 65 73  re having issues
3360: 20 77 69 74 68 20 74 65 73 74 73 0a 09 09 09 23   with tests....#
3370: 23 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b 69 74  # hanging....kit
3380: 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a 09 09  runkillpid=""...
3390: 09 69 66 20 5b 20 22 31 22 20 3d 20 22 30 22 20  .if [ "1" = "0" 
33a0: 2d 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75 6e 63  -a -n "${kitrunc
33b0: 6d 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  md}" ]; then....
33c0: 09 28 0a 09 09 09 09 09 73 6c 65 65 70 20 31 32  .(......sleep 12
33d0: 30 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c 20 22  0......killall "
33e0: 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 6f 75  $(basename "${ou
33f0: 74 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e 2f 64  tputname}")" >/d
3400: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
3410: 75 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65 76 2f  ull.....) >/dev/
3420: 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c  null 2>/dev/null
3430: 20 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b 69 6c   &.....kitrunkil
3440: 6c 70 69 64 3d 22 24 21 22 0a 09 09 09 66 69 0a  lpid="$!"....fi.
3450: 0a 09 09 09 28 0a 09 09 09 09 69 66 20 5b 20 2d  ....(.....if [ -
3460: 66 20 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d  f "${testscppre}
3470: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 2e  " ]; then.......
3480: 20 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d 22   "${testscppre}"
3490: 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 69 66 20  .....fi......if 
34a0: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
34b0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
34c0: 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20 22 24  .${kitruncmd} "$
34d0: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63 6c  {outputname}-tcl
34e0: 73 68 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22  sh" "${testscp}"
34f0: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3500: 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72   "${kit}" "${ver
3510: 73 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73 65 0a  sion}".....else.
3520: 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64  .....${kitruncmd
3530: 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  } "${outputname}
3540: 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20 22  " "${testscp}" "
3550: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22  ${outputname}" "
3560: 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72 73 69  ${kit}" "${versi
3570: 6f 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09 09 29  on}".....fi....)
3580: 20 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65   > "${scplogfile
3590: 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b  }" 2>&1.....if [
35a0: 20 22 24 3f 22 20 21 3d 20 22 30 22 20 5d 3b 20   "$?" != "0" ]; 
35b0: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53  then.....echo "S
35c0: 63 72 69 70 74 20 66 61 69 6c 65 64 3a 20 24 7b  cript failed: ${
35d0: 74 65 73 74 73 63 70 5f 74 61 67 7d 20 6f 6e 20  testscp_tag} on 
35e0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
35f0: 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c  }" >&2......fail
3600: 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b  ed="${failed} ${
3610: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d  version}/${kit}-
3620: 74 65 73 74 2d 24 7b 74 65 73 74 73 63 70 5f 74  test-${testscp_t
3630: 61 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f 20 22  ag}"......echo "
3640: 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a 20  ${testscp_tag}: 
3650: 46 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74 65 73  FAIL" >>  "${tes
3660: 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a 09  tresultslog}"...
3670: 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66  ...continue....f
3680: 69 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74 68 65  i.....# Kill the
3690: 20 77 61 74 63 68 64 6f 67 20 66 6f 72 20 74 68   watchdog for th
36a0: 69 73 20 69 74 65 72 61 74 69 6f 6e 0a 09 09 09  is iteration....
36b0: 69 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74 72 75  if [ -n "${kitru
36c0: 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20 74 68  nkillpid}" ]; th
36d0: 65 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39 20 22  en.....kill -9 "
36e0: 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 7d  ${kitrunkillpid}
36f0: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
3700: 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69 0a 0a  dev/null....fi..
3710: 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74 73  ...echo "${tests
3720: 63 70 5f 74 61 67 7d 3a 20 50 41 53 53 22 20 3e  cp_tag}: PASS" >
3730: 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74  >  "${testresult
3740: 73 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20 2d 66  slog}".....rm -f
3750: 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65 7d 22   "${scplogfile}"
3760: 0a 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20 5b 20  ...done....if [ 
3770: 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -f "${outputname
3780: 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74  }-origname" ]; t
3790: 68 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22 24 7b  hen....rm -f "${
37a0: 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09 66  createdkit}"...f
37b0: 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a 69 66  i..done.done..if
37c0: 20 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65 64 7d   [ -n "${failed}
37d0: 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20  " ]; then..echo 
37e0: 22 46 61 69 6c 65 64 3a 20 24 7b 66 61 69 6c 65  "Failed: ${faile
37f0: 64 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61 6e 75  d}".fi..# Cleanu
3800: 70 0a 23 23 20 54 65 72 6d 69 6e 61 74 65 20 58  p.## Terminate X
3810: 76 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24 7b 58  vfb.kill -9 "${X
3820: 56 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20 52 65  VFB_PID}"..## Re
3830: 6d 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d 72 66  move wine.rm -rf
3840: 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d 22   "${WINEPREFIX}"
3850: 0a 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 63  .../kitcreator c
3860: 6c 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c 73 68  lean.rm -f tclsh
3870: 0a                                               .