Hex Artifact Content

Artifact 45ea83463c49a4bf8bb1a94f8f1bea79ebe51e0e:


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 69 33 38 36 2c 73 6f 6c 61 72 69  inux-i386,solari
0650: 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d 61  s-i386,solaris-a
0660: 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70 61  md64,solaris-spa
0670: 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  rc,solaris-sparc
0680: 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64,freebsd-amd64
0690: 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b 2c  ,netbsd-amd64}{,
06a0: 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74  -zip,-nomk4}{,-t
06b0: 68 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69  hreaded}{,-stati
06c0: 63 74 6b 2c 2d 6e 6f 74 6b 7d 7b 2c 64 65 62 75  ctk,-notk}{,debu
06d0: 67 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38 36  g} {solaris-i386
06e0: 2c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c 73  ,solaris-amd64,s
06f0: 6f 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f 6c  olaris-sparc,sol
0700: 61 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72 65  aris-sparc64,fre
0710: 65 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62 73  ebsd-amd64,netbs
0720: 64 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65 61  d-amd64}{,-threa
0730: 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e  ded}{,-notk}{,-n
0740: 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d 6b 69  omk4}{,debug}-ki
0750: 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36  tdll netbsd-i386
0760: 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c  {,-zip,-nomk4}{,
0770: 2d 74 68 72 65 61 64 65 64 7d 7b 2c 64 65 62 75  -threaded}{,debu
0780: 67 7d 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d 69  g}-notk netbsd-i
0790: 33 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b  386{,-threaded}{
07a0: 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d  ,-nomk4}{,debug}
07b0: 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61 6e 64  -notk-kitdll and
07c0: 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 7b 2c 2d  roid-arm-notk{,-
07d0: 64 65 62 75 67 7d 20 61 6e 64 6f 69 64 2d 61 72  debug} andoid-ar
07e0: 6d 2d 6e 6f 74 6b 7b 2c 2d 64 65 62 75 67 7d 2d  m-notk{,-debug}-
07f0: 6b 69 74 64 6c 6c 29 22 0a 65 6c 73 65 0a 09 6b  kitdll)".else..k
0800: 69 74 73 3d 22 6e 6f 72 6d 61 6c 20 6e 6f 72 6d  its="normal norm
0810: 61 6c 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 74 68  al-zip normal-th
0820: 72 65 61 64 65 64 20 6e 6f 72 6d 61 6c 2d 74 68  readed normal-th
0830: 72 65 61 64 65 64 2d 7a 69 70 20 6e 6f 72 6d 61  readed-zip norma
0840: 6c 2d 73 74 61 74 69 63 74 6b 20 6e 6f 72 6d 61  l-statictk norma
0850: 6c 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68  l-notk normal-th
0860: 72 65 61 64 65 64 2d 6e 6f 74 6b 20 6e 6f 72 6d  readed-notk norm
0870: 61 6c 2d 74 68 72 65 61 64 65 64 2d 7a 69 70 2d  al-threaded-zip-
0880: 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b  notk normal-nomk
0890: 34 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 20 6d  4 normal-debug m
08a0: 69 6e 20 6d 69 6e 2d 73 74 61 74 69 63 20 6e 6f  in min-static no
08b0: 72 6d 61 6c 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d  rmal-kitdll norm
08c0: 61 6c 2d 74 68 72 65 61 64 65 64 2d 6b 69 74 64  al-threaded-kitd
08d0: 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d 6b  ll normal-notk-k
08e0: 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d  itdll normal-nom
08f0: 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c  k4-kitdll normal
0900: 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64  -nomk4-notk-kitd
0910: 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ll normal-thread
0920: 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20  ed-nomk4-kitdll 
0930: 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d  normal-threaded-
0940: 6e 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c  notk-nomk4-kitdl
0950: 6c 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 2d 6b  l normal-debug-k
0960: 69 74 64 6c 6c 20 6d 69 6e 2d 6b 69 74 64 6c 6c  itdll min-kitdll
0970: 20 77 69 6e 33 32 2d 69 35 38 36 20 77 69 6e 33   win32-i586 win3
0980: 32 2d 69 35 38 36 2d 7a 69 70 20 77 69 6e 33 32  2-i586-zip win32
0990: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 20 77  -i586-threaded w
09a0: 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61 64  in32-i586-thread
09b0: 65 64 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35 38  ed-zip win32-i58
09c0: 36 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69 35 38  6-notk win32-i58
09d0: 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b 20  6-threaded-notk 
09e0: 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34  win32-i586-nomk4
09f0: 20 77 69 6e 33 32 2d 69 35 38 36 2d 6b 69 74 64   win32-i586-kitd
0a00: 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68  ll win32-i586-th
0a10: 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 77 69  readed-kitdll wi
0a20: 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 2d 6b 69  n32-i586-notk-ki
0a30: 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d  tdll win32-i586-
0a40: 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e  nomk4-kitdll win
0a50: 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6e 6f  32-i586-nomk4-no
0a60: 74 6b 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  tk-kitdll win32-
0a70: 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f  i586-threaded-no
0a80: 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32  mk4-kitdll win32
0a90: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e  -i586-threaded-n
0aa0: 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c  otk-nomk4-kitdll
0ab0: 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69   linux-mipsel-mi
0ac0: 6e 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d  n linux-mipsel-m
0ad0: 69 6e 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d  in-kitdll linux-
0ae0: 69 33 38 36 20 6c 69 6e 75 78 2d 69 33 38 36 2d  i386 linux-i386-
0af0: 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38 36  debug linux-i386
0b00: 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69 33  -kitdll linux-i3
0b10: 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20  86-debug-kitdll 
0b20: 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 20  linux-i386-notk 
0b30: 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d  linux-i386-notk-
0b40: 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38 36  debug linux-i386
0b50: 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e  -notk-kitdll lin
0b60: 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62  ux-i386-notk-deb
0b70: 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  ug-kitdll solari
0b80: 73 2d 69 33 38 36 20 73 6f 6c 61 72 69 73 2d 69  s-i386 solaris-i
0b90: 33 38 36 2d 64 65 62 75 67 20 73 6f 6c 61 72 69  386-debug solari
0ba0: 73 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73 6f  s-i386-kitdll so
0bb0: 6c 61 72 69 73 2d 69 33 38 36 2d 64 65 62 75 67  laris-i386-debug
0bc0: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0bd0: 61 6d 64 36 34 20 73 6f 6c 61 72 69 73 2d 61 6d  amd64 solaris-am
0be0: 64 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72 69  d64-debug solari
0bf0: 73 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 73  s-amd64-kitdll s
0c00: 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65 62  olaris-amd64-deb
0c10: 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  ug-kitdll solari
0c20: 73 2d 73 70 61 72 63 20 73 6f 6c 61 72 69 73 2d  s-sparc solaris-
0c30: 73 70 61 72 63 2d 64 65 62 75 67 20 73 6f 6c 61  sparc-debug sola
0c40: 72 69 73 2d 73 70 61 72 63 2d 6b 69 74 64 6c 6c  ris-sparc-kitdll
0c50: 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 64   solaris-sparc-d
0c60: 65 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61  ebug-kitdll sola
0c70: 72 69 73 2d 73 70 61 72 63 36 34 20 73 6f 6c 61  ris-sparc64 sola
0c80: 72 69 73 2d 73 70 61 72 63 36 34 2d 64 65 62 75  ris-sparc64-debu
0c90: 67 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36  g solaris-sparc6
0ca0: 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  4-kitdll solaris
0cb0: 2d 73 70 61 72 63 36 34 2d 64 65 62 75 67 2d 6b  -sparc64-debug-k
0cc0: 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61 6d  itdll freebsd-am
0cd0: 64 36 34 20 66 72 65 65 62 73 64 2d 61 6d 64 36  d64 freebsd-amd6
0ce0: 34 2d 64 65 62 75 67 20 66 72 65 65 62 73 64 2d  4-debug freebsd-
0cf0: 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 66 72 65  amd64-kitdll fre
0d00: 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67  ebsd-amd64-debug
0d10: 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69  -kitdll netbsd-i
0d20: 33 38 36 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d  386-notk netbsd-
0d30: 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 20  i386-notk-debug 
0d40: 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74 6b  netbsd-i386-notk
0d50: 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69  -kitdll netbsd-i
0d60: 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b  386-notk-debug-k
0d70: 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64  itdll netbsd-amd
0d80: 36 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d  64 netbsd-amd64-
0d90: 64 65 62 75 67 20 6e 65 74 62 73 64 2d 61 6d 64  debug netbsd-amd
0da0: 36 34 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64  64-kitdll netbsd
0db0: 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74  -amd64-debug-kit
0dc0: 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d 2d  dll android-arm-
0dd0: 6e 6f 74 6b 20 61 6e 64 72 6f 69 64 2d 61 72 6d  notk android-arm
0de0: 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 61 6e 64 72  -notk-debug andr
0df0: 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 6b 69 74  oid-arm-notk-kit
0e00: 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d 2d  dll android-arm-
0e10: 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c  notk-debug-kitdl
0e20: 6c 22 0a 66 69 0a 0a 66 61 69 6c 65 64 3d 22 22  l".fi..failed=""
0e30: 0a 66 6f 72 20 6b 69 74 20 69 6e 20 24 6b 69 74  .for kit in $kit
0e40: 73 3b 20 64 6f 0a 09 6b 69 74 63 72 65 61 74 6f  s; do..kitcreato
0e50: 72 3d 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72 22  r="./kitcreator"
0e60: 0a 09 61 72 67 73 3d 22 22 0a 09 72 75 6e 6e 61  ..args=""..runna
0e70: 62 6c 65 3d 22 31 22 0a 09 69 73 7a 69 70 3d 22  ble="1"..iszip="
0e80: 30 22 0a 09 73 74 61 74 69 63 74 6b 3d 22 30 22  0"..statictk="0"
0e90: 0a 09 6e 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d 6b  ..notk="0"..nomk
0ea0: 34 3d 22 30 22 0a 09 78 63 6f 6d 70 69 6c 65 3d  4="0"..xcompile=
0eb0: 22 30 22 0a 09 6b 69 74 64 6c 6c 3d 22 30 22 0a  "0"..kitdll="0".
0ec0: 09 6b 69 74 72 75 6e 63 6d 64 3d 22 22 0a 0a 09  .kitruncmd=""...
0ed0: 23 20 48 61 6e 64 6c 65 20 62 61 73 65 20 63 6f  # Handle base co
0ee0: 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09 6f 73 3d  nfiguration..os=
0ef0: 22 24 28 75 6e 61 6d 65 20 2d 73 20 7c 20 64 64  "$(uname -s | dd
0f00: 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64   conv=lcase 2>/d
0f10: 65 76 2f 6e 75 6c 6c 29 22 0a 09 63 70 75 3d 22  ev/null)"..cpu="
0f20: 24 28 75 6e 61 6d 65 20 2d 6d 20 7c 20 64 64 20  $(uname -m | dd 
0f30: 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65  conv=lcase 2>/de
0f40: 76 2f 6e 75 6c 6c 20 7c 20 73 65 64 20 27 73 40  v/null | sed 's@
0f50: 78 38 36 5f 36 34 40 61 6d 64 36 34 40 3b 73 40  x86_64@amd64@;s@
0f60: 69 2e 38 36 40 69 33 38 36 40 27 29 22 0a 09 63  i.86@i386@')"..c
0f70: 61 73 65 20 22 24 7b 6b 69 74 7d 22 20 69 6e 0a  ase "${kit}" in.
0f80: 09 09 6e 6f 72 6d 61 6c 7c 6e 6f 72 6d 61 6c 2d  ..normal|normal-
0f90: 2a 29 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68  *)....kit="$(ech
0fa0: 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64  o "${kit}" | sed
0fb0: 20 22 73 40 5e 6e 6f 72 6d 61 6c 40 24 6f 73 2d   "s@^normal@$os-
0fc0: 24 63 70 75 40 22 29 22 0a 09 09 09 3b 3b 0a 09  $cpu@")"....;;..
0fd0: 09 6d 69 6e 7c 6d 69 6e 2d 6b 69 74 64 6c 6c 29  .min|min-kitdll)
0fe0: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
0ff0: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e  ./build/make-min
1000: 6b 69 74 22 0a 09 09 09 69 73 7a 69 70 3d 22 31  kit"....iszip="1
1010: 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09  "....notk="1"...
1020: 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  .kit="$(echo "${
1030: 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40 5e  kit}" | sed "s@^
1040: 6d 69 6e 40 24 6f 73 2d 24 63 70 75 2d 6d 69 6e  min@$os-$cpu-min
1050: 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e  @")"....;;...min
1060: 2d 73 74 61 74 69 63 29 0a 09 09 09 6b 69 74 63  -static)....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 6d 69 6e 6b 69 74 2d 73 74 61 74  make-minkit-stat
1090: 69 63 22 0a 09 09 09 69 73 7a 69 70 3d 22 31 22  ic"....iszip="1"
10a0: 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
10b0: 6b 69 74 3d 22 24 7b 6f 73 7d 2d 24 7b 63 70 75  kit="${os}-${cpu
10c0: 7d 2d 6d 69 6e 2d 73 74 61 74 69 63 22 0a 09 09  }-min-static"...
10d0: 09 3b 3b 0a 09 09 77 69 6e 33 32 7c 77 69 6e 33  .;;...win32|win3
10e0: 32 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61 74  2-*)....kitcreat
10f0: 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  or="./build/make
1100: 2d 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09 78  -kit-win32"....x
1110: 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 6b  compile="1"....k
1120: 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22 0a  itruncmd="wine".
1130: 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 6d 69  ...;;...linux-mi
1140: 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e 75 78 2d 6d  psel-min|linux-m
1150: 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64 6c 6c  ipsel-min-kitdll
1160: 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d  )....kitcreator=
1170: 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69  "./build/make-ki
1180: 74 2d 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 22 0a  t-linux-mipsel".
1190: 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a  ...runnable="0".
11a0: 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a  ...xcompile="1".
11b0: 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 69  ...notk="1"....i
11c0: 73 7a 69 70 3d 22 31 22 0a 09 09 09 3b 3b 0a 09  szip="1"....;;..
11d0: 09 61 6e 64 72 6f 69 64 2d 61 72 6d 7c 61 6e 64  .android-arm|and
11e0: 72 6f 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09 09 6c  roid-arm-*|\...l
11f0: 69 6e 75 78 2d 69 33 38 36 7c 6c 69 6e 75 78 2d  inux-i386|linux-
1200: 69 33 38 36 2d 2a 7c 5c 0a 09 09 6c 69 6e 75 78  i386-*|\...linux
1210: 2d 61 6d 64 36 34 7c 6c 69 6e 75 78 2d 61 6d 64  -amd64|linux-amd
1220: 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  64-*|\...solaris
1230: 2d 69 33 38 36 7c 73 6f 6c 61 72 69 73 2d 69 33  -i386|solaris-i3
1240: 38 36 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  86-*|\...solaris
1250: 2d 61 6d 64 36 34 7c 73 6f 6c 61 72 69 73 2d 61  -amd64|solaris-a
1260: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  md64-*|\...solar
1270: 69 73 2d 73 70 61 72 63 7c 73 6f 6c 61 72 69 73  is-sparc|solaris
1280: 2d 73 70 61 72 63 2d 2a 7c 5c 0a 09 09 73 6f 6c  -sparc-*|\...sol
1290: 61 72 69 73 2d 73 70 61 72 63 36 34 7c 73 6f 6c  aris-sparc64|sol
12a0: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 2a 7c 5c  aris-sparc64-*|\
12b0: 0a 09 09 66 72 65 65 62 73 64 2d 61 6d 64 36 34  ...freebsd-amd64
12c0: 7c 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d 2a  |freebsd-amd64-*
12d0: 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 69 33 38 36  |\...netbsd-i386
12e0: 7c 6e 65 74 62 73 64 2d 69 33 38 36 2d 2a 7c 5c  |netbsd-i386-*|\
12f0: 0a 09 09 6e 65 74 62 73 64 2d 61 6d 64 36 34 7c  ...netbsd-amd64|
1300: 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c  netbsd-amd64-*|\
1310: 0a 09 09 68 70 75 78 2d 68 70 70 61 36 34 7c 68  ...hpux-hppa64|h
1320: 70 75 78 2d 68 70 70 61 36 34 2d 2a 29 0a 09 09  pux-hppa64-*)...
1330: 09 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65 63 68  .platform="$(ech
1340: 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 63 75 74  o "${kit}" | cut
1350: 20 2d 66 20 31 2d 32 20 2d 64 20 27 2d 27 29 22   -f 1-2 -d '-')"
1360: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
1370: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74  ./build/make-kit
1380: 2d 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 0a 09 09  -${platform}"...
1390: 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09  .runnable="0"...
13a0: 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09  .xcompile="1"...
13b0: 09 69 73 7a 69 70 3d 22 30 22 0a 0a 09 09 09 69  .iszip="0".....i
13c0: 66 20 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20  f echo "${kit}" 
13d0: 7c 20 65 67 72 65 70 20 2d 2d 20 27 2d 28 68 70  | egrep -- '-(hp
13e0: 70 61 36 34 7c 61 6d 64 36 34 7c 73 70 61 72 63  pa64|amd64|sparc
13f0: 36 34 29 2d 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  64)-' >/dev/null
1400: 3b 20 74 68 65 6e 0a 09 09 09 09 61 72 67 73 3d  ; then.....args=
1410: 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c  "${args} --enabl
1420: 65 2d 36 34 62 69 74 22 0a 09 09 09 66 69 0a 09  e-64bit"....fi..
1430: 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09 69 66 20  ..;;..esac...if 
1440: 5b 20 22 24 7b 78 63 6f 6d 70 69 6c 65 7d 22 20  [ "${xcompile}" 
1450: 21 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09  != "0" ]; then..
1460: 09 6b 69 74 3d 22 24 7b 6b 69 74 7d 2d 78 63 6f  .kit="${kit}-xco
1470: 6d 70 69 6c 65 22 0a 09 66 69 0a 0a 09 23 20 48  mpile"..fi...# H
1480: 61 6e 64 6c 65 20 61 64 64 69 74 69 6f 6e 61 6c  andle additional
1490: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09   configuration..
14a0: 74 65 6d 70 6b 69 74 3d 22 2d 24 7b 6b 69 74 7d  tempkit="-${kit}
14b0: 2d 22 0a 09 66 6f 72 20 74 72 79 20 69 6e 20 31  -"..for try in 1
14c0: 20 32 20 33 20 34 20 35 20 36 20 37 20 38 20 39   2 3 4 5 6 7 8 9
14d0: 3b 20 64 6f 0a 09 09 63 61 73 65 20 22 2d 24 7b  ; do...case "-${
14e0: 74 65 6d 70 6b 69 74 7d 2d 22 20 69 6e 0a 09 09  tempkit}-" in...
14f0: 09 2a 2d 74 68 72 65 61 64 65 64 2d 2a 29 0a 09  .*-threaded-*)..
1500: 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63  ...tempkit="$(ec
1510: 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20  ho "${tempkit}" 
1520: 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65 61 64  | sed 's@-thread
1530: 65 64 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72  ed-@-@')".....ar
1540: 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e  gs="${args} --en
1550: 61 62 6c 65 2d 74 68 72 65 61 64 73 22 0a 09 09  able-threads"...
1560: 09 09 3b 3b 0a 09 09 09 2a 2d 7a 69 70 2d 2a 29  ..;;....*-zip-*)
1570: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
1580: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
1590: 22 20 7c 20 73 65 64 20 27 73 40 2d 7a 69 70 2d  " | sed 's@-zip-
15a0: 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d  @-@')".....args=
15b0: 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c  "${args} --enabl
15c0: 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7a 69  e-kit-storage=zi
15d0: 70 22 0a 09 09 09 09 69 73 7a 69 70 3d 22 31 22  p".....iszip="1"
15e0: 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 73 74 61  .....;;....*-sta
15f0: 74 69 63 74 6b 2d 2a 29 0a 09 09 09 09 74 65 6d  tictk-*).....tem
1600: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1610: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1620: 27 73 40 2d 73 74 61 74 69 63 74 6b 2d 40 2d 40  's@-statictk-@-@
1630: 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22 24 7b  ')".....if [ "${
1640: 6e 6f 74 6b 7d 22 20 3d 20 22 30 22 20 5d 3b 20  notk}" = "0" ]; 
1650: 74 68 65 6e 0a 09 09 09 09 09 73 74 61 74 69 63  then......static
1660: 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73 65 0a  tk="1".....else.
1670: 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b 69 74  .....echo "${kit
1680: 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63 72 65  }: Unable to cre
1690: 61 74 65 20 53 74 61 74 69 63 54 6b 20 61 6e 64  ate StaticTk and
16a0: 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67 20   NoTk, ignoring 
16b0: 53 74 61 74 69 63 54 6b 22 20 3e 26 32 0a 09 09  StaticTk" >&2...
16c0: 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09 09 2a  ..fi.....;;....*
16d0: 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 74 65 6d  -notk-*).....tem
16e0: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
16f0: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1700: 27 73 40 2d 6e 6f 74 6b 2d 40 2d 40 27 29 22 0a  's@-notk-@-@')".
1710: 09 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61 74  ....if [ "${stat
1720: 69 63 74 6b 7d 22 20 3d 20 22 30 22 20 5d 3b 20  ictk}" = "0" ]; 
1730: 74 68 65 6e 0a 09 09 09 09 09 6e 6f 74 6b 3d 22  then......notk="
1740: 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09  1".....else.....
1750: 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a 20 55  .echo "${kit}: U
1760: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
1770: 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e 6f 54  StaticTk and NoT
1780: 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 4e 6f 54 6b  k, ignoring NoTk
1790: 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09 09 09  " >&2.....fi....
17a0: 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 6d 6b 34 2d 2a  .;;....*-nomk4-*
17b0: 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24  ).....tempkit="$
17c0: 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74  (echo "${tempkit
17d0: 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6e 6f 6d  }" | sed 's@-nom
17e0: 6b 34 2d 40 2d 40 27 29 22 0a 09 09 09 09 6e 6f  k4-@-@')".....no
17f0: 6d 6b 34 3d 22 31 22 0a 09 09 09 09 69 73 7a 69  mk4="1".....iszi
1800: 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09  p="1".....;;....
1810: 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09  *-kitdll-*).....
1820: 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20  tempkit="$(echo 
1830: 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73  "${tempkit}" | s
1840: 65 64 20 27 73 40 2d 6b 69 74 64 6c 6c 2d 40 2d  ed 's@-kitdll-@-
1850: 40 27 29 22 0a 09 09 09 09 6b 69 74 64 6c 6c 3d  @')".....kitdll=
1860: 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d  "1".....;;....*-
1870: 64 65 62 75 67 2d 2a 29 0a 09 09 09 09 74 65 6d  debug-*).....tem
1880: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1890: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
18a0: 27 73 40 2d 64 65 62 75 67 2d 40 2d 40 27 29 22  's@-debug-@-@')"
18b0: 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67  .....args="${arg
18c0: 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 73 79 6d 62  s} --enable-symb
18d0: 6f 6c 73 22 0a 09 09 09 09 3b 3b 0a 09 09 65 73  ols".....;;...es
18e0: 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20 5b 20  ac..done...if [ 
18f0: 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31  "${kitdll}" = "1
1900: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 23 20 43 75  " ]; then...# Cu
1910: 72 72 65 6e 74 6c 79 20 6e 6f 20 4b 69 74 44 4c  rrently no KitDL
1920: 4c 20 75 73 65 73 20 5a 69 70 0a 09 09 69 73 7a  L uses Zip...isz
1930: 69 70 3d 22 30 22 0a 09 66 69 0a 0a 09 66 6f 72  ip="0"..fi...for
1940: 20 76 65 72 73 69 6f 6e 20 69 6e 20 24 7b 56 45   version in ${VE
1950: 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a 09 09 23 20  RSIONS}; do...# 
1960: 57 6f 72 6b 20 61 72 6f 75 6e 64 20 63 68 61 6e  Work around chan
1970: 67 65 73 20 69 6e 20 64 65 66 61 75 6c 74 20 62  ges in default b
1980: 65 68 61 76 69 6f 75 72 0a 09 09 69 66 20 5b 20  ehaviour...if [ 
1990: 22 24 7b 76 65 72 73 69 6f 6e 7d 22 20 3d 20 22  "${version}" = "
19a0: 63 76 73 5f 48 45 41 44 22 20 5d 3b 20 74 68 65  cvs_HEAD" ]; the
19b0: 6e 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68 6f  n....kit="$(echo
19c0: 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20   "${kit}" | sed 
19d0: 27 73 40 2d 74 68 72 65 61 64 65 64 40 2d 75 6e  's@-threaded@-un
19e0: 74 68 72 65 61 64 65 64 40 27 29 22 0a 09 09 09  threaded@')"....
19f0: 61 72 67 73 3d 22 24 28 65 63 68 6f 20 22 24 7b  args="$(echo "${
1a00: 61 72 67 73 7d 22 20 7c 20 73 65 64 20 27 73 40  args}" | sed 's@
1a10: 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64   --enable-thread
1a20: 73 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74 68 72  s@ --disable-thr
1a30: 65 61 64 73 40 27 29 22 0a 09 09 66 69 0a 0a 09  eads@')"...fi...
1a40: 09 23 20 43 72 65 61 74 65 20 54 63 6c 6b 69 74  .# Create Tclkit
1a50: 0a 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c  ...if [ "${kitdl
1a60: 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  l}" = "1" ]; the
1a70: 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d  n....createdkit=
1a80: 22 6c 69 62 74 63 6c 6b 69 74 2a 2e 64 6c 6c 20  "libtclkit*.dll 
1a90: 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a 22 0a 09 09  libtclkit*.*"...
1aa0: 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54  .outputname="${T
1ab0: 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 6c 69 62  ESTDIR}/kits/lib
1ac0: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
1ad0: 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66 61 69  }-${kit}"....fai
1ae0: 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54  loutputname="${T
1af0: 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66 61 69  ESTDIR}/kits/fai
1b00: 6c 65 64 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b  led/libtclkit-${
1b10: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22  version}-${kit}"
1b20: 0a 09 09 09 73 64 6b 3d 22 6c 69 62 74 63 6c 6b  ....sdk="libtclk
1b30: 69 74 2d 73 64 6b 2d 24 7b 76 65 72 73 69 6f 6e  it-sdk-${version
1b40: 7d 2e 74 61 72 2e 67 7a 22 0a 09 09 65 6c 73 65  }.tar.gz"...else
1b50: 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22  ....createdkit="
1b60: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
1b70: 7d 22 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65  }"....outputname
1b80: 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74  ="${TESTDIR}/kit
1b90: 73 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  s/tclkit-${versi
1ba0: 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66  on}-${kit}"....f
1bb0: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ailoutputname="$
1bc0: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
1bd0: 61 69 6c 65 64 2f 74 63 6c 6b 69 74 2d 24 7b 76  ailed/tclkit-${v
1be0: 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a  ersion}-${kit}".
1bf0: 09 09 09 73 64 6b 3d 27 27 0a 09 09 66 69 0a 09  ...sdk=''...fi..
1c00: 09 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 6f 75 74  .buildlog="${out
1c10: 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c  putname}-build.l
1c20: 6f 67 22 0a 09 09 66 61 69 6c 62 75 69 6c 64 6c  og"...failbuildl
1c30: 6f 67 3d 22 24 7b 66 61 69 6c 6f 75 74 70 75 74  og="${failoutput
1c40: 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f 67 22  name}-build.log"
1c50: 0a 09 09 74 65 73 74 72 65 73 75 6c 74 73 6c 6f  ...testresultslo
1c60: 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  g="${outputname}
1c70: 2d 74 65 73 74 73 2e 6c 6f 67 22 0a 0a 09 09 69  -tests.log"....i
1c80: 66 20 5b 20 21 20 2d 66 20 22 24 7b 6f 75 74 70  f [ ! -f "${outp
1c90: 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68 65 6e  utname}" ]; then
1ca0: 0a 09 09 09 75 6e 73 65 74 20 4b 49 54 43 52 45  ....unset KITCRE
1cb0: 41 54 4f 52 5f 50 4b 47 53 20 53 54 41 54 49 43  ATOR_PKGS STATIC
1cc0: 54 4b 20 53 54 52 49 50 0a 0a 09 09 09 69 66 20  TK STRIP.....if 
1cd0: 5b 20 2d 66 20 22 24 7b 66 61 69 6c 6f 75 74 70  [ -f "${failoutp
1ce0: 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68 65 6e  utname}" ]; then
1cf0: 0a 09 09 09 09 65 63 68 6f 20 22 53 6b 69 70 70  .....echo "Skipp
1d00: 69 6e 67 20 72 65 62 75 69 6c 64 69 6e 67 20 66  ing rebuilding f
1d10: 61 69 6c 65 64 20 6b 69 74 20 24 7b 76 65 72 73  ailed kit ${vers
1d20: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20 2e 2e 2e 22  ion}/${kit} ..."
1d30: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
1d40: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
1d50: 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22  n}/${kit}-build"
1d60: 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09  ......continue..
1d70: 09 09 66 69 0a 0a 09 09 09 72 6d 20 2d 66 20 74  ..fi.....rm -f t
1d80: 63 6c 73 68 0a 09 09 09 2e 2f 6b 69 74 63 72 65  clsh...../kitcre
1d90: 61 74 6f 72 20 63 6c 65 61 6e 20 3e 2f 64 65 76  ator clean >/dev
1da0: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
1db0: 6c 0a 0a 09 09 09 65 63 68 6f 20 22 43 72 65 61  l.....echo "Crea
1dc0: 74 69 6e 67 20 54 63 6c 6b 69 74 20 24 7b 76 65  ting Tclkit ${ve
1dd0: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2e 2e 2e  rsion}/${kit}...
1de0: 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20  "....echo " *** 
1df0: 42 75 69 6c 64 20 73 74 61 72 74 65 64 20 24 28  Build started $(
1e00: 77 68 6f 61 6d 69 29 40 24 28 68 6f 73 74 6e 61  whoami)@$(hostna
1e10: 6d 65 29 20 6f 6e 20 24 28 64 61 74 65 29 22 20  me) on $(date)" 
1e20: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
1e30: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
1e40: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
1e50: 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20  cho " *** Build 
1e60: 53 63 72 69 70 74 22 20 3e 3e 20 22 24 7b 62 75  Script" >> "${bu
1e70: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 69 66 20  ildlog}".....if 
1e80: 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 31  [ "${notk}" = "1
1e90: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 4b 49  " ]; then.....KI
1ea0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 69  TCREATOR_PKGS='i
1eb0: 74 63 6c 20 6d 6b 34 74 63 6c 27 0a 09 09 09 66  tcl mk4tcl'....f
1ec0: 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f  i.....if [ "${no
1ed0: 6d 6b 34 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  mk4}" = "1" ]; t
1ee0: 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20  hen.....if [ -z 
1ef0: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
1f00: 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  GS}" ]; then....
1f10: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
1f20: 53 3d 27 69 74 63 6c 20 74 6b 27 0a 09 09 09 09  S='itcl tk'.....
1f30: 65 6c 73 65 0a 09 09 09 09 09 4b 49 54 43 52 45  else......KITCRE
1f40: 41 54 4f 52 5f 50 4b 47 53 3d 22 24 28 65 63 68  ATOR_PKGS="$(ech
1f50: 6f 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  o "${KITCREATOR_
1f60: 50 4b 47 53 7d 22 20 7c 20 73 65 64 20 27 73 40  PKGS}" | sed 's@
1f70: 6d 6b 34 74 63 6c 40 40 27 29 22 0a 09 09 09 09  mk4tcl@@')".....
1f80: 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20  fi....fi.....if 
1f90: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
1fa0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
1fb0: 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52  if [ -z "${KITCR
1fc0: 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20  EATOR_PKGS}" ]; 
1fd0: 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43 52 45  then......KITCRE
1fe0: 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74  ATOR_PKGS='tk it
1ff0: 63 6c 20 6d 6b 34 74 63 6c 20 6b 69 74 64 6c 6c  cl mk4tcl kitdll
2000: 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09  '.....else......
2010: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
2020: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
2030: 47 53 7d 20 6b 69 74 64 6c 6c 22 0a 09 09 09 09  GS} kitdll".....
2040: 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 65 78 70  fi....fi.....exp
2050: 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50  ort KITCREATOR_P
2060: 4b 47 53 0a 0a 09 09 09 69 66 20 5b 20 2d 6e 20  KGS.....if [ -n 
2070: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
2080: 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  GS}" ]; then....
2090: 09 65 63 68 6f 20 22 20 20 4b 49 54 43 52 45 41  .echo "  KITCREA
20a0: 54 4f 52 5f 50 4b 47 53 3d 5c 22 24 7b 4b 49 54  TOR_PKGS=\"${KIT
20b0: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 5c 22 22  CREATOR_PKGS}\""
20c0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
20d0: 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65 78  ".....echo "  ex
20e0: 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52 5f  port KITCREATOR_
20f0: 50 4b 47 53 22 20 3e 3e 20 22 24 7b 62 75 69 6c  PKGS" >> "${buil
2100: 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09  dlog}"....fi....
2110: 09 69 66 20 5b 20 22 24 7b 73 74 61 74 69 63 74  .if [ "${statict
2120: 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  k}" = "1" ]; the
2130: 6e 0a 09 09 09 09 53 54 41 54 49 43 54 4b 3d 22  n.....STATICTK="
2140: 31 22 0a 09 09 09 09 65 78 70 6f 72 74 20 53 54  1".....export ST
2150: 41 54 49 43 54 4b 0a 0a 09 09 09 09 65 63 68 6f  ATICTK......echo
2160: 20 22 20 20 53 54 41 54 49 43 54 4b 3d 5c 22 24   "  STATICTK=\"$
2170: 7b 53 54 41 54 49 43 54 4b 7d 5c 22 22 20 3e 3e  {STATICTK}\"" >>
2180: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2190: 09 09 09 65 63 68 6f 20 22 20 20 65 78 70 6f 72  ...echo "  expor
21a0: 74 20 53 54 41 54 49 43 54 4b 22 20 3e 3e 20 22  t STATICTK" >> "
21b0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
21c0: 66 69 0a 0a 09 09 09 69 66 20 65 63 68 6f 20 22  fi.....if echo "
21d0: 24 7b 61 72 67 73 7d 22 20 7c 20 67 72 65 70 20  ${args}" | grep 
21e0: 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65 2d 73 79 6d  -- '--enable-sym
21f0: 62 6f 6c 73 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  bols' >/dev/null
2200: 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 52 49 50  ; then.....STRIP
2210: 3d 27 74 72 75 65 27 0a 09 09 09 09 65 78 70 6f  ='true'.....expo
2220: 72 74 20 53 54 52 49 50 0a 0a 09 09 09 09 65 63  rt STRIP......ec
2230: 68 6f 20 22 20 20 53 54 52 49 50 3d 27 74 72 75  ho "  STRIP='tru
2240: 65 27 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  e'" >> "${buildl
2250: 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20  og}".....echo " 
2260: 20 65 78 70 6f 72 74 20 53 54 52 49 50 22 20 3e   export STRIP" >
2270: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2280: 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22  ...fi.....if [ "
2290: 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 21  ${kitcreator}" !
22a0: 3d 20 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72 22  = "./kitcreator"
22b0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
22c0: 6f 20 22 20 20 6d 6b 64 69 72 20 62 75 69 6c 64  o "  mkdir build
22d0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
22e0: 7d 22 0a 0a 09 09 09 09 23 20 53 65 76 65 72 61  }"......# Severa
22f0: 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74 73 20  l build scripts 
2300: 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b 69 74 20 74  rely on minkit t
2310: 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72  o work.....if gr
2320: 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  ep './build/make
2330: 2d 6d 69 6e 6b 69 74 27 20 22 24 7b 6b 69 74 63  -minkit' "${kitc
2340: 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e  reator}" >/dev/n
2350: 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b  ull 2>/dev/null;
2360: 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68 6f 20   then......echo 
2370: 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46  "  cat << \__EOF
2380: 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b  __ > ./build/mak
2390: 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e 20 22 24 7b  e-minkit" >> "${
23a0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
23b0: 73 65 64 20 27 73 40 5e 40 20 20 40 27 20 20 27  sed 's@^@  @'  '
23c0: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e  ./build/make-min
23d0: 6b 69 74 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  kit' >> "${build
23e0: 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20  log}"......echo 
23f0: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
2400: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2410: 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b  ..echo '' >> "${
2420: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66  buildlog}".....f
2430: 69 0a 0a 09 09 09 09 23 20 53 65 76 65 72 61 6c  i......# Several
2440: 20 62 75 69 6c 64 20 73 63 72 69 70 74 73 20 72   build scripts r
2450: 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d 6b 69 74 2d  ely on make-kit-
2460: 63 72 6f 73 73 63 6f 6d 70 69 6c 65 20 74 6f 20  crosscompile to 
2470: 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72 65 70  work.....if grep
2480: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b   './build/make-k
2490: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 27  it-crosscompile'
24a0: 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22   "${kitcreator}"
24b0: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
24c0: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
24d0: 09 09 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c  ...echo "  cat <
24e0: 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62  < \__EOF__ > ./b
24f0: 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72  uild/make-kit-cr
2500: 6f 73 73 63 6f 6d 70 69 6c 65 22 20 3e 3e 20 22  osscompile" >> "
2510: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2520: 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20  ..sed 's@^@  @' 
2530: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b   './build/make-k
2540: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 27  it-crosscompile'
2550: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2560: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20 5f  "......echo "  _
2570: 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75  _EOF__" >> "${bu
2580: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63  ildlog}"......ec
2590: 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c  ho '' >> "${buil
25a0: 64 6c 6f 67 7d 22 0a 09 09 09 09 66 69 0a 0a 09  dlog}".....fi...
25b0: 09 09 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c  ...echo "  cat <
25c0: 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 24 7b 6b  < \__EOF__ > ${k
25d0: 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 3e 20 22  itcreator}" >> "
25e0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
25f0: 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20 20  .sed 's@^@  @'  
2600: 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20  "${kitcreator}" 
2610: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2620: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 5f 5f 45  .....echo "  __E
2630: 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75 69 6c  OF__" >> "${buil
2640: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
2650: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2660: 67 7d 22 0a 09 09 09 66 69 0a 09 09 09 65 63 68  g}"....fi....ech
2670: 6f 20 22 20 20 5c 22 24 7b 6b 69 74 63 72 65 61  o "  \"${kitcrea
2680: 74 6f 72 7d 5c 22 20 5c 22 24 7b 76 65 72 73 69  tor}\" \"${versi
2690: 6f 6e 7d 5c 22 20 24 7b 61 72 67 73 7d 22 20 3e  on}\" ${args}" >
26a0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
26b0: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
26c0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
26d0: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
26e0: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
26f0: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2700: 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a  g}"....echo " **
2710: 2a 20 42 75 69 6c 64 20 52 65 73 75 6c 74 73 22  * Build Results"
2720: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2730: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
2740: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09  "${buildlog}"...
2750: 09 09 62 75 69 6c 64 66 61 69 6c 65 64 3d 22 30  ..buildfailed="0
2760: 22 0a 09 09 09 22 24 7b 6b 69 74 63 72 65 61 74  "...."${kitcreat
2770: 6f 72 7d 22 20 22 24 7b 76 65 72 73 69 6f 6e 7d  or}" "${version}
2780: 22 20 24 7b 61 72 67 73 7d 20 3e 3e 20 22 24 7b  " ${args} >> "${
2790: 62 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 20  buildlog}" 2>&1 
27a0: 7c 7c 20 62 75 69 6c 64 66 61 69 6c 65 64 3d 22  || buildfailed="
27b0: 31 22 0a 09 09 09 67 72 65 70 20 2d 6e 20 27 5e  1"....grep -n '^
27c0: 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f 67 20 3e 3e  ' */build.log >>
27d0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32   "${buildlog}" 2
27e0: 3e 26 31 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b  >&1.....if [ "${
27f0: 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d  kitdll}" = "1" ]
2800: 3b 20 74 68 65 6e 0a 09 09 09 09 23 20 43 72 65  ; then.....# Cre
2810: 61 74 65 20 74 65 73 74 20 64 72 69 76 65 72 73  ate test drivers
2820: 20 66 6f 72 20 4b 69 74 44 4c 4c 0a 09 09 09 09   for KitDLL.....
2830: 28 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09  (......echo ""..
2840: 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09 09  ....echo "".....
2850: 09 65 63 68 6f 20 22 22 0a 09 09 09 09 09 65 63  .echo ""......ec
2860: 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 69 6e  ho " *** Buildin
2870: 67 20 4b 69 74 44 4c 4c 20 74 65 73 74 20 64 72  g KitDLL test dr
2880: 69 76 65 72 20 28 74 63 6c 73 68 29 22 0a 09 09  iver (tclsh)"...
2890: 09 09 09 65 63 68 6f 20 22 22 0a 0a 09 09 09 09  ...echo ""......
28a0: 09 63 64 20 6b 69 74 73 68 2f 62 75 69 6c 64 2f  .cd kitsh/build/
28b0: 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20 65 78 69 74  kitsh-*/ || exit
28c0: 20 31 0a 09 09 09 09 09 6d 61 6b 65 20 74 63 6c   1......make tcl
28d0: 73 68 0a 09 09 09 09 09 63 70 20 74 63 6c 73 68  sh......cp tclsh
28e0: 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09 09 09 09 29   ../../../.....)
28f0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2900: 22 20 32 3e 26 31 0a 09 09 09 66 69 0a 0a 09 09  " 2>&1....fi....
2910: 09 23 20 50 65 72 66 6f 72 6d 20 77 69 6c 64 63  .# Perform wildc
2920: 61 72 64 20 65 78 70 61 6e 73 69 6f 6e 0a 09 09  ard expansion...
2930: 09 63 72 65 61 74 65 64 6b 69 74 3d 22 24 28 6c  .createdkit="$(l
2940: 73 20 2d 66 31 20 24 7b 63 72 65 61 74 65 64 6b  s -f1 ${createdk
2950: 69 74 7d 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20  it} 2>/dev/null 
2960: 7c 20 67 72 65 70 20 2d 76 20 27 5c 2e 74 61 72  | grep -v '\.tar
2970: 5c 2e 67 7a 24 27 20 7c 20 68 65 61 64 20 2d 6e  \.gz$' | head -n
2980: 20 31 29 22 0a 0a 09 09 09 69 66 20 5b 20 21 20   1)".....if [ ! 
2990: 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  -f "${createdkit
29a0: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  }" ]; then.....e
29b0: 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 63  cho "Failed to c
29c0: 72 65 61 74 65 20 6b 69 74 20 24 7b 76 65 72 73  reate kit ${vers
29d0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32  ion}/${kit}" >&2
29e0: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
29f0: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
2a00: 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22  n}/${kit}-build"
2a10: 0a 0a 09 09 09 09 74 6f 75 63 68 20 22 24 7b 66  ......touch "${f
2a20: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a  ailoutputname}".
2a30: 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c  ....mv "${buildl
2a40: 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c  og}" "${failbuil
2a50: 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d  dlog}"......rm -
2a60: 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e  f tclsh......con
2a70: 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09  tinue....fi.....
2a80: 23 20 56 65 72 69 66 79 20 73 61 6e 69 74 79 20  # Verify sanity 
2a90: 6f 66 20 63 72 65 61 74 65 64 20 6b 69 74 0a 09  of created kit..
2aa0: 09 09 69 73 73 61 6e 65 3d 31 0a 0a 09 09 09 23  ..issane=1.....#
2ab0: 23 20 56 65 72 69 66 79 20 74 68 61 74 20 57 69  # Verify that Wi
2ac0: 6e 33 32 20 62 75 69 6c 64 73 20 61 72 65 20 6f  n32 builds are o
2ad0: 66 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09  f correct type..
2ae0: 09 09 23 23 20 56 65 72 69 66 79 20 74 68 61 74  ..## Verify that
2af0: 20 44 4c 4c 20 62 75 69 6c 64 73 20 61 72 65 20   DLL builds are 
2b00: 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a  of correct type.
2b10: 09 09 09 63 61 73 65 20 22 2d 24 7b 76 65 72 73  ...case "-${vers
2b20: 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20 69 6e  ion}-${kit}-" in
2b30: 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6b 69 74  .....*-win32-kit
2b40: 64 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d  dll-*|*-win32-*-
2b50: 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69  kitdll-*)......i
2b60: 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61  f ! file "${crea
2b70: 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20  tedkit}" | grep 
2b80: 27 4d 53 20 57 69 6e 64 6f 77 73 20 28 44 4c 4c  'MS Windows (DLL
2b90: 29 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  )' >/dev/null; t
2ba0: 68 65 6e 0a 09 09 09 09 09 09 69 73 73 61 6e 65  hen.......issane
2bb0: 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09  =0......fi......
2bc0: 3b 3b 0a 09 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d  ;;.....*-kitdll-
2bd0: 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c  *)......if ! fil
2be0: 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  e "${createdkit}
2bf0: 22 20 7c 20 67 72 65 70 20 27 73 68 61 72 65 64  " | grep 'shared
2c00: 20 6f 62 6a 65 63 74 27 20 3e 2f 64 65 76 2f 6e   object' >/dev/n
2c10: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09  ull; then.......
2c20: 69 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69  issane=0......fi
2c30: 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77  ......;;.....*-w
2c40: 69 6e 33 32 2d 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69  in32-notk-*|*-wi
2c50: 6e 33 32 2d 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09  n32-*-notk-*)...
2c60: 09 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b  ...if ! file "${
2c70: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67  createdkit}" | g
2c80: 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 20  rep 'MS Windows 
2c90: 28 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64 65 76  (console)' >/dev
2ca0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2cb0: 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c  ..echo "Kit fail
2cc0: 65 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20  ed sanity check 
2cd0: 66 6f 72 20 62 65 69 6e 67 20 61 20 63 6f 6e 73  for being a cons
2ce0: 6f 6c 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 22  ole application"
2cf0: 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e   >&2.......issan
2d00: 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09  e=0......fi.....
2d10: 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d  .;;.....*-win32-
2d20: 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c  *)......if ! fil
2d30: 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  e "${createdkit}
2d40: 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69 6e  " | grep 'MS Win
2d50: 64 6f 77 73 20 28 47 55 49 29 27 20 3e 2f 64 65  dows (GUI)' >/de
2d60: 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09  v/null; then....
2d70: 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69  ...echo "Kit fai
2d80: 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b  led sanity check
2d90: 20 66 6f 72 20 62 65 69 6e 67 20 61 20 47 55 49   for being a GUI
2da0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26   application" >&
2db0: 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30  2.......issane=0
2dc0: 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b  ......fi......;;
2dd0: 0a 09 09 09 65 73 61 63 0a 0a 09 09 09 23 23 20  ....esac.....## 
2de0: 56 65 72 69 66 79 20 74 68 65 20 62 75 69 6c 64  Verify the build
2df0: 20 63 6f 6d 70 6c 65 74 65 64 20 77 69 74 68 6f   completed witho
2e00: 75 74 20 77 61 72 6e 69 6e 67 73 0a 09 09 09 69  ut warnings....i
2e10: 66 20 5b 20 22 24 7b 62 75 69 6c 64 66 61 69 6c  f [ "${buildfail
2e20: 65 64 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68  ed}" = "1" ]; th
2e30: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74  en.....echo "Kit
2e40: 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63   failed sanity c
2e50: 68 65 63 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e  heck for Buildin
2e60: 67 22 20 3e 26 32 0a 0a 09 09 09 09 69 73 73 61  g" >&2......issa
2e70: 6e 65 3d 30 0a 09 09 09 66 69 0a 0a 09 09 09 23  ne=0....fi.....#
2e80: 20 4d 61 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61   Make note of sa
2e90: 6e 69 74 79 20 66 61 69 6c 75 72 65 0a 09 09 09  nity failure....
2ea0: 69 66 20 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22  if [ "${issane}"
2eb0: 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a   != "1" ]; then.
2ec0: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
2ed0: 69 6c 65 64 20 73 61 6e 69 74 79 20 24 7b 76 65  iled sanity ${ve
2ee0: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e  rsion}/${kit}" >
2ef0: 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22  &2......failed="
2f00: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
2f10: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69  ion}/${kit}-sani
2f20: 74 79 22 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63  ty"......mv "${c
2f30: 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b 66  reatedkit}" "${f
2f40: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a  ailoutputname}".
2f50: 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c  ....mv "${buildl
2f60: 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c  og}" "${failbuil
2f70: 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d  dlog}"......rm -
2f80: 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e  f tclsh......con
2f90: 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09  tinue....fi.....
2fa0: 23 20 52 65 6e 61 6d 65 20 63 72 65 61 74 65 64  # Rename created
2fb0: 20 6b 69 74 20 74 6f 20 66 69 6e 61 6c 20 64 65   kit to final de
2fc0: 73 74 69 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20  stination....mv 
2fd0: 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20  "${createdkit}" 
2fe0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a  "${outputname}".
2ff0: 09 09 09 69 66 20 5b 20 2d 66 20 22 74 63 6c 73  ...if [ -f "tcls
3000: 68 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d  h" ]; then.....m
3010: 76 20 22 74 63 6c 73 68 22 20 22 24 7b 6f 75 74  v "tclsh" "${out
3020: 70 75 74 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a  putname}-tclsh".
3030: 09 09 09 66 69 0a 0a 09 09 09 23 20 46 6f 72 20  ...fi.....# For 
3040: 4b 69 74 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e  KitDLL, make a n
3050: 6f 74 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69  ote of the origi
3060: 6e 61 6c 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b  nal name....if [
3070: 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22   "${kitdll}" = "
3080: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  1" ]; then.....e
3090: 63 68 6f 20 22 24 7b 63 72 65 61 74 65 64 6b 69  cho "${createdki
30a0: 74 7d 22 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e  t}" > "${outputn
30b0: 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 0a  ame}-origname"..
30c0: 09 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 73  ....if [ -f "${s
30d0: 64 6b 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  dk}" ]; then....
30e0: 09 09 6d 76 20 22 24 7b 73 64 6b 7d 22 20 22 24  ..mv "${sdk}" "$
30f0: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 73 64 6b  {outputname}-sdk
3100: 2e 74 61 72 2e 67 7a 22 0a 09 09 09 09 66 69 0a  .tar.gz".....fi.
3110: 09 09 09 66 69 0a 09 09 66 69 0a 0a 09 09 23 20  ...fi...fi....# 
3120: 54 65 73 74 20 7a 69 70 20 73 74 61 74 75 73 0a  Test zip status.
3130: 09 09 69 66 20 75 6e 7a 69 70 20 2d 6c 20 22 24  ..if unzip -l "$
3140: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 32 3e  {outputname}" 2>
3150: 26 31 20 7c 20 67 72 65 70 20 27 62 6f 6f 74 5c  &1 | grep 'boot\
3160: 2e 74 63 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  .tcl' >/dev/null
3170: 3b 20 74 68 65 6e 0a 09 09 09 63 61 6e 75 6e 7a  ; then....canunz
3180: 69 70 3d 22 31 22 0a 09 09 65 6c 73 65 0a 09 09  ip="1"...else...
3190: 09 63 61 6e 75 6e 7a 69 70 3d 22 30 22 0a 09 09  .canunzip="0"...
31a0: 66 69 0a 0a 09 09 69 66 20 5b 20 22 24 7b 69 73  fi....if [ "${is
31b0: 7a 69 70 7d 22 20 21 3d 20 22 24 7b 63 61 6e 75  zip}" != "${canu
31c0: 6e 7a 69 70 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  nzip}" ]; then..
31d0: 09 09 65 63 68 6f 20 22 46 61 69 6c 65 64 20 74  ..echo "Failed t
31e0: 6f 20 75 6e 7a 69 70 20 7a 69 70 6b 69 74 20 6f  o unzip zipkit o
31f0: 72 20 77 61 73 20 61 62 6c 65 20 74 6f 20 75 6e  r was able to un
3200: 7a 69 70 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24  zip non-zipkit $
3210: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
3220: 22 20 3e 26 32 0a 0a 09 09 09 66 61 69 6c 65 64  " >&2.....failed
3230: 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65  ="${failed} ${ve
3240: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69  rsion}/${kit}-zi
3250: 70 22 0a 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a  p".....continue.
3260: 09 09 66 69 0a 0a 09 09 23 20 44 6f 20 6e 6f 74  ..fi....# Do not
3270: 20 63 6f 6e 74 69 6e 75 65 20 70 61 73 74 20 68   continue past h
3280: 65 72 65 20 66 6f 72 20 75 6e 2d 72 75 6e 6e 61  ere for un-runna
3290: 62 6c 65 20 6b 69 74 73 0a 09 09 69 66 20 5b 20  ble kits...if [ 
32a0: 22 24 7b 72 75 6e 6e 61 62 6c 65 7d 22 20 21 3d  "${runnable}" !=
32b0: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
32c0: 63 6f 6e 74 69 6e 75 65 0a 09 09 66 69 0a 0a 09  continue...fi...
32d0: 09 23 20 49 66 20 74 68 65 20 6e 61 6d 65 20 6f  .# If the name o
32e0: 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 62  f the original b
32f0: 75 69 6c 64 20 6d 61 74 74 65 72 73 2c 20 73 79  uild matters, sy
3300: 6d 6c 69 6e 6b 20 69 74 20 75 70 0a 09 09 69 66  mlink it up...if
3310: 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e   [ -f "${outputn
3320: 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d  ame}-origname" ]
3330: 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61 74 65  ; then....create
3340: 64 6b 69 74 3d 22 24 28 63 61 74 20 22 24 7b 6f  dkit="$(cat "${o
3350: 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e  utputname}-orign
3360: 61 6d 65 22 29 22 0a 0a 09 09 09 6c 6e 20 2d 73  ame")".....ln -s
3370: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3380: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
3390: 0a 09 09 66 69 0a 0a 09 09 23 20 50 65 72 66 6f  ...fi....# Perfo
33a0: 72 6d 20 62 61 74 74 65 72 79 20 6f 66 20 74 65  rm battery of te
33b0: 73 74 73 0a 09 09 23 23 20 43 6c 65 61 6e 20 74  sts...## Clean t
33c0: 65 73 74 73 20 6c 6f 67 0a 09 09 72 6d 20 2d 66  ests log...rm -f
33d0: 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74 73 6c   "${testresultsl
33e0: 6f 67 7d 22 0a 09 09 66 6f 72 20 74 65 73 74 73  og}"...for tests
33f0: 63 70 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52  cp in "${TESTDIR
3400: 7d 22 2f 74 65 73 74 73 2f 2a 2e 74 63 6c 3b 20  }"/tests/*.tcl; 
3410: 64 6f 0a 09 09 09 74 65 73 74 73 63 70 5f 74 61  do....testscp_ta
3420: 67 3d 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24  g="$(basename "$
3430: 7b 74 65 73 74 73 63 70 7d 22 20 2e 74 63 6c 29  {testscp}" .tcl)
3440: 22 0a 09 09 09 74 65 73 74 73 63 70 70 72 65 3d  "....testscppre=
3450: 22 24 28 64 69 72 6e 61 6d 65 20 22 24 7b 74 65  "$(dirname "${te
3460: 73 74 73 63 70 7d 22 29 2f 24 7b 74 65 73 74 73  stscp}")/${tests
3470: 63 70 5f 74 61 67 7d 2e 73 68 22 0a 09 09 09 73  cp_tag}.sh"....s
3480: 63 70 6c 6f 67 66 69 6c 65 3d 22 24 7b 6f 75 74  cplogfile="${out
3490: 70 75 74 6e 61 6d 65 7d 2d 24 7b 74 65 73 74 73  putname}-${tests
34a0: 63 70 5f 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09  cp_tag}.log"....
34b0: 09 23 20 49 66 20 61 20 63 6f 6d 6d 61 6e 64 20  .# If a command 
34c0: 69 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 73  is required to s
34d0: 74 61 72 74 20 74 68 65 20 6b 69 74 2c 20 70 72  tart the kit, pr
34e0: 65 70 61 72 65 20 74 6f 20 6b 69 6c 6c 20 69 74  epare to kill it
34f0: 0a 09 09 09 23 20 69 6e 20 63 61 73 65 20 6f 66  ....# in case of
3500: 20 74 69 6d 65 6f 75 74 2e 0a 09 09 09 23 23 20   timeout.....## 
3510: 54 65 6d 70 6f 72 61 72 69 6c 79 20 64 69 73 61  Temporarily disa
3520: 62 6c 65 64 20 73 69 6e 63 65 20 63 75 72 72 65  bled since curre
3530: 6e 74 6c 79 20 69 74 20 69 73 20 63 61 75 73 69  ntly it is causi
3540: 6e 67 0a 09 09 09 23 23 20 6d 6f 72 65 20 70 72  ng....## more pr
3550: 6f 62 6c 65 6d 73 20 69 6e 20 74 68 65 20 66 6f  oblems in the fo
3560: 72 6d 20 6f 66 20 74 65 73 74 73 20 62 65 69 6e  rm of tests bein
3570: 67 20 6b 69 6c 6c 65 64 0a 09 09 09 23 23 20 70  g killed....## p
3580: 72 65 6d 61 74 75 72 65 6c 79 20 74 68 61 6e 20  rematurely than 
3590: 77 65 20 61 72 65 20 68 61 76 69 6e 67 20 69 73  we are having is
35a0: 73 75 65 73 20 77 69 74 68 20 74 65 73 74 73 0a  sues with tests.
35b0: 09 09 09 23 23 20 68 61 6e 67 69 6e 67 0a 09 09  ...## hanging...
35c0: 09 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22  .kitrunkillpid="
35d0: 22 0a 09 09 09 69 66 20 5b 20 22 31 22 20 3d 20  "....if [ "1" = 
35e0: 22 30 22 20 2d 61 20 2d 6e 20 22 24 7b 6b 69 74  "0" -a -n "${kit
35f0: 72 75 6e 63 6d 64 7d 22 20 5d 3b 20 74 68 65 6e  runcmd}" ]; then
3600: 0a 09 09 09 09 28 0a 09 09 09 09 09 73 6c 65 65  .....(......slee
3610: 70 20 31 32 30 0a 09 09 09 09 09 6b 69 6c 6c 61  p 120......killa
3620: 6c 6c 20 22 24 28 62 61 73 65 6e 61 6d 65 20 22  ll "$(basename "
3630: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 29 22  ${outputname}")"
3640: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
3650: 65 76 2f 6e 75 6c 6c 0a 09 09 09 09 29 20 3e 2f  ev/null.....) >/
3660: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
3670: 6e 75 6c 6c 20 26 0a 09 09 09 09 6b 69 74 72 75  null &.....kitru
3680: 6e 6b 69 6c 6c 70 69 64 3d 22 24 21 22 0a 09 09  nkillpid="$!"...
3690: 09 66 69 0a 0a 09 09 09 28 0a 09 09 09 09 69 66  .fi.....(.....if
36a0: 20 5b 20 2d 66 20 22 24 7b 74 65 73 74 73 63 70   [ -f "${testscp
36b0: 70 72 65 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09  pre}" ]; then...
36c0: 09 09 09 2e 20 22 24 7b 74 65 73 74 73 63 70 70  .... "${testscpp
36d0: 72 65 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09 09  re}".....fi.....
36e0: 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d  .if [ "${kitdll}
36f0: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
3700: 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64  .....${kitruncmd
3710: 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  } "${outputname}
3720: 2d 74 63 6c 73 68 22 20 22 24 7b 74 65 73 74 73  -tclsh" "${tests
3730: 63 70 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61  cp}" "${outputna
3740: 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24  me}" "${kit}" "$
3750: 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 65  {version}".....e
3760: 6c 73 65 0a 09 09 09 09 09 24 7b 6b 69 74 72 75  lse......${kitru
3770: 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e  ncmd} "${outputn
3780: 61 6d 65 7d 22 20 22 24 7b 74 65 73 74 73 63 70  ame}" "${testscp
3790: 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  }" "${outputname
37a0: 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76  }" "${kit}" "${v
37b0: 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 66 69 0a  ersion}".....fi.
37c0: 09 09 09 29 20 3e 20 22 24 7b 73 63 70 6c 6f 67  ...) > "${scplog
37d0: 66 69 6c 65 7d 22 20 32 3e 26 31 0a 0a 09 09 09  file}" 2>&1.....
37e0: 69 66 20 5b 20 22 24 3f 22 20 21 3d 20 22 30 22  if [ "$?" != "0"
37f0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
3800: 6f 20 22 53 63 72 69 70 74 20 66 61 69 6c 65 64  o "Script failed
3810: 3a 20 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d  : ${testscp_tag}
3820: 20 6f 6e 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24   on ${version}/$
3830: 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09  {kit}" >&2......
3840: 66 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64  failed="${failed
3850: 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  } ${version}/${k
3860: 69 74 7d 2d 74 65 73 74 2d 24 7b 74 65 73 74 73  it}-test-${tests
3870: 63 70 5f 74 61 67 7d 22 0a 0a 09 09 09 09 65 63  cp_tag}"......ec
3880: 68 6f 20 22 24 7b 74 65 73 74 73 63 70 5f 74 61  ho "${testscp_ta
3890: 67 7d 3a 20 46 41 49 4c 22 20 3e 3e 20 20 22 24  g}: FAIL" >>  "$
38a0: 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d  {testresultslog}
38b0: 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a  "......continue.
38c0: 09 09 09 66 69 0a 0a 09 09 09 23 20 4b 69 6c 6c  ...fi.....# Kill
38d0: 20 74 68 65 20 77 61 74 63 68 64 6f 67 20 66 6f   the watchdog fo
38e0: 72 20 74 68 69 73 20 69 74 65 72 61 74 69 6f 6e  r this iteration
38f0: 0a 09 09 09 69 66 20 5b 20 2d 6e 20 22 24 7b 6b  ....if [ -n "${k
3900: 69 74 72 75 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d  itrunkillpid}" ]
3910: 3b 20 74 68 65 6e 0a 09 09 09 09 6b 69 6c 6c 20  ; then.....kill 
3920: 2d 39 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c  -9 "${kitrunkill
3930: 70 69 64 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c  pid}" >/dev/null
3940: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09   2>/dev/null....
3950: 66 69 0a 0a 09 09 09 65 63 68 6f 20 22 24 7b 74  fi.....echo "${t
3960: 65 73 74 73 63 70 5f 74 61 67 7d 3a 20 50 41 53  estscp_tag}: PAS
3970: 53 22 20 3e 3e 20 20 22 24 7b 74 65 73 74 72 65  S" >>  "${testre
3980: 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09 09 72  sultslog}".....r
3990: 6d 20 2d 66 20 22 24 7b 73 63 70 6c 6f 67 66 69  m -f "${scplogfi
39a0: 6c 65 7d 22 0a 09 09 64 6f 6e 65 0a 0a 09 09 69  le}"...done....i
39b0: 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75 74  f [ -f "${output
39c0: 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20  name}-origname" 
39d0: 5d 3b 20 74 68 65 6e 0a 09 09 09 72 6d 20 2d 66  ]; then....rm -f
39e0: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
39f0: 0a 09 09 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65  ...fi..done.done
3a00: 0a 0a 69 66 20 5b 20 2d 6e 20 22 24 7b 66 61 69  ..if [ -n "${fai
3a10: 6c 65 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65  led}" ]; then..e
3a20: 63 68 6f 20 22 46 61 69 6c 65 64 3a 20 24 7b 66  cho "Failed: ${f
3a30: 61 69 6c 65 64 7d 22 0a 66 69 0a 0a 23 20 43 6c  ailed}".fi..# Cl
3a40: 65 61 6e 75 70 0a 23 23 20 54 65 72 6d 69 6e 61  eanup.## Termina
3a50: 74 65 20 58 76 66 62 0a 6b 69 6c 6c 20 2d 39 20  te Xvfb.kill -9 
3a60: 22 24 7b 58 56 46 42 5f 50 49 44 7d 22 0a 0a 23  "${XVFB_PID}"..#
3a70: 23 20 52 65 6d 6f 76 65 20 77 69 6e 65 0a 72 6d  # Remove wine.rm
3a80: 20 2d 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46   -rf "${WINEPREF
3a90: 49 58 7d 22 0a 0a 2e 2f 6b 69 74 63 72 65 61 74  IX}".../kitcreat
3aa0: 6f 72 20 63 6c 65 61 6e 0a 72 6d 20 2d 66 20 74  or clean.rm -f t
3ab0: 63 6c 73 68 0a                                   clsh.