Hex Artifact Content

Artifact ad0883e4eb2eba1add6479cc64fb83b531cbf6bd:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 56 45  #! /bin/bash..VE
0010: 52 53 49 4f 4e 53 3d 22 38 2e 34 2e 31 39 20 38  RSIONS="8.4.19 8
0020: 2e 35 2e 31 31 20 63 76 73 5f 48 45 41 44 22 0a  .5.11 cvs_HEAD".
0030: 0a 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65  .# Find the base
0040: 20 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78   directory.for x
0050: 20 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61   in 1 2 3 4 __fa
0060: 69 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22  il__; do..if [ "
0070: 24 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f  ${x}" = "__fail_
0080: 5f 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68  _" ]; then...ech
0090: 6f 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e  o 'Unable to fin
00a0: 64 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62  d KitCreator, ab
00b0: 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09  orting.' >&2....
00c0: 65 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20  exit 1..fi...if 
00d0: 5b 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20  [ -x kitcreator 
00e0: 5d 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a  ]; then...break.
00f0: 09 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65  .fi...cd ...done
0100: 0a 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64  ..ROOTDIR="$(pwd
0110: 29 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f  )".TESTDIR="${RO
0120: 4f 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73  OTDIR}/build/tes
0130: 74 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49  t".export ROOTDI
0140: 52 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e  R TESTDIR..# Han
0150: 64 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65  dle command-line
0160: 20 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20   arguments.if [ 
0170: 22 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d  "$1" = "clean" ]
0180: 3b 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22  ; then..rm -rf "
0190: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
01a0: 0a 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c  .fi..# Create pl
01b0: 61 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a  ace to put kits.
01c0: 6d 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52  mkdir "${TESTDIR
01d0: 7d 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75  }/kits" >/dev/nu
01e0: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d  ll 2>/dev/null.m
01f0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
0200: 2f 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f  /kits/failed" >/
0210: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
0220: 6e 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22  null.if [ ! -d "
0230: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
0240: 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27   ]; then..echo '
0250: 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65  Unable to create
0260: 20 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79   kits/ directory
0270: 2c 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32  , aborting.' >&2
0280: 0a 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20  ...exit 1.fi..# 
0290: 43 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65  Cleanup.for file
02a0: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
02b0: 2f 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a  /kits/*.log; do.
02c0: 09 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65  .if echo "${file
02d0: 7d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62  }" | grep -- '-b
02e0: 75 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76  uild.log$' >/dev
02f0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f  /null; then...co
0300: 6e 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20  ntinue..fi...rm 
0310: 2d 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e  -f "${file}".don
0320: 65 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e  e..# Disable WIN
0330: 45 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45  E debugging.WINE
0340: 50 52 45 46 49 58 3d 22 24 7b 54 45 53 54 44 49  PREFIX="${TESTDI
0350: 52 7d 2f 2e 77 69 6e 65 22 0a 65 78 70 6f 72 74  R}/.wine".export
0360: 20 57 49 4e 45 50 52 45 46 49 58 0a 72 6d 20 2d   WINEPREFIX.rm -
0370: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
0380: 7d 22 0a 6d 6b 64 69 72 20 22 24 7b 57 49 4e 45  }".mkdir "${WINE
0390: 50 52 45 46 49 58 7d 22 0a 0a 63 61 74 20 3c 3c  PREFIX}"..cat <<
03a0: 20 5c 5f 45 4f 46 5f 20 3e 20 22 24 7b 57 49 4e   \_EOF_ > "${WIN
03b0: 45 50 52 45 46 49 58 7d 2f 75 70 64 61 74 65 2d  EPREFIX}/update-
03c0: 72 65 67 22 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c  reg".[HKEY_LOCAL
03d0: 5f 4d 41 43 48 49 4e 45 5c 53 6f 66 74 77 61 72  _MACHINE\Softwar
03e0: 65 5c 4d 69 63 72 6f 73 6f 66 74 5c 57 69 6e 64  e\Microsoft\Wind
03f0: 6f 77 73 20 4e 54 5c 43 75 72 72 65 6e 74 56 65  ows NT\CurrentVe
0400: 72 73 69 6f 6e 5c 41 65 44 65 62 75 67 5d 0a 22  rsion\AeDebug]."
0410: 41 75 74 6f 22 3d 64 77 6f 72 64 3a 30 30 30 30  Auto"=dword:0000
0420: 30 30 30 31 0a 22 44 65 62 75 67 67 65 72 22 3d  0001."Debugger"=
0430: 22 66 61 6c 73 65 22 0a 5f 45 4f 46 5f 0a 0a 72  "false"._EOF_..r
0440: 65 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52  egedit "${WINEPR
0450: 45 46 49 58 7d 2f 75 70 64 61 74 65 2d 72 65 67  EFIX}/update-reg
0460: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
0470: 64 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61 72  dev/null..# Star
0480: 74 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d 62  t Xvfb for X11-b
0490: 61 73 65 64 20 74 65 73 74 73 0a 58 56 46 42 5f  ased tests.XVFB_
04a0: 50 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a 33  PID="$(..Xvfb :3
04b0: 31 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30 78  1 -screen 0 800x
04c0: 36 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65 6e  600x24 -nolisten
04d0: 20 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20   tcp >/dev/null 
04e0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 65  2>/dev/null &..e
04f0: 63 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53 50  cho "$!".)".DISP
0500: 4c 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20 44  LAY=:31.export D
0510: 49 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24 7b  ISPLAY..if [ "${
0520: 42 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31 22  BIGBUILD}" = "1"
0530: 20 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d 22   ]; then..kits="
0540: 24 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c 2d  $(echo normal{,-
0550: 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68  zip,-nomk4}{,-th
0560: 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63  readed}{,-static
0570: 74 6b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d 61 6c  tk,-notk} normal
0580: 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e  {,-threaded}{,-n
0590: 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  otk}{,-nomk4}{,-
05a0: 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 77 69  debug}-kitdll wi
05b0: 6e 33 32 2d 69 35 38 36 7b 2c 2d 7a 69 70 2c 2d  n32-i586{,-zip,-
05c0: 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65  nomk4}{,-threade
05d0: 64 7d 7b 2c 2d 6e 6f 74 6b 7d 20 77 69 6e 33 32  d}{,-notk} win32
05e0: 2d 69 35 38 36 7b 2c 2d 74 68 72 65 61 64 65 64  -i586{,-threaded
05f0: 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b  }{,-notk}{,-nomk
0600: 34 7d 2d 6b 69 74 64 6c 6c 20 6d 69 6e 7b 2c 2d  4}-kitdll min{,-
0610: 73 74 61 74 69 63 7d 20 7b 6c 69 6e 75 78 2d 6d  static} {linux-m
0620: 69 70 73 65 6c 2d 6d 69 6e 7d 7b 2c 2d 64 65 62  ipsel-min}{,-deb
0630: 75 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b 6c  ug}{,-kitdll} {l
0640: 69 6e 75 78 2d 61 6d 64 36 34 2c 73 6f 6c 61 72  inux-amd64,solar
0650: 69 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d  is-i386,solaris-
0660: 61 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70  amd64,solaris-sp
0670: 61 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72  arc,solaris-spar
0680: 63 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36  c64,freebsd-amd6
0690: 34 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b  4,netbsd-amd64}{
06a0: 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  ,-zip,-nomk4}{,-
06b0: 74 68 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74  threaded}{,-stat
06c0: 69 63 74 6b 2c 2d 6e 6f 74 6b 7d 7b 2c 64 65 62  ictk,-notk}{,deb
06d0: 75 67 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38  ug} {solaris-i38
06e0: 36 2c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c  6,solaris-amd64,
06f0: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f  solaris-sparc,so
0700: 6c 61 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72  laris-sparc64,fr
0710: 65 65 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62  eebsd-amd64,netb
0720: 73 64 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65  sd-amd64}{,-thre
0730: 61 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d  aded}{,-notk}{,-
0740: 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d 6b  nomk4}{,debug}-k
0750: 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38  itdll netbsd-i38
0760: 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b  6{,-zip,-nomk4}{
0770: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 64 65 62  ,-threaded}{,deb
0780: 75 67 7d 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d  ug}-notk netbsd-
0790: 69 33 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d  i386{,-threaded}
07a0: 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67  {,-nomk4}{,debug
07b0: 7d 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61 6e  }-notk-kitdll an
07c0: 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 7b 2c  droid-arm-notk{,
07d0: 2d 64 65 62 75 67 7d 20 61 6e 64 6f 69 64 2d 61  -debug} andoid-a
07e0: 72 6d 2d 6e 6f 74 6b 7b 2c 2d 64 65 62 75 67 7d  rm-notk{,-debug}
07f0: 2d 6b 69 74 64 6c 6c 29 22 0a 65 6c 73 65 0a 09  -kitdll)".else..
0800: 6b 69 74 73 3d 22 6e 6f 72 6d 61 6c 20 6e 6f 72  kits="normal nor
0810: 6d 61 6c 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 74  mal-zip normal-t
0820: 68 72 65 61 64 65 64 20 6e 6f 72 6d 61 6c 2d 74  hreaded normal-t
0830: 68 72 65 61 64 65 64 2d 7a 69 70 20 6e 6f 72 6d  hreaded-zip norm
0840: 61 6c 2d 73 74 61 74 69 63 74 6b 20 6e 6f 72 6d  al-statictk norm
0850: 61 6c 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74  al-notk normal-t
0860: 68 72 65 61 64 65 64 2d 6e 6f 74 6b 20 6e 6f 72  hreaded-notk nor
0870: 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 7a 69 70  mal-threaded-zip
0880: 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d  -notk normal-nom
0890: 6b 34 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 20  k4 normal-debug 
08a0: 6d 69 6e 20 6d 69 6e 2d 73 74 61 74 69 63 20 6e  min min-static n
08b0: 6f 72 6d 61 6c 2d 6b 69 74 64 6c 6c 20 6e 6f 72  ormal-kitdll nor
08c0: 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6b 69 74  mal-threaded-kit
08d0: 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d  dll normal-notk-
08e0: 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f  kitdll normal-no
08f0: 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61  mk4-kitdll norma
0900: 6c 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74  l-nomk4-notk-kit
0910: 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61  dll normal-threa
0920: 64 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c  ded-nomk4-kitdll
0930: 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64   normal-threaded
0940: 2d 6e 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64  -notk-nomk4-kitd
0950: 6c 6c 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 2d  ll normal-debug-
0960: 6b 69 74 64 6c 6c 20 6d 69 6e 2d 6b 69 74 64 6c  kitdll min-kitdl
0970: 6c 20 77 69 6e 33 32 2d 69 35 38 36 20 77 69 6e  l win32-i586 win
0980: 33 32 2d 69 35 38 36 2d 7a 69 70 20 77 69 6e 33  32-i586-zip win3
0990: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 20  2-i586-threaded 
09a0: 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61  win32-i586-threa
09b0: 64 65 64 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35  ded-zip win32-i5
09c0: 38 36 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69 35  86-notk win32-i5
09d0: 38 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b  86-threaded-notk
09e0: 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b   win32-i586-nomk
09f0: 34 20 77 69 6e 33 32 2d 69 35 38 36 2d 6b 69 74  4 win32-i586-kit
0a00: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  dll win32-i586-t
0a10: 68 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 77  hreaded-kitdll w
0a20: 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 2d 6b  in32-i586-notk-k
0a30: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
0a40: 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69  -nomk4-kitdll wi
0a50: 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6e  n32-i586-nomk4-n
0a60: 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32  otk-kitdll win32
0a70: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e  -i586-threaded-n
0a80: 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  omk4-kitdll win3
0a90: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d  2-i586-threaded-
0aa0: 6e 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c  notk-nomk4-kitdl
0ab0: 6c 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d  l linux-mipsel-m
0ac0: 69 6e 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d  in linux-mipsel-
0ad0: 6d 69 6e 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  min-kitdll linux
0ae0: 2d 61 6d 64 36 34 20 6c 69 6e 75 78 2d 61 6d 64  -amd64 linux-amd
0af0: 36 34 2d 64 65 62 75 67 20 6c 69 6e 75 78 2d 61  64-debug linux-a
0b00: 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75  md64-kitdll linu
0b10: 78 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69  x-amd64-debug-ki
0b20: 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36 34  tdll linux-amd64
0b30: 2d 6e 6f 74 6b 20 6c 69 6e 75 78 2d 61 6d 64 36  -notk linux-amd6
0b40: 34 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 6c 69 6e  4-notk-debug lin
0b50: 75 78 2d 61 6d 64 36 34 2d 6e 6f 74 6b 2d 6b 69  ux-amd64-notk-ki
0b60: 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36 34  tdll linux-amd64
0b70: 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64  -notk-debug-kitd
0b80: 6c 6c 20 73 6f 6c 61 72 69 73 2d 69 33 38 36 20  ll solaris-i386 
0b90: 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64 65 62  solaris-i386-deb
0ba0: 75 67 20 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d  ug solaris-i386-
0bb0: 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 69  kitdll solaris-i
0bc0: 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  386-debug-kitdll
0bd0: 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 20 73   solaris-amd64 s
0be0: 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65 62  olaris-amd64-deb
0bf0: 75 67 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34  ug solaris-amd64
0c00: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0c10: 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64  amd64-debug-kitd
0c20: 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ll solaris-sparc
0c30: 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 64   solaris-sparc-d
0c40: 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 73 70 61  ebug solaris-spa
0c50: 72 63 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  rc-kitdll solari
0c60: 73 2d 73 70 61 72 63 2d 64 65 62 75 67 2d 6b 69  s-sparc-debug-ki
0c70: 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61  tdll solaris-spa
0c80: 72 63 36 34 20 73 6f 6c 61 72 69 73 2d 73 70 61  rc64 solaris-spa
0c90: 72 63 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72  rc64-debug solar
0ca0: 69 73 2d 73 70 61 72 63 36 34 2d 6b 69 74 64 6c  is-sparc64-kitdl
0cb0: 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36  l solaris-sparc6
0cc0: 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 66  4-debug-kitdll f
0cd0: 72 65 65 62 73 64 2d 61 6d 64 36 34 20 66 72 65  reebsd-amd64 fre
0ce0: 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67  ebsd-amd64-debug
0cf0: 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d 6b   freebsd-amd64-k
0d00: 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61 6d  itdll freebsd-am
0d10: 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  d64-debug-kitdll
0d20: 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74   netbsd-i386-not
0d30: 6b 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f  k netbsd-i386-no
0d40: 74 6b 2d 64 65 62 75 67 20 6e 65 74 62 73 64 2d  tk-debug netbsd-
0d50: 69 33 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c  i386-notk-kitdll
0d60: 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74   netbsd-i386-not
0d70: 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 6e  k-debug-kitdll n
0d80: 65 74 62 73 64 2d 61 6d 64 36 34 20 6e 65 74 62  etbsd-amd64 netb
0d90: 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 20 6e  sd-amd64-debug n
0da0: 65 74 62 73 64 2d 61 6d 64 36 34 2d 6b 69 74 64  etbsd-amd64-kitd
0db0: 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d  ll netbsd-amd64-
0dc0: 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 61 6e 64  debug-kitdll and
0dd0: 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 20 61 6e  roid-arm-notk an
0de0: 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 64  droid-arm-notk-d
0df0: 65 62 75 67 20 61 6e 64 72 6f 69 64 2d 61 72 6d  ebug android-arm
0e00: 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61 6e 64  -notk-kitdll and
0e10: 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 64 65  roid-arm-notk-de
0e20: 62 75 67 2d 6b 69 74 64 6c 6c 22 0a 66 69 0a 0a  bug-kitdll".fi..
0e30: 66 61 69 6c 65 64 3d 22 22 0a 66 6f 72 20 6b 69  failed="".for ki
0e40: 74 20 69 6e 20 24 6b 69 74 73 3b 20 64 6f 0a 09  t in $kits; do..
0e50: 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 6b 69  kitcreator="./ki
0e60: 74 63 72 65 61 74 6f 72 22 0a 09 61 72 67 73 3d  tcreator"..args=
0e70: 22 22 0a 09 72 75 6e 6e 61 62 6c 65 3d 22 31 22  ""..runnable="1"
0e80: 0a 09 69 73 7a 69 70 3d 22 30 22 0a 09 73 74 61  ..iszip="0"..sta
0e90: 74 69 63 74 6b 3d 22 30 22 0a 09 6e 6f 74 6b 3d  tictk="0"..notk=
0ea0: 22 30 22 0a 09 6e 6f 6d 6b 34 3d 22 30 22 0a 09  "0"..nomk4="0"..
0eb0: 78 63 6f 6d 70 69 6c 65 3d 22 30 22 0a 09 6b 69  xcompile="0"..ki
0ec0: 74 64 6c 6c 3d 22 30 22 0a 09 6b 69 74 72 75 6e  tdll="0"..kitrun
0ed0: 63 6d 64 3d 22 22 0a 0a 09 23 20 48 61 6e 64 6c  cmd=""...# Handl
0ee0: 65 20 62 61 73 65 20 63 6f 6e 66 69 67 75 72 61  e base configura
0ef0: 74 69 6f 6e 0a 09 6f 73 3d 22 24 28 75 6e 61 6d  tion..os="$(unam
0f00: 65 20 2d 73 20 7c 20 64 64 20 63 6f 6e 76 3d 6c  e -s | dd conv=l
0f10: 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c  case 2>/dev/null
0f20: 29 22 0a 09 63 70 75 3d 22 24 28 75 6e 61 6d 65  )"..cpu="$(uname
0f30: 20 2d 6d 20 7c 20 64 64 20 63 6f 6e 76 3d 6c 63   -m | dd conv=lc
0f40: 61 73 65 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 29  ase 2>/dev/null)
0f50: 22 0a 09 63 61 73 65 20 22 24 7b 6b 69 74 7d 22  "..case "${kit}"
0f60: 20 69 6e 0a 09 09 6e 6f 72 6d 61 6c 7c 6e 6f 72   in...normal|nor
0f70: 6d 61 6c 2d 2a 29 0a 09 09 09 6b 69 74 3d 22 24  mal-*)....kit="$
0f80: 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c  (echo "${kit}" |
0f90: 20 73 65 64 20 22 73 40 5e 6e 6f 72 6d 61 6c 40   sed "s@^normal@
0fa0: 24 6f 73 2d 24 63 70 75 40 22 29 22 0a 09 09 09  $os-$cpu@")"....
0fb0: 3b 3b 0a 09 09 6d 69 6e 7c 6d 69 6e 2d 6b 69 74  ;;...min|min-kit
0fc0: 64 6c 6c 29 0a 09 09 09 6b 69 74 63 72 65 61 74  dll)....kitcreat
0fd0: 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  or="./build/make
0fe0: 2d 6d 69 6e 6b 69 74 22 0a 09 09 09 69 73 7a 69  -minkit"....iszi
0ff0: 70 3d 22 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31  p="1"....notk="1
1000: 22 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68 6f  "....kit="$(echo
1010: 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20   "${kit}" | sed 
1020: 22 73 40 5e 6d 69 6e 40 24 6f 73 2d 24 63 70 75  "s@^min@$os-$cpu
1030: 2d 6d 69 6e 40 22 29 22 0a 09 09 09 3b 3b 0a 09  -min@")"....;;..
1040: 09 6d 69 6e 2d 73 74 61 74 69 63 29 0a 09 09 09  .min-static)....
1050: 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75  kitcreator="./bu
1060: 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 2d  ild/make-minkit-
1070: 73 74 61 74 69 63 22 0a 09 09 09 69 73 7a 69 70  static"....iszip
1080: 3d 22 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22  ="1"....notk="1"
1090: 0a 09 09 09 6b 69 74 3d 22 24 7b 6f 73 7d 2d 24  ....kit="${os}-$
10a0: 7b 63 70 75 7d 2d 6d 69 6e 2d 73 74 61 74 69 63  {cpu}-min-static
10b0: 22 0a 09 09 09 3b 3b 0a 09 09 77 69 6e 33 32 7c  "....;;...win32|
10c0: 77 69 6e 33 32 2d 2a 29 0a 09 09 09 6b 69 74 63  win32-*)....kitc
10d0: 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f  reator="./build/
10e0: 6d 61 6b 65 2d 6b 69 74 2d 77 69 6e 33 32 22 0a  make-kit-win32".
10f0: 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a  ...xcompile="1".
1100: 09 09 09 6b 69 74 72 75 6e 63 6d 64 3d 22 77 69  ...kitruncmd="wi
1110: 6e 65 22 0a 09 09 09 3b 3b 0a 09 09 6c 69 6e 75  ne"....;;...linu
1120: 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e  x-mipsel-min|lin
1130: 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69  ux-mipsel-min-ki
1140: 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63 72 65 61  tdll)....kitcrea
1150: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
1160: 65 2d 6b 69 74 2d 6d 69 70 73 65 6c 22 0a 09 09  e-kit-mipsel"...
1170: 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09  .runnable="0"...
1180: 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09  .xcompile="1"...
1190: 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 69 73 7a  .notk="1"....isz
11a0: 69 70 3d 22 31 22 0a 09 09 09 3b 3b 0a 09 09 61  ip="1"....;;...a
11b0: 6e 64 72 6f 69 64 2d 61 72 6d 7c 61 6e 64 72 6f  ndroid-arm|andro
11c0: 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09 09 6c 69 6e  id-arm-*|\...lin
11d0: 75 78 2d 61 6d 64 36 34 7c 6c 69 6e 75 78 2d 61  ux-amd64|linux-a
11e0: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  md64-*|\...solar
11f0: 69 73 2d 69 33 38 36 7c 73 6f 6c 61 72 69 73 2d  is-i386|solaris-
1200: 69 33 38 36 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  i386-*|\...solar
1210: 69 73 2d 61 6d 64 36 34 7c 73 6f 6c 61 72 69 73  is-amd64|solaris
1220: 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c  -amd64-*|\...sol
1230: 61 72 69 73 2d 73 70 61 72 63 7c 73 6f 6c 61 72  aris-sparc|solar
1240: 69 73 2d 73 70 61 72 63 2d 2a 7c 5c 0a 09 09 73  is-sparc-*|\...s
1250: 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34 7c 73  olaris-sparc64|s
1260: 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34 2d 2a  olaris-sparc64-*
1270: 7c 5c 0a 09 09 66 72 65 65 62 73 64 2d 61 6d 64  |\...freebsd-amd
1280: 36 34 7c 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64|freebsd-amd64
1290: 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 69 33  -*|\...netbsd-i3
12a0: 38 36 7c 6e 65 74 62 73 64 2d 69 33 38 36 2d 2a  86|netbsd-i386-*
12b0: 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 61 6d 64 36  |\...netbsd-amd6
12c0: 34 7c 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 2a  4|netbsd-amd64-*
12d0: 7c 5c 0a 09 09 68 70 75 78 2d 68 70 70 61 36 34  |\...hpux-hppa64
12e0: 7c 68 70 75 78 2d 68 70 70 61 36 34 2d 2a 29 0a  |hpux-hppa64-*).
12f0: 09 09 09 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65  ...platform="$(e
1300: 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 63  cho "${kit}" | c
1310: 75 74 20 2d 66 20 31 2d 32 20 2d 64 20 27 2d 27  ut -f 1-2 -d '-'
1320: 29 22 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72  )"....kitcreator
1330: 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b  ="./build/make-k
1340: 69 74 2d 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 0a  it-${platform}".
1350: 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a  ...runnable="0".
1360: 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a  ...xcompile="1".
1370: 09 09 09 69 73 7a 69 70 3d 22 30 22 0a 0a 09 09  ...iszip="0"....
1380: 09 69 66 20 65 63 68 6f 20 22 24 7b 6b 69 74 7d  .if echo "${kit}
1390: 22 20 7c 20 65 67 72 65 70 20 2d 2d 20 27 2d 28  " | egrep -- '-(
13a0: 68 70 70 61 36 34 7c 61 6d 64 36 34 7c 73 70 61  hppa64|amd64|spa
13b0: 72 63 36 34 29 2d 27 20 3e 2f 64 65 76 2f 6e 75  rc64)-' >/dev/nu
13c0: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 61 72 67  ll; then.....arg
13d0: 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61  s="${args} --ena
13e0: 62 6c 65 2d 36 34 62 69 74 22 0a 09 09 09 66 69  ble-64bit"....fi
13f0: 0a 09 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09 69  ....;;..esac...i
1400: 66 20 5b 20 22 24 7b 78 63 6f 6d 70 69 6c 65 7d  f [ "${xcompile}
1410: 22 20 21 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  " != "0" ]; then
1420: 0a 09 09 6b 69 74 3d 22 24 7b 6b 69 74 7d 2d 78  ...kit="${kit}-x
1430: 63 6f 6d 70 69 6c 65 22 0a 09 66 69 0a 0a 09 23  compile"..fi...#
1440: 20 48 61 6e 64 6c 65 20 61 64 64 69 74 69 6f 6e   Handle addition
1450: 61 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  al configuration
1460: 0a 09 74 65 6d 70 6b 69 74 3d 22 2d 24 7b 6b 69  ..tempkit="-${ki
1470: 74 7d 2d 22 0a 09 66 6f 72 20 74 72 79 20 69 6e  t}-"..for try in
1480: 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 38   1 2 3 4 5 6 7 8
1490: 20 39 3b 20 64 6f 0a 09 09 63 61 73 65 20 22 2d   9; do...case "-
14a0: 24 7b 74 65 6d 70 6b 69 74 7d 2d 22 20 69 6e 0a  ${tempkit}-" in.
14b0: 09 09 09 2a 2d 74 68 72 65 61 64 65 64 2d 2a 29  ...*-threaded-*)
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 74 68 72 65  " | sed 's@-thre
14f0: 61 64 65 64 2d 40 2d 40 27 29 22 0a 09 09 09 09  aded-@-@')".....
1500: 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d  args="${args} --
1510: 65 6e 61 62 6c 65 2d 74 68 72 65 61 64 73 22 0a  enable-threads".
1520: 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 7a 69 70 2d  ....;;....*-zip-
1530: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
1540: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1550: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 7a 69  t}" | sed 's@-zi
1560: 70 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67  p-@-@')".....arg
1570: 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61  s="${args} --ena
1580: 62 6c 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d  ble-kit-storage=
1590: 7a 69 70 22 0a 09 09 09 09 69 73 7a 69 70 3d 22  zip".....iszip="
15a0: 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 73  1".....;;....*-s
15b0: 74 61 74 69 63 74 6b 2d 2a 29 0a 09 09 09 09 74  tatictk-*).....t
15c0: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
15d0: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
15e0: 64 20 27 73 40 2d 73 74 61 74 69 63 74 6b 2d 40  d 's@-statictk-@
15f0: 2d 40 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22  -@')".....if [ "
1600: 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 30 22 20 5d  ${notk}" = "0" ]
1610: 3b 20 74 68 65 6e 0a 09 09 09 09 09 73 74 61 74  ; then......stat
1620: 69 63 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73  ictk="1".....els
1630: 65 0a 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b  e......echo "${k
1640: 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63  it}: Unable to c
1650: 72 65 61 74 65 20 53 74 61 74 69 63 54 6b 20 61  reate StaticTk a
1660: 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e  nd NoTk, ignorin
1670: 67 20 53 74 61 74 69 63 54 6b 22 20 3e 26 32 0a  g StaticTk" >&2.
1680: 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09  ....fi.....;;...
1690: 09 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 74  .*-notk-*).....t
16a0: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
16b0: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
16c0: 64 20 27 73 40 2d 6e 6f 74 6b 2d 40 2d 40 27 29  d 's@-notk-@-@')
16d0: 22 0a 09 09 09 09 69 66 20 5b 20 22 24 7b 73 74  ".....if [ "${st
16e0: 61 74 69 63 74 6b 7d 22 20 3d 20 22 30 22 20 5d  atictk}" = "0" ]
16f0: 3b 20 74 68 65 6e 0a 09 09 09 09 09 6e 6f 74 6b  ; then......notk
1700: 3d 22 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09  ="1".....else...
1710: 09 09 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a  ...echo "${kit}:
1720: 20 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74   Unable to creat
1730: 65 20 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e  e StaticTk and N
1740: 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 4e 6f  oTk, ignoring No
1750: 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09  Tk" >&2.....fi..
1760: 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 6d 6b 34  ...;;....*-nomk4
1770: 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d  -*).....tempkit=
1780: 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b  "$(echo "${tempk
1790: 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6e  it}" | sed 's@-n
17a0: 6f 6d 6b 34 2d 40 2d 40 27 29 22 0a 09 09 09 09  omk4-@-@')".....
17b0: 6e 6f 6d 6b 34 3d 22 31 22 0a 09 09 09 09 69 73  nomk4="1".....is
17c0: 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09  zip="1".....;;..
17d0: 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09  ..*-kitdll-*)...
17e0: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
17f0: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1800: 20 73 65 64 20 27 73 40 2d 6b 69 74 64 6c 6c 2d   sed 's@-kitdll-
1810: 40 2d 40 27 29 22 0a 09 09 09 09 6b 69 74 64 6c  @-@')".....kitdl
1820: 6c 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09  l="1".....;;....
1830: 2a 2d 64 65 62 75 67 2d 2a 29 0a 09 09 09 09 74  *-debug-*).....t
1840: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
1850: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1860: 64 20 27 73 40 2d 64 65 62 75 67 2d 40 2d 40 27  d 's@-debug-@-@'
1870: 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61  )".....args="${a
1880: 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 73 79  rgs} --enable-sy
1890: 6d 62 6f 6c 73 22 0a 09 09 09 09 3b 3b 0a 09 09  mbols".....;;...
18a0: 65 73 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20  esac..done...if 
18b0: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
18c0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 23 20  "1" ]; then...# 
18d0: 43 75 72 72 65 6e 74 6c 79 20 6e 6f 20 4b 69 74  Currently no Kit
18e0: 44 4c 4c 20 75 73 65 73 20 5a 69 70 0a 09 09 69  DLL uses Zip...i
18f0: 73 7a 69 70 3d 22 30 22 0a 09 66 69 0a 0a 09 66  szip="0"..fi...f
1900: 6f 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 24 7b  or version in ${
1910: 56 45 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a 09 09  VERSIONS}; do...
1920: 23 20 57 6f 72 6b 20 61 72 6f 75 6e 64 20 63 68  # Work around ch
1930: 61 6e 67 65 73 20 69 6e 20 64 65 66 61 75 6c 74  anges in default
1940: 20 62 65 68 61 76 69 6f 75 72 0a 09 09 69 66 20   behaviour...if 
1950: 5b 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 20 3d  [ "${version}" =
1960: 20 22 63 76 73 5f 48 45 41 44 22 20 5d 3b 20 74   "cvs_HEAD" ]; t
1970: 68 65 6e 0a 09 09 09 6b 69 74 3d 22 24 28 65 63  hen....kit="$(ec
1980: 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65  ho "${kit}" | se
1990: 64 20 27 73 40 2d 74 68 72 65 61 64 65 64 40 2d  d 's@-threaded@-
19a0: 75 6e 74 68 72 65 61 64 65 64 40 27 29 22 0a 09  unthreaded@')"..
19b0: 09 09 61 72 67 73 3d 22 24 28 65 63 68 6f 20 22  ..args="$(echo "
19c0: 24 7b 61 72 67 73 7d 22 20 7c 20 73 65 64 20 27  ${args}" | sed '
19d0: 73 40 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65  s@ --enable-thre
19e0: 61 64 73 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74  ads@ --disable-t
19f0: 68 72 65 61 64 73 40 27 29 22 0a 09 09 66 69 0a  hreads@')"...fi.
1a00: 0a 09 09 23 20 43 72 65 61 74 65 20 54 63 6c 6b  ...# Create Tclk
1a10: 69 74 0a 09 09 69 66 20 5b 20 22 24 7b 6b 69 74  it...if [ "${kit
1a20: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
1a30: 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  hen....createdki
1a40: 74 3d 22 6c 69 62 74 63 6c 6b 69 74 2a 2e 64 6c  t="libtclkit*.dl
1a50: 6c 20 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a 22 0a  l libtclkit*.*".
1a60: 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ...outputname="$
1a70: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 6c  {TESTDIR}/kits/l
1a80: 69 62 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  ibtclkit-${versi
1a90: 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66  on}-${kit}"....f
1aa0: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ailoutputname="$
1ab0: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
1ac0: 61 69 6c 65 64 2f 6c 69 62 74 63 6c 6b 69 74 2d  ailed/libtclkit-
1ad0: 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74  ${version}-${kit
1ae0: 7d 22 0a 09 09 09 73 64 6b 3d 22 6c 69 62 74 63  }"....sdk="libtc
1af0: 6c 6b 69 74 2d 73 64 6b 2d 24 7b 76 65 72 73 69  lkit-sdk-${versi
1b00: 6f 6e 7d 2e 74 61 72 2e 67 7a 22 0a 09 09 65 6c  on}.tar.gz"...el
1b10: 73 65 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74  se....createdkit
1b20: 3d 22 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  ="tclkit-${versi
1b30: 6f 6e 7d 22 0a 09 09 09 6f 75 74 70 75 74 6e 61  on}"....outputna
1b40: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1b50: 69 74 73 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72  its/tclkit-${ver
1b60: 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09  sion}-${kit}"...
1b70: 09 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d  .failoutputname=
1b80: 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73  "${TESTDIR}/kits
1b90: 2f 66 61 69 6c 65 64 2f 74 63 6c 6b 69 74 2d 24  /failed/tclkit-$
1ba0: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
1bb0: 22 0a 09 09 09 73 64 6b 3d 27 27 0a 09 09 66 69  "....sdk=''...fi
1bc0: 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 6f  ...buildlog="${o
1bd0: 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64  utputname}-build
1be0: 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62 75 69 6c  .log"...failbuil
1bf0: 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f 75 74 70  dlog="${failoutp
1c00: 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f  utname}-build.lo
1c10: 67 22 0a 09 09 74 65 73 74 72 65 73 75 6c 74 73  g"...testresults
1c20: 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d  log="${outputnam
1c30: 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22 0a 0a 09  e}-tests.log"...
1c40: 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b 6f 75  .if [ ! -f "${ou
1c50: 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68  tputname}" ]; th
1c60: 65 6e 0a 09 09 09 75 6e 73 65 74 20 4b 49 54 43  en....unset KITC
1c70: 52 45 41 54 4f 52 5f 50 4b 47 53 20 53 54 41 54  REATOR_PKGS STAT
1c80: 49 43 54 4b 20 53 54 52 49 50 0a 0a 09 09 09 69  ICTK STRIP.....i
1c90: 66 20 5b 20 2d 66 20 22 24 7b 66 61 69 6c 6f 75  f [ -f "${failou
1ca0: 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68  tputname}" ]; th
1cb0: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53 6b 69  en.....echo "Ski
1cc0: 70 70 69 6e 67 20 72 65 62 75 69 6c 64 69 6e 67  pping rebuilding
1cd0: 20 66 61 69 6c 65 64 20 6b 69 74 20 24 7b 76 65   failed kit ${ve
1ce0: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20 2e 2e  rsion}/${kit} ..
1cf0: 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22  ."......failed="
1d00: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
1d10: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c  ion}/${kit}-buil
1d20: 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65  d"......continue
1d30: 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d 20 2d 66  ....fi.....rm -f
1d40: 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b 69 74 63   tclsh...../kitc
1d50: 72 65 61 74 6f 72 20 63 6c 65 61 6e 20 3e 2f 64  reator clean >/d
1d60: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
1d70: 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20 22 43 72  ull.....echo "Cr
1d80: 65 61 74 69 6e 67 20 54 63 6c 6b 69 74 20 24 7b  eating Tclkit ${
1d90: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2e  version}/${kit}.
1da0: 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a  .."....echo " **
1db0: 2a 20 42 75 69 6c 64 20 73 74 61 72 74 65 64 20  * Build started 
1dc0: 24 28 77 68 6f 61 6d 69 29 40 24 28 68 6f 73 74  $(whoami)@$(host
1dd0: 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61 74 65 29  name) on $(date)
1de0: 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d  " > "${buildlog}
1df0: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
1e00: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
1e10: 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c  .echo " *** Buil
1e20: 64 20 53 63 72 69 70 74 22 20 3e 3e 20 22 24 7b  d Script" >> "${
1e30: 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 69  buildlog}".....i
1e40: 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20  f [ "${notk}" = 
1e50: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
1e60: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
1e70: 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27 0a 09 09  'itcl mk4tcl'...
1e80: 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b  .fi.....if [ "${
1e90: 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22 20 5d 3b  nomk4}" = "1" ];
1ea0: 20 74 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d   then.....if [ -
1eb0: 7a 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  z "${KITCREATOR_
1ec0: 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  PKGS}" ]; then..
1ed0: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
1ee0: 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27 0a 09 09  KGS='itcl tk'...
1ef0: 09 09 65 6c 73 65 0a 09 09 09 09 09 4b 49 54 43  ..else......KITC
1f00: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22 24 28 65  REATOR_PKGS="$(e
1f10: 63 68 6f 20 22 24 7b 4b 49 54 43 52 45 41 54 4f  cho "${KITCREATO
1f20: 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65 64 20 27  R_PKGS}" | sed '
1f30: 73 40 6d 6b 34 74 63 6c 40 40 27 29 22 0a 09 09  s@mk4tcl@@')"...
1f40: 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 69  ..fi....fi.....i
1f50: 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20  f [ "${kitdll}" 
1f60: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
1f70: 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54  ..if [ -z "${KIT
1f80: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d  CREATOR_PKGS}" ]
1f90: 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43  ; then......KITC
1fa0: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20  REATOR_PKGS='tk 
1fb0: 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b 69 74 64  itcl mk4tcl kitd
1fc0: 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09  ll'.....else....
1fd0: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
1fe0: 53 3d 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  S="${KITCREATOR_
1ff0: 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22 0a 09 09  PKGS} kitdll"...
2000: 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 65  ..fi....fi.....e
2010: 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52  xport KITCREATOR
2020: 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20 5b 20 2d  _PKGS.....if [ -
2030: 6e 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  n "${KITCREATOR_
2040: 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  PKGS}" ]; then..
2050: 09 09 09 65 63 68 6f 20 22 20 20 4b 49 54 43 52  ...echo "  KITCR
2060: 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22 24 7b 4b  EATOR_PKGS=\"${K
2070: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 5c  ITCREATOR_PKGS}\
2080: 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  "" >> "${buildlo
2090: 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20  g}".....echo "  
20a0: 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f  export KITCREATO
20b0: 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24 7b 62 75  R_PKGS" >> "${bu
20c0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a  ildlog}"....fi..
20d0: 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61 74 69  ...if [ "${stati
20e0: 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  ctk}" = "1" ]; t
20f0: 68 65 6e 0a 09 09 09 09 53 54 41 54 49 43 54 4b  hen.....STATICTK
2100: 3d 22 31 22 0a 09 09 09 09 65 78 70 6f 72 74 20  ="1".....export 
2110: 53 54 41 54 49 43 54 4b 0a 0a 09 09 09 09 65 63  STATICTK......ec
2120: 68 6f 20 22 20 20 53 54 41 54 49 43 54 4b 3d 5c  ho "  STATICTK=\
2130: 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c 22 22 20  "${STATICTK}\"" 
2140: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2150: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65 78 70  .....echo "  exp
2160: 6f 72 74 20 53 54 41 54 49 43 54 4b 22 20 3e 3e  ort STATICTK" >>
2170: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2180: 09 09 66 69 0a 0a 09 09 09 69 66 20 65 63 68 6f  ..fi.....if echo
2190: 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 67 72 65   "${args}" | gre
21a0: 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65 2d 73  p -- '--enable-s
21b0: 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76 2f 6e 75  ymbols' >/dev/nu
21c0: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 52  ll; then.....STR
21d0: 49 50 3d 27 74 72 75 65 27 0a 09 09 09 09 65 78  IP='true'.....ex
21e0: 70 6f 72 74 20 53 54 52 49 50 0a 0a 09 09 09 09  port STRIP......
21f0: 65 63 68 6f 20 22 20 20 53 54 52 49 50 3d 27 74  echo "  STRIP='t
2200: 72 75 65 27 22 20 3e 3e 20 22 24 7b 62 75 69 6c  rue'" >> "${buil
2210: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
2220: 22 20 20 65 78 70 6f 72 74 20 53 54 52 49 50 22  "  export STRIP"
2230: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2240: 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b  "....fi.....if [
2250: 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22   "${kitcreator}"
2260: 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65 61 74 6f   != "./kitcreato
2270: 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  r" ]; then.....e
2280: 63 68 6f 20 22 20 20 6d 6b 64 69 72 20 62 75 69  cho "  mkdir bui
2290: 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  ld" >> "${buildl
22a0: 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53 65 76 65  og}"......# Seve
22b0: 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74  ral build script
22c0: 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b 69 74  s rely on minkit
22d0: 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20   to work.....if 
22e0: 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61  grep './build/ma
22f0: 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24 7b 6b 69  ke-minkit' "${ki
2300: 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76  tcreator}" >/dev
2310: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
2320: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68  l; then......ech
2330: 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45  o "  cat << \__E
2340: 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d  OF__ > ./build/m
2350: 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e 20 22  ake-minkit" >> "
2360: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2370: 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20  ..sed 's@^@  @' 
2380: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d   './build/make-m
2390: 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b 62 75 69  inkit' >> "${bui
23a0: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68  ldlog}"......ech
23b0: 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e  o "  __EOF__" >>
23c0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
23d0: 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
23e0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
23f0: 09 66 69 0a 0a 09 09 09 09 23 20 53 65 76 65 72  .fi......# Sever
2400: 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74 73  al build scripts
2410: 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d 6b 69   rely on make-ki
2420: 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 20 74  t-crosscompile t
2430: 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72  o work.....if gr
2440: 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  ep './build/make
2450: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
2460: 65 27 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72  e' "${kitcreator
2470: 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  }" >/dev/null 2>
2480: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
2490: 09 09 09 09 09 65 63 68 6f 20 22 20 20 63 61 74  .....echo "  cat
24a0: 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e   << \__EOF__ > .
24b0: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d  /build/make-kit-
24c0: 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22 20 3e 3e  crosscompile" >>
24d0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
24e0: 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40  ....sed 's@^@  @
24f0: 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  '  './build/make
2500: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
2510: 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  e' >> "${buildlo
2520: 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 22 20  g}"......echo " 
2530: 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b   __EOF__" >> "${
2540: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
2550: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
2560: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66 69 0a  ildlog}".....fi.
2570: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 63 61 74  .....echo "  cat
2580: 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 24   << \__EOF__ > $
2590: 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 3e  {kitcreator}" >>
25a0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
25b0: 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27  ...sed 's@^@  @'
25c0: 20 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d    "${kitcreator}
25d0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
25e0: 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 5f  }".....echo "  _
25f0: 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75  _EOF__" >> "${bu
2600: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
2610: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
2620: 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09 09 09 65  log}"....fi....e
2630: 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69 74 63 72  cho "  \"${kitcr
2640: 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b 76 65 72  eator}\" \"${ver
2650: 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67 73 7d 22  sion}\" ${args}"
2660: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2670: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
2680: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
2690: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
26a0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
26b0: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
26c0: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20  log}"....echo " 
26d0: 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73 75 6c 74  *** Build Result
26e0: 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  s" >> "${buildlo
26f0: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
2700: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2710: 0a 09 09 09 62 75 69 6c 64 66 61 69 6c 65 64 3d  ....buildfailed=
2720: 22 30 22 0a 09 09 09 22 24 7b 6b 69 74 63 72 65  "0"...."${kitcre
2730: 61 74 6f 72 7d 22 20 22 24 7b 76 65 72 73 69 6f  ator}" "${versio
2740: 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e 3e 20 22  n}" ${args} >> "
2750: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26  ${buildlog}" 2>&
2760: 31 20 7c 7c 20 62 75 69 6c 64 66 61 69 6c 65 64  1 || buildfailed
2770: 3d 22 31 22 0a 09 09 09 67 72 65 70 20 2d 6e 20  ="1"....grep -n 
2780: 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f 67 20  '^' */build.log 
2790: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
27a0: 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b 20 22   2>&1.....if [ "
27b0: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
27c0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 23 20 43   ]; then.....# C
27d0: 72 65 61 74 65 20 74 65 73 74 20 64 72 69 76 65  reate test drive
27e0: 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c 0a 09 09  rs for KitDLL...
27f0: 09 09 28 0a 09 09 09 09 09 65 63 68 6f 20 22 22  ..(......echo ""
2800: 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09  ......echo ""...
2810: 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09 09 09  ...echo ""......
2820: 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64  echo " *** Build
2830: 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65 73 74 20  ing KitDLL test 
2840: 64 72 69 76 65 72 20 28 74 63 6c 73 68 29 22 0a  driver (tclsh)".
2850: 09 09 09 09 09 65 63 68 6f 20 22 22 0a 0a 09 09  .....echo ""....
2860: 09 09 09 63 64 20 6b 69 74 73 68 2f 62 75 69 6c  ...cd kitsh/buil
2870: 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20 65 78  d/kitsh-*/ || ex
2880: 69 74 20 31 0a 09 09 09 09 09 6d 61 6b 65 20 74  it 1......make t
2890: 63 6c 73 68 0a 09 09 09 09 09 63 70 20 74 63 6c  clsh......cp tcl
28a0: 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09 09 09  sh ../../../....
28b0: 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  .) >> "${buildlo
28c0: 67 7d 22 20 32 3e 26 31 0a 09 09 09 66 69 0a 0a  g}" 2>&1....fi..
28d0: 09 09 09 23 20 50 65 72 66 6f 72 6d 20 77 69 6c  ...# Perform wil
28e0: 64 63 61 72 64 20 65 78 70 61 6e 73 69 6f 6e 0a  dcard expansion.
28f0: 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22 24  ...createdkit="$
2900: 28 6c 73 20 2d 66 31 20 24 7b 63 72 65 61 74 65  (ls -f1 ${create
2910: 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f 6e 75 6c  dkit} 2>/dev/nul
2920: 6c 20 7c 20 67 72 65 70 20 2d 76 20 27 5c 2e 74  l | grep -v '\.t
2930: 61 72 5c 2e 67 7a 24 27 20 7c 20 68 65 61 64 20  ar\.gz$' | head 
2940: 2d 6e 20 31 29 22 0a 0a 09 09 09 69 66 20 5b 20  -n 1)".....if [ 
2950: 21 20 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b  ! -f "${createdk
2960: 69 74 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  it}" ]; then....
2970: 09 65 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f  .echo "Failed to
2980: 20 63 72 65 61 74 65 20 6b 69 74 20 24 7b 76 65   create kit ${ve
2990: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e  rsion}/${kit}" >
29a0: 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22  &2......failed="
29b0: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
29c0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c  ion}/${kit}-buil
29d0: 64 22 0a 0a 09 09 09 09 74 6f 75 63 68 20 22 24  d"......touch "$
29e0: 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d  {failoutputname}
29f0: 22 0a 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c  ".....mv "${buil
2a00: 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75  dlog}" "${failbu
2a10: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d  ildlog}"......rm
2a20: 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63   -f tclsh......c
2a30: 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09  ontinue....fi...
2a40: 09 09 23 20 56 65 72 69 66 79 20 73 61 6e 69 74  ..# Verify sanit
2a50: 79 20 6f 66 20 63 72 65 61 74 65 64 20 6b 69 74  y of created kit
2a60: 0a 09 09 09 69 73 73 61 6e 65 3d 31 0a 0a 09 09  ....issane=1....
2a70: 09 23 23 20 56 65 72 69 66 79 20 74 68 61 74 20  .## Verify that 
2a80: 57 69 6e 33 32 20 62 75 69 6c 64 73 20 61 72 65  Win32 builds are
2a90: 20 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70 65   of correct type
2aa0: 0a 09 09 09 23 23 20 56 65 72 69 66 79 20 74 68  ....## Verify th
2ab0: 61 74 20 44 4c 4c 20 62 75 69 6c 64 73 20 61 72  at DLL builds ar
2ac0: 65 20 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70  e of correct typ
2ad0: 65 0a 09 09 09 63 61 73 65 20 22 2d 24 7b 76 65  e....case "-${ve
2ae0: 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20  rsion}-${kit}-" 
2af0: 69 6e 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6b  in.....*-win32-k
2b00: 69 74 64 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d  itdll-*|*-win32-
2b10: 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09  *-kitdll-*).....
2b20: 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72  .if ! file "${cr
2b30: 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65  eatedkit}" | gre
2b40: 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 20 28 44  p 'MS Windows (D
2b50: 4c 4c 29 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b  LL)' >/dev/null;
2b60: 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73 73 61   then.......issa
2b70: 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09  ne=0......fi....
2b80: 09 09 3b 3b 0a 09 09 09 09 2a 2d 6b 69 74 64 6c  ..;;.....*-kitdl
2b90: 6c 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66  l-*)......if ! f
2ba0: 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69  ile "${createdki
2bb0: 74 7d 22 20 7c 20 67 72 65 70 20 27 73 68 61 72  t}" | grep 'shar
2bc0: 65 64 20 6f 62 6a 65 63 74 27 20 3e 2f 64 65 76  ed object' >/dev
2bd0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2be0: 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 09 09  ..issane=0......
2bf0: 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a  fi......;;.....*
2c00: 2d 77 69 6e 33 32 2d 6e 6f 74 6b 2d 2a 7c 2a 2d  -win32-notk-*|*-
2c10: 77 69 6e 33 32 2d 2a 2d 6e 6f 74 6b 2d 2a 29 0a  win32-*-notk-*).
2c20: 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22  .....if ! file "
2c30: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c  ${createdkit}" |
2c40: 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77   grep 'MS Window
2c50: 73 20 28 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64  s (console)' >/d
2c60: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2c70: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
2c80: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
2c90: 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20 63 6f  k for being a co
2ca0: 6e 73 6f 6c 65 20 61 70 70 6c 69 63 61 74 69 6f  nsole applicatio
2cb0: 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73  n" >&2.......iss
2cc0: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
2cd0: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33  ...;;.....*-win3
2ce0: 32 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66  2-*)......if ! f
2cf0: 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69  ile "${createdki
2d00: 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57  t}" | grep 'MS W
2d10: 69 6e 64 6f 77 73 20 28 47 55 49 29 27 20 3e 2f  indows (GUI)' >/
2d20: 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09  dev/null; then..
2d30: 09 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66  .....echo "Kit f
2d40: 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65  ailed sanity che
2d50: 63 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20 47  ck for being a G
2d60: 55 49 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20  UI application" 
2d70: 3e 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65  >&2.......issane
2d80: 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09  =0......fi......
2d90: 3b 3b 0a 09 09 09 65 73 61 63 0a 0a 09 09 09 23  ;;....esac.....#
2da0: 23 20 56 65 72 69 66 79 20 74 68 65 20 62 75 69  # Verify the bui
2db0: 6c 64 20 63 6f 6d 70 6c 65 74 65 64 20 77 69 74  ld completed wit
2dc0: 68 6f 75 74 20 77 61 72 6e 69 6e 67 73 0a 09 09  hout warnings...
2dd0: 09 69 66 20 5b 20 22 24 7b 62 75 69 6c 64 66 61  .if [ "${buildfa
2de0: 69 6c 65 64 7d 22 20 3d 20 22 31 22 20 5d 3b 20  iled}" = "1" ]; 
2df0: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b  then.....echo "K
2e00: 69 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79  it failed sanity
2e10: 20 63 68 65 63 6b 20 66 6f 72 20 42 75 69 6c 64   check for Build
2e20: 69 6e 67 22 20 3e 26 32 0a 0a 09 09 09 09 69 73  ing" >&2......is
2e30: 73 61 6e 65 3d 30 0a 09 09 09 66 69 0a 0a 09 09  sane=0....fi....
2e40: 09 23 20 4d 61 6b 65 20 6e 6f 74 65 20 6f 66 20  .# Make note of 
2e50: 73 61 6e 69 74 79 20 66 61 69 6c 75 72 65 0a 09  sanity failure..
2e60: 09 09 69 66 20 5b 20 22 24 7b 69 73 73 61 6e 65  ..if [ "${issane
2e70: 7d 22 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65  }" != "1" ]; the
2e80: 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20  n.....echo "Kit 
2e90: 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 24 7b  failed sanity ${
2ea0: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22  version}/${kit}"
2eb0: 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64   >&2......failed
2ec0: 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65  ="${failed} ${ve
2ed0: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61  rsion}/${kit}-sa
2ee0: 6e 69 74 79 22 0a 0a 09 09 09 09 6d 76 20 22 24  nity"......mv "$
2ef0: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24  {createdkit}" "$
2f00: 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d  {failoutputname}
2f10: 22 0a 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c  ".....mv "${buil
2f20: 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75  dlog}" "${failbu
2f30: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d  ildlog}"......rm
2f40: 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63   -f tclsh......c
2f50: 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09  ontinue....fi...
2f60: 09 09 23 20 52 65 6e 61 6d 65 20 63 72 65 61 74  ..# Rename creat
2f70: 65 64 20 6b 69 74 20 74 6f 20 66 69 6e 61 6c 20  ed kit to final 
2f80: 64 65 73 74 69 6e 61 74 69 6f 6e 0a 09 09 09 6d  destination....m
2f90: 76 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  v "${createdkit}
2fa0: 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  " "${outputname}
2fb0: 22 0a 09 09 09 69 66 20 5b 20 2d 66 20 22 74 63  "....if [ -f "tc
2fc0: 6c 73 68 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  lsh" ]; then....
2fd0: 09 6d 76 20 22 74 63 6c 73 68 22 20 22 24 7b 6f  .mv "tclsh" "${o
2fe0: 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63 6c 73 68  utputname}-tclsh
2ff0: 22 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 46 6f  "....fi.....# Fo
3000: 72 20 4b 69 74 44 4c 4c 2c 20 6d 61 6b 65 20 61  r KitDLL, make a
3010: 20 6e 6f 74 65 20 6f 66 20 74 68 65 20 6f 72 69   note of the ori
3020: 67 69 6e 61 6c 20 6e 61 6d 65 0a 09 09 09 69 66  ginal name....if
3030: 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d   [ "${kitdll}" =
3040: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
3050: 09 65 63 68 6f 20 22 24 7b 63 72 65 61 74 65 64  .echo "${created
3060: 6b 69 74 7d 22 20 3e 20 22 24 7b 6f 75 74 70 75  kit}" > "${outpu
3070: 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22  tname}-origname"
3080: 0a 0a 09 09 09 09 69 66 20 5b 20 2d 66 20 22 24  ......if [ -f "$
3090: 7b 73 64 6b 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  {sdk}" ]; then..
30a0: 09 09 09 09 6d 76 20 22 24 7b 73 64 6b 7d 22 20  ....mv "${sdk}" 
30b0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 73  "${outputname}-s
30c0: 64 6b 2e 74 61 72 2e 67 7a 22 0a 09 09 09 09 66  dk.tar.gz".....f
30d0: 69 0a 09 09 09 66 69 0a 09 09 66 69 0a 0a 09 09  i....fi...fi....
30e0: 23 20 54 65 73 74 20 7a 69 70 20 73 74 61 74 75  # Test zip statu
30f0: 73 0a 09 09 69 66 20 75 6e 7a 69 70 20 2d 6c 20  s...if unzip -l 
3100: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20  "${outputname}" 
3110: 32 3e 26 31 20 7c 20 67 72 65 70 20 27 62 6f 6f  2>&1 | grep 'boo
3120: 74 5c 2e 74 63 6c 27 20 3e 2f 64 65 76 2f 6e 75  t\.tcl' >/dev/nu
3130: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 63 61 6e 75  ll; then....canu
3140: 6e 7a 69 70 3d 22 31 22 0a 09 09 65 6c 73 65 0a  nzip="1"...else.
3150: 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22 30 22 0a  ...canunzip="0".
3160: 09 09 66 69 0a 0a 09 09 69 66 20 5b 20 22 24 7b  ..fi....if [ "${
3170: 69 73 7a 69 70 7d 22 20 21 3d 20 22 24 7b 63 61  iszip}" != "${ca
3180: 6e 75 6e 7a 69 70 7d 22 20 5d 3b 20 74 68 65 6e  nunzip}" ]; then
3190: 0a 09 09 09 65 63 68 6f 20 22 46 61 69 6c 65 64  ....echo "Failed
31a0: 20 74 6f 20 75 6e 7a 69 70 20 7a 69 70 6b 69 74   to unzip zipkit
31b0: 20 6f 72 20 77 61 73 20 61 62 6c 65 20 74 6f 20   or was able to 
31c0: 75 6e 7a 69 70 20 6e 6f 6e 2d 7a 69 70 6b 69 74  unzip non-zipkit
31d0: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
31e0: 74 7d 22 20 3e 26 32 0a 0a 09 09 09 66 61 69 6c  t}" >&2.....fail
31f0: 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b  ed="${failed} ${
3200: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d  version}/${kit}-
3210: 7a 69 70 22 0a 0a 09 09 09 63 6f 6e 74 69 6e 75  zip".....continu
3220: 65 0a 09 09 66 69 0a 0a 09 09 23 20 44 6f 20 6e  e...fi....# Do n
3230: 6f 74 20 63 6f 6e 74 69 6e 75 65 20 70 61 73 74  ot continue past
3240: 20 68 65 72 65 20 66 6f 72 20 75 6e 2d 72 75 6e   here for un-run
3250: 6e 61 62 6c 65 20 6b 69 74 73 0a 09 09 69 66 20  nable kits...if 
3260: 5b 20 22 24 7b 72 75 6e 6e 61 62 6c 65 7d 22 20  [ "${runnable}" 
3270: 21 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09  != "1" ]; then..
3280: 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66 69 0a  ..continue...fi.
3290: 0a 09 09 23 20 49 66 20 74 68 65 20 6e 61 6d 65  ...# If the name
32a0: 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c   of the original
32b0: 20 62 75 69 6c 64 20 6d 61 74 74 65 72 73 2c 20   build matters, 
32c0: 73 79 6d 6c 69 6e 6b 20 69 74 20 75 70 0a 09 09  symlink it up...
32d0: 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75  if [ -f "${outpu
32e0: 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22  tname}-origname"
32f0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61   ]; then....crea
3300: 74 65 64 6b 69 74 3d 22 24 28 63 61 74 20 22 24  tedkit="$(cat "$
3310: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69  {outputname}-ori
3320: 67 6e 61 6d 65 22 29 22 0a 0a 09 09 09 6c 6e 20  gname")".....ln 
3330: 2d 73 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -s "${outputname
3340: 7d 22 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  }" "${createdkit
3350: 7d 22 0a 09 09 66 69 0a 0a 09 09 23 20 50 65 72  }"...fi....# Per
3360: 66 6f 72 6d 20 62 61 74 74 65 72 79 20 6f 66 20  form battery of 
3370: 74 65 73 74 73 0a 09 09 23 23 20 43 6c 65 61 6e  tests...## Clean
3380: 20 74 65 73 74 73 20 6c 6f 67 0a 09 09 72 6d 20   tests log...rm 
3390: 2d 66 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74  -f "${testresult
33a0: 73 6c 6f 67 7d 22 0a 09 09 66 6f 72 20 74 65 73  slog}"...for tes
33b0: 74 73 63 70 20 69 6e 20 22 24 7b 54 45 53 54 44  tscp in "${TESTD
33c0: 49 52 7d 22 2f 74 65 73 74 73 2f 2a 2e 74 63 6c  IR}"/tests/*.tcl
33d0: 3b 20 64 6f 0a 09 09 09 74 65 73 74 73 63 70 5f  ; do....testscp_
33e0: 74 61 67 3d 22 24 28 62 61 73 65 6e 61 6d 65 20  tag="$(basename 
33f0: 22 24 7b 74 65 73 74 73 63 70 7d 22 20 2e 74 63  "${testscp}" .tc
3400: 6c 29 22 0a 09 09 09 74 65 73 74 73 63 70 70 72  l)"....testscppr
3410: 65 3d 22 24 28 64 69 72 6e 61 6d 65 20 22 24 7b  e="$(dirname "${
3420: 74 65 73 74 73 63 70 7d 22 29 2f 24 7b 74 65 73  testscp}")/${tes
3430: 74 73 63 70 5f 74 61 67 7d 2e 73 68 22 0a 09 09  tscp_tag}.sh"...
3440: 09 73 63 70 6c 6f 67 66 69 6c 65 3d 22 24 7b 6f  .scplogfile="${o
3450: 75 74 70 75 74 6e 61 6d 65 7d 2d 24 7b 74 65 73  utputname}-${tes
3460: 74 73 63 70 5f 74 61 67 7d 2e 6c 6f 67 22 0a 0a  tscp_tag}.log"..
3470: 09 09 09 23 20 49 66 20 61 20 63 6f 6d 6d 61 6e  ...# If a comman
3480: 64 20 69 73 20 72 65 71 75 69 72 65 64 20 74 6f  d is required to
3490: 20 73 74 61 72 74 20 74 68 65 20 6b 69 74 2c 20   start the kit, 
34a0: 70 72 65 70 61 72 65 20 74 6f 20 6b 69 6c 6c 20  prepare to kill 
34b0: 69 74 0a 09 09 09 23 20 69 6e 20 63 61 73 65 20  it....# in case 
34c0: 6f 66 20 74 69 6d 65 6f 75 74 2e 0a 09 09 09 23  of timeout.....#
34d0: 23 20 54 65 6d 70 6f 72 61 72 69 6c 79 20 64 69  # Temporarily di
34e0: 73 61 62 6c 65 64 20 73 69 6e 63 65 20 63 75 72  sabled since cur
34f0: 72 65 6e 74 6c 79 20 69 74 20 69 73 20 63 61 75  rently it is cau
3500: 73 69 6e 67 0a 09 09 09 23 23 20 6d 6f 72 65 20  sing....## more 
3510: 70 72 6f 62 6c 65 6d 73 20 69 6e 20 74 68 65 20  problems in the 
3520: 66 6f 72 6d 20 6f 66 20 74 65 73 74 73 20 62 65  form of tests be
3530: 69 6e 67 20 6b 69 6c 6c 65 64 0a 09 09 09 23 23  ing killed....##
3540: 20 70 72 65 6d 61 74 75 72 65 6c 79 20 74 68 61   prematurely tha
3550: 6e 20 77 65 20 61 72 65 20 68 61 76 69 6e 67 20  n we are having 
3560: 69 73 73 75 65 73 20 77 69 74 68 20 74 65 73 74  issues with test
3570: 73 0a 09 09 09 23 23 20 68 61 6e 67 69 6e 67 0a  s....## hanging.
3580: 09 09 09 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64  ...kitrunkillpid
3590: 3d 22 22 0a 09 09 09 69 66 20 5b 20 22 31 22 20  =""....if [ "1" 
35a0: 3d 20 22 30 22 20 2d 61 20 2d 6e 20 22 24 7b 6b  = "0" -a -n "${k
35b0: 69 74 72 75 6e 63 6d 64 7d 22 20 5d 3b 20 74 68  itruncmd}" ]; th
35c0: 65 6e 0a 09 09 09 09 28 0a 09 09 09 09 09 73 6c  en.....(......sl
35d0: 65 65 70 20 31 32 30 0a 09 09 09 09 09 6b 69 6c  eep 120......kil
35e0: 6c 61 6c 6c 20 22 24 28 62 61 73 65 6e 61 6d 65  lall "$(basename
35f0: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3600: 29 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  )" >/dev/null 2>
3610: 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 09 29 20  /dev/null.....) 
3620: 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65  >/dev/null 2>/de
3630: 76 2f 6e 75 6c 6c 20 26 0a 09 09 09 09 6b 69 74  v/null &.....kit
3640: 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 24 21 22 0a  runkillpid="$!".
3650: 09 09 09 66 69 0a 0a 09 09 09 28 0a 09 09 09 09  ...fi.....(.....
3660: 69 66 20 5b 20 2d 66 20 22 24 7b 74 65 73 74 73  if [ -f "${tests
3670: 63 70 70 72 65 7d 22 20 5d 3b 20 74 68 65 6e 0a  cppre}" ]; then.
3680: 09 09 09 09 09 2e 20 22 24 7b 74 65 73 74 73 63  ...... "${testsc
3690: 70 70 72 65 7d 22 0a 09 09 09 09 66 69 0a 0a 09  ppre}".....fi...
36a0: 09 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c  ...if [ "${kitdl
36b0: 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  l}" = "1" ]; the
36c0: 6e 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63  n......${kitrunc
36d0: 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  md} "${outputnam
36e0: 65 7d 2d 74 63 6c 73 68 22 20 22 24 7b 74 65 73  e}-tclsh" "${tes
36f0: 74 73 63 70 7d 22 20 22 24 7b 6f 75 74 70 75 74  tscp}" "${output
3700: 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20  name}" "${kit}" 
3710: 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09  "${version}"....
3720: 09 65 6c 73 65 0a 09 09 09 09 09 24 7b 6b 69 74  .else......${kit
3730: 72 75 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75  runcmd} "${outpu
3740: 74 6e 61 6d 65 7d 22 20 22 24 7b 74 65 73 74 73  tname}" "${tests
3750: 63 70 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61  cp}" "${outputna
3760: 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24  me}" "${kit}" "$
3770: 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 66  {version}".....f
3780: 69 0a 09 09 09 29 20 3e 20 22 24 7b 73 63 70 6c  i....) > "${scpl
3790: 6f 67 66 69 6c 65 7d 22 20 32 3e 26 31 0a 0a 09  ogfile}" 2>&1...
37a0: 09 09 69 66 20 5b 20 22 24 3f 22 20 21 3d 20 22  ..if [ "$?" != "
37b0: 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  0" ]; then.....e
37c0: 63 68 6f 20 22 53 63 72 69 70 74 20 66 61 69 6c  cho "Script fail
37d0: 65 64 3a 20 24 7b 74 65 73 74 73 63 70 5f 74 61  ed: ${testscp_ta
37e0: 67 7d 20 6f 6e 20 24 7b 76 65 72 73 69 6f 6e 7d  g} on ${version}
37f0: 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09  /${kit}" >&2....
3800: 09 09 66 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c  ..failed="${fail
3810: 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  ed} ${version}/$
3820: 7b 6b 69 74 7d 2d 74 65 73 74 2d 24 7b 74 65 73  {kit}-test-${tes
3830: 74 73 63 70 5f 74 61 67 7d 22 0a 0a 09 09 09 09  tscp_tag}"......
3840: 65 63 68 6f 20 22 24 7b 74 65 73 74 73 63 70 5f  echo "${testscp_
3850: 74 61 67 7d 3a 20 46 41 49 4c 22 20 3e 3e 20 20  tag}: FAIL" >>  
3860: 22 24 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f  "${testresultslo
3870: 67 7d 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75  g}"......continu
3880: 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4b 69  e....fi.....# Ki
3890: 6c 6c 20 74 68 65 20 77 61 74 63 68 64 6f 67 20  ll the watchdog 
38a0: 66 6f 72 20 74 68 69 73 20 69 74 65 72 61 74 69  for this iterati
38b0: 6f 6e 0a 09 09 09 69 66 20 5b 20 2d 6e 20 22 24  on....if [ -n "$
38c0: 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 7d 22  {kitrunkillpid}"
38d0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6b 69 6c   ]; then.....kil
38e0: 6c 20 2d 39 20 22 24 7b 6b 69 74 72 75 6e 6b 69  l -9 "${kitrunki
38f0: 6c 6c 70 69 64 7d 22 20 3e 2f 64 65 76 2f 6e 75  llpid}" >/dev/nu
3900: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09  ll 2>/dev/null..
3910: 09 09 66 69 0a 0a 09 09 09 65 63 68 6f 20 22 24  ..fi.....echo "$
3920: 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a 20 50  {testscp_tag}: P
3930: 41 53 53 22 20 3e 3e 20 20 22 24 7b 74 65 73 74  ASS" >>  "${test
3940: 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09  resultslog}"....
3950: 09 72 6d 20 2d 66 20 22 24 7b 73 63 70 6c 6f 67  .rm -f "${scplog
3960: 66 69 6c 65 7d 22 0a 09 09 64 6f 6e 65 0a 0a 09  file}"...done...
3970: 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70  .if [ -f "${outp
3980: 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65  utname}-origname
3990: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 72 6d 20  " ]; then....rm 
39a0: 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  -f "${createdkit
39b0: 7d 22 0a 09 09 66 69 0a 09 64 6f 6e 65 0a 64 6f  }"...fi..done.do
39c0: 6e 65 0a 0a 69 66 20 5b 20 2d 6e 20 22 24 7b 66  ne..if [ -n "${f
39d0: 61 69 6c 65 64 7d 22 20 5d 3b 20 74 68 65 6e 0a  ailed}" ]; then.
39e0: 09 65 63 68 6f 20 22 46 61 69 6c 65 64 3a 20 24  .echo "Failed: $
39f0: 7b 66 61 69 6c 65 64 7d 22 0a 66 69 0a 0a 23 20  {failed}".fi..# 
3a00: 43 6c 65 61 6e 75 70 0a 23 23 20 54 65 72 6d 69  Cleanup.## Termi
3a10: 6e 61 74 65 20 58 76 66 62 0a 6b 69 6c 6c 20 2d  nate Xvfb.kill -
3a20: 39 20 22 24 7b 58 56 46 42 5f 50 49 44 7d 22 0a  9 "${XVFB_PID}".
3a30: 0a 23 23 20 52 65 6d 6f 76 65 20 77 69 6e 65 0a  .## Remove wine.
3a40: 72 6d 20 2d 72 66 20 22 24 7b 57 49 4e 45 50 52  rm -rf "${WINEPR
3a50: 45 46 49 58 7d 22 0a 0a 2e 2f 6b 69 74 63 72 65  EFIX}".../kitcre
3a60: 61 74 6f 72 20 63 6c 65 61 6e 0a 72 6d 20 2d 66  ator clean.rm -f
3a70: 20 74 63 6c 73 68 0a                              tclsh.