Hex Artifact Content

Artifact 8772772acc1ac35ce49cf80d4fdfb6894cd9fc30:


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