Hex Artifact Content

Artifact 97d02f302458e874b012b85825528ef753a71394:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 56 45  #! /bin/bash..VE
0010: 52 53 49 4f 4e 53 3d 22 38 2e 34 2e 31 39 20 38  RSIONS="8.4.19 8
0020: 2e 35 2e 31 30 20 63 76 73 5f 48 45 41 44 22 0a  .5.10 cvs_HEAD".
0030: 0a 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65  .# Find the base
0040: 20 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78   directory.for x
0050: 20 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61   in 1 2 3 4 __fa
0060: 69 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22  il__; do..if [ "
0070: 24 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f  ${x}" = "__fail_
0080: 5f 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68  _" ]; then...ech
0090: 6f 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e  o 'Unable to fin
00a0: 64 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62  d KitCreator, ab
00b0: 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09  orting.' >&2....
00c0: 65 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20  exit 1..fi...if 
00d0: 5b 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20  [ -x kitcreator 
00e0: 5d 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a  ]; then...break.
00f0: 09 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65  .fi...cd ...done
0100: 0a 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64  ..ROOTDIR="$(pwd
0110: 29 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f  )".TESTDIR="${RO
0120: 4f 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73  OTDIR}/build/tes
0130: 74 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49  t".export ROOTDI
0140: 52 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e  R TESTDIR..# Han
0150: 64 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65  dle command-line
0160: 20 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20   arguments.if [ 
0170: 22 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d  "$1" = "clean" ]
0180: 3b 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22  ; then..rm -rf "
0190: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
01a0: 0a 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c  .fi..# Create pl
01b0: 61 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a  ace to put kits.
01c0: 6d 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52  mkdir "${TESTDIR
01d0: 7d 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75  }/kits" >/dev/nu
01e0: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d  ll 2>/dev/null.m
01f0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
0200: 2f 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f  /kits/failed" >/
0210: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
0220: 6e 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22  null.if [ ! -d "
0230: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
0240: 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27   ]; then..echo '
0250: 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65  Unable to create
0260: 20 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79   kits/ directory
0270: 2c 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32  , aborting.' >&2
0280: 0a 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20  ...exit 1.fi..# 
0290: 43 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65  Cleanup.for file
02a0: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
02b0: 2f 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a  /kits/*.log; do.
02c0: 09 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65  .if echo "${file
02d0: 7d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62  }" | grep -- '-b
02e0: 75 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76  uild.log$' >/dev
02f0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f  /null; then...co
0300: 6e 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20  ntinue..fi...rm 
0310: 2d 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e  -f "${file}".don
0320: 65 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e  e..# Disable WIN
0330: 45 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45  E debugging.WINE
0340: 50 52 45 46 49 58 3d 22 24 7b 54 45 53 54 44 49  PREFIX="${TESTDI
0350: 52 7d 2f 2e 77 69 6e 65 22 0a 65 78 70 6f 72 74  R}/.wine".export
0360: 20 57 49 4e 45 50 52 45 46 49 58 0a 72 6d 20 2d   WINEPREFIX.rm -
0370: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
0380: 7d 22 0a 6d 6b 64 69 72 20 22 24 7b 57 49 4e 45  }".mkdir "${WINE
0390: 50 52 45 46 49 58 7d 22 0a 0a 63 61 74 20 3c 3c  PREFIX}"..cat <<
03a0: 20 5c 5f 45 4f 46 5f 20 3e 20 22 24 7b 57 49 4e   \_EOF_ > "${WIN
03b0: 45 50 52 45 46 49 58 7d 2f 75 70 64 61 74 65 2d  EPREFIX}/update-
03c0: 72 65 67 22 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c  reg".[HKEY_LOCAL
03d0: 5f 4d 41 43 48 49 4e 45 5c 53 6f 66 74 77 61 72  _MACHINE\Softwar
03e0: 65 5c 4d 69 63 72 6f 73 6f 66 74 5c 57 69 6e 64  e\Microsoft\Wind
03f0: 6f 77 73 20 4e 54 5c 43 75 72 72 65 6e 74 56 65  ows NT\CurrentVe
0400: 72 73 69 6f 6e 5c 41 65 44 65 62 75 67 5d 0a 22  rsion\AeDebug]."
0410: 41 75 74 6f 22 3d 64 77 6f 72 64 3a 30 30 30 30  Auto"=dword:0000
0420: 30 30 30 31 0a 22 44 65 62 75 67 67 65 72 22 3d  0001."Debugger"=
0430: 22 66 61 6c 73 65 22 0a 5f 45 4f 46 5f 0a 0a 72  "false"._EOF_..r
0440: 65 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52  egedit "${WINEPR
0450: 45 46 49 58 7d 2f 75 70 64 61 74 65 2d 72 65 67  EFIX}/update-reg
0460: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
0470: 64 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61 72  dev/null..# Star
0480: 74 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d 62  t Xvfb for X11-b
0490: 61 73 65 64 20 74 65 73 74 73 0a 58 56 46 42 5f  ased tests.XVFB_
04a0: 50 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a 33  PID="$(..Xvfb :3
04b0: 31 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30 78  1 -screen 0 800x
04c0: 36 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65 6e  600x24 -nolisten
04d0: 20 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20   tcp >/dev/null 
04e0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 65  2>/dev/null &..e
04f0: 63 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53 50  cho "$!".)".DISP
0500: 4c 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20 44  LAY=:31.export D
0510: 49 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24 7b  ISPLAY..if [ "${
0520: 42 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31 22  BIGBUILD}" = "1"
0530: 20 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d 22   ]; then..kits="
0540: 24 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c 2d  $(echo normal{,-
0550: 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68  zip,-nomk4}{,-th
0560: 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63  readed}{,-static
0570: 74 6b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d 61 6c  tk,-notk} normal
0580: 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e  {,-threaded}{,-n
0590: 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  otk}{,-nomk4}{,-
05a0: 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 77 69  debug}-kitdll wi
05b0: 6e 33 32 2d 69 35 38 36 7b 2c 2d 7a 69 70 2c 2d  n32-i586{,-zip,-
05c0: 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65  nomk4}{,-threade
05d0: 64 7d 7b 2c 2d 6e 6f 74 6b 7d 20 77 69 6e 33 32  d}{,-notk} win32
05e0: 2d 69 35 38 36 7b 2c 2d 74 68 72 65 61 64 65 64  -i586{,-threaded
05f0: 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b  }{,-notk}{,-nomk
0600: 34 7d 2d 6b 69 74 64 6c 6c 20 6d 69 6e 7b 2c 2d  4}-kitdll min{,-
0610: 73 74 61 74 69 63 7d 20 7b 6c 69 6e 75 78 2d 6d  static} {linux-m
0620: 69 70 73 65 6c 2d 6d 69 6e 2c 6c 69 6e 75 78 2d  ipsel-min,linux-
0630: 61 6d 64 36 34 2d 6e 6f 74 6b 7d 7b 2c 2d 64 65  amd64-notk}{,-de
0640: 62 75 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b  bug}{,-kitdll} {
0650: 73 6f 6c 61 72 69 73 2d 69 33 38 36 2c 73 6f 6c  solaris-i386,sol
0660: 61 72 69 73 2d 61 6d 64 36 34 2c 73 6f 6c 61 72  aris-amd64,solar
0670: 69 73 2d 73 70 61 72 63 2c 73 6f 6c 61 72 69 73  is-sparc,solaris
0680: 2d 73 70 61 72 63 36 34 2c 66 72 65 65 62 73 64  -sparc64,freebsd
0690: 2d 61 6d 64 36 34 2c 6e 65 74 62 73 64 2d 61 6d  -amd64,netbsd-am
06a0: 64 36 34 7d 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b  d64}{,-zip,-nomk
06b0: 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c  4}{,-threaded}{,
06c0: 2d 73 74 61 74 69 63 74 6b 2c 2d 6e 6f 74 6b 7d  -statictk,-notk}
06d0: 7b 2c 64 65 62 75 67 7d 20 7b 73 6f 6c 61 72 69  {,debug} {solari
06e0: 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d 61  s-i386,solaris-a
06f0: 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70 61  md64,solaris-spa
0700: 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  rc,solaris-sparc
0710: 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64,freebsd-amd64
0720: 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b 2c  ,netbsd-amd64}{,
0730: 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f 74  -threaded}{,-not
0740: 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62  k}{,-nomk4}{,deb
0750: 75 67 7d 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73  ug}-kitdll netbs
0760: 64 2d 69 33 38 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f  d-i386{,-zip,-no
0770: 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d  mk4}{,-threaded}
0780: 7b 2c 64 65 62 75 67 7d 2d 6e 6f 74 6b 20 6e 65  {,debug}-notk ne
0790: 74 62 73 64 2d 69 33 38 36 7b 2c 2d 74 68 72 65  tbsd-i386{,-thre
07a0: 61 64 65 64 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c  aded}{,-nomk4}{,
07b0: 64 65 62 75 67 7d 2d 6e 6f 74 6b 2d 6b 69 74 64  debug}-notk-kitd
07c0: 6c 6c 29 22 0a 65 6c 73 65 0a 09 6b 69 74 73 3d  ll)".else..kits=
07d0: 22 6e 6f 72 6d 61 6c 20 6e 6f 72 6d 61 6c 2d 7a  "normal normal-z
07e0: 69 70 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ip normal-thread
07f0: 65 64 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  ed normal-thread
0800: 65 64 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 73 74  ed-zip normal-st
0810: 61 74 69 63 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f  atictk normal-no
0820: 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64  tk normal-thread
0830: 65 64 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74  ed-notk normal-t
0840: 68 72 65 61 64 65 64 2d 7a 69 70 2d 6e 6f 74 6b  hreaded-zip-notk
0850: 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 20 6e 6f   normal-nomk4 no
0860: 72 6d 61 6c 2d 64 65 62 75 67 20 6d 69 6e 20 6d  rmal-debug min m
0870: 69 6e 2d 73 74 61 74 69 63 20 6e 6f 72 6d 61 6c  in-static normal
0880: 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74  -kitdll normal-t
0890: 68 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 6e  hreaded-kitdll n
08a0: 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d 6b 69 74 64 6c  ormal-notk-kitdl
08b0: 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d 6b  l normal-nomk4-k
08c0: 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d  itdll normal-nom
08d0: 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6e  k4-notk-kitdll n
08e0: 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e  ormal-threaded-n
08f0: 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d  omk4-kitdll norm
0900: 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b  al-threaded-notk
0910: 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f  -nomk4-kitdll no
0920: 72 6d 61 6c 2d 64 65 62 75 67 2d 6b 69 74 64 6c  rmal-debug-kitdl
0930: 6c 20 6d 69 6e 2d 6b 69 74 64 6c 6c 20 77 69 6e  l min-kitdll win
0940: 33 32 2d 69 35 38 36 20 77 69 6e 33 32 2d 69 35  32-i586 win32-i5
0950: 38 36 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35 38  86-zip win32-i58
0960: 36 2d 74 68 72 65 61 64 65 64 20 77 69 6e 33 32  6-threaded win32
0970: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 7a  -i586-threaded-z
0980: 69 70 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f  ip win32-i586-no
0990: 74 6b 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68  tk win32-i586-th
09a0: 72 65 61 64 65 64 2d 6e 6f 74 6b 20 77 69 6e 33  readed-notk win3
09b0: 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 20 77 69 6e  2-i586-nomk4 win
09c0: 33 32 2d 69 35 38 36 2d 6b 69 74 64 6c 6c 20 77  32-i586-kitdll w
09d0: 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61 64  in32-i586-thread
09e0: 65 64 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  ed-kitdll win32-
09f0: 69 35 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c  i586-notk-kitdll
0a00: 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b   win32-i586-nomk
0a10: 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69  4-kitdll win32-i
0a20: 35 38 36 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b  586-nomk4-notk-k
0a30: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
0a40: 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d  -threaded-nomk4-
0a50: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
0a60: 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b 2d  6-threaded-notk-
0a70: 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6c 69 6e  nomk4-kitdll lin
0a80: 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 20 6c 69  ux-mipsel-min li
0a90: 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b  nux-mipsel-min-k
0aa0: 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36  itdll linux-amd6
0ab0: 34 2d 6e 6f 74 6b 20 6c 69 6e 75 78 2d 61 6d 64  4-notk linux-amd
0ac0: 36 34 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 6c 69  64-notk-debug li
0ad0: 6e 75 78 2d 61 6d 64 36 34 2d 6e 6f 74 6b 2d 6b  nux-amd64-notk-k
0ae0: 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36  itdll linux-amd6
0af0: 34 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74  4-notk-debug-kit
0b00: 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 69 33 38 36  dll solaris-i386
0b10: 20 73 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64 65   solaris-i386-de
0b20: 62 75 67 20 73 6f 6c 61 72 69 73 2d 69 33 38 36  bug solaris-i386
0b30: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0b40: 69 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c  i386-debug-kitdl
0b50: 6c 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 20  l solaris-amd64 
0b60: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65  solaris-amd64-de
0b70: 62 75 67 20 73 6f 6c 61 72 69 73 2d 61 6d 64 36  bug solaris-amd6
0b80: 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  4-kitdll solaris
0b90: 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74  -amd64-debug-kit
0ba0: 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72  dll solaris-spar
0bb0: 63 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d  c solaris-sparc-
0bc0: 64 65 62 75 67 20 73 6f 6c 61 72 69 73 2d 73 70  debug solaris-sp
0bd0: 61 72 63 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  arc-kitdll solar
0be0: 69 73 2d 73 70 61 72 63 2d 64 65 62 75 67 2d 6b  is-sparc-debug-k
0bf0: 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70  itdll solaris-sp
0c00: 61 72 63 36 34 20 73 6f 6c 61 72 69 73 2d 73 70  arc64 solaris-sp
0c10: 61 72 63 36 34 2d 64 65 62 75 67 20 73 6f 6c 61  arc64-debug sola
0c20: 72 69 73 2d 73 70 61 72 63 36 34 2d 6b 69 74 64  ris-sparc64-kitd
0c30: 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ll solaris-sparc
0c40: 36 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20  64-debug-kitdll 
0c50: 66 72 65 65 62 73 64 2d 61 6d 64 36 34 20 66 72  freebsd-amd64 fr
0c60: 65 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75  eebsd-amd64-debu
0c70: 67 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d  g freebsd-amd64-
0c80: 6b 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61  kitdll freebsd-a
0c90: 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64 6c  md64-debug-kitdl
0ca0: 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f  l netbsd-i386-no
0cb0: 74 6b 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e  tk netbsd-i386-n
0cc0: 6f 74 6b 2d 64 65 62 75 67 20 6e 65 74 62 73 64  otk-debug netbsd
0cd0: 2d 69 33 38 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c  -i386-notk-kitdl
0ce0: 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f  l netbsd-i386-no
0cf0: 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20  tk-debug-kitdll 
0d00: 6e 65 74 62 73 64 2d 61 6d 64 36 34 20 6e 65 74  netbsd-amd64 net
0d10: 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 20  bsd-amd64-debug 
0d20: 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 6b 69 74  netbsd-amd64-kit
0d30: 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36 34  dll netbsd-amd64
0d40: 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 22 0a 66  -debug-kitdll".f
0d50: 69 0a 0a 66 61 69 6c 65 64 3d 22 22 0a 66 6f 72  i..failed="".for
0d60: 20 6b 69 74 20 69 6e 20 24 6b 69 74 73 3b 20 64   kit in $kits; d
0d70: 6f 0a 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e  o..kitcreator=".
0d80: 2f 6b 69 74 63 72 65 61 74 6f 72 22 0a 09 61 72  /kitcreator"..ar
0d90: 67 73 3d 22 22 0a 09 72 75 6e 6e 61 62 6c 65 3d  gs=""..runnable=
0da0: 22 31 22 0a 09 69 73 7a 69 70 3d 22 30 22 0a 09  "1"..iszip="0"..
0db0: 73 74 61 74 69 63 74 6b 3d 22 30 22 0a 09 6e 6f  statictk="0"..no
0dc0: 74 6b 3d 22 30 22 0a 09 6e 6f 6d 6b 34 3d 22 30  tk="0"..nomk4="0
0dd0: 22 0a 09 78 63 6f 6d 70 69 6c 65 3d 22 30 22 0a  "..xcompile="0".
0de0: 09 6b 69 74 64 6c 6c 3d 22 30 22 0a 09 6b 69 74  .kitdll="0"..kit
0df0: 72 75 6e 63 6d 64 3d 22 22 0a 0a 09 23 20 48 61  runcmd=""...# Ha
0e00: 6e 64 6c 65 20 62 61 73 65 20 63 6f 6e 66 69 67  ndle base config
0e10: 75 72 61 74 69 6f 6e 0a 09 6f 73 3d 22 24 28 75  uration..os="$(u
0e20: 6e 61 6d 65 20 2d 73 20 7c 20 64 64 20 63 6f 6e  name -s | dd con
0e30: 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e  v=lcase 2>/dev/n
0e40: 75 6c 6c 29 22 0a 09 63 70 75 3d 22 24 28 75 6e  ull)"..cpu="$(un
0e50: 61 6d 65 20 2d 6d 20 7c 20 64 64 20 63 6f 6e 76  ame -m | dd conv
0e60: 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e 75  =lcase 2>/dev/nu
0e70: 6c 6c 29 22 0a 09 63 61 73 65 20 22 24 7b 6b 69  ll)"..case "${ki
0e80: 74 7d 22 20 69 6e 0a 09 09 6e 6f 72 6d 61 6c 7c  t}" in...normal|
0e90: 6e 6f 72 6d 61 6c 2d 2a 29 0a 09 09 09 6b 69 74  normal-*)....kit
0ea0: 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d  ="$(echo "${kit}
0eb0: 22 20 7c 20 73 65 64 20 22 73 40 5e 6e 6f 72 6d  " | sed "s@^norm
0ec0: 61 6c 40 24 6f 73 2d 24 63 70 75 40 22 29 22 0a  al@$os-$cpu@")".
0ed0: 09 09 09 3b 3b 0a 09 09 6d 69 6e 7c 6d 69 6e 2d  ...;;...min|min-
0ee0: 6b 69 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63 72  kitdll)....kitcr
0ef0: 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d  eator="./build/m
0f00: 61 6b 65 2d 6d 69 6e 6b 69 74 22 0a 09 09 09 69  ake-minkit"....i
0f10: 73 7a 69 70 3d 22 31 22 0a 09 09 09 6e 6f 74 6b  szip="1"....notk
0f20: 3d 22 31 22 0a 09 09 09 6b 69 74 3d 22 24 28 65  ="1"....kit="$(e
0f30: 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73  cho "${kit}" | s
0f40: 65 64 20 22 73 40 5e 6d 69 6e 40 24 6f 73 2d 24  ed "s@^min@$os-$
0f50: 63 70 75 2d 6d 69 6e 40 22 29 22 0a 09 09 09 3b  cpu-min@")"....;
0f60: 3b 0a 09 09 6d 69 6e 2d 73 74 61 74 69 63 29 0a  ;...min-static).
0f70: 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e  ...kitcreator=".
0f80: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b  /build/make-mink
0f90: 69 74 2d 73 74 61 74 69 63 22 0a 09 09 09 69 73  it-static"....is
0fa0: 7a 69 70 3d 22 31 22 0a 09 09 09 6e 6f 74 6b 3d  zip="1"....notk=
0fb0: 22 31 22 0a 09 09 09 6b 69 74 3d 22 24 7b 6f 73  "1"....kit="${os
0fc0: 7d 2d 24 7b 63 70 75 7d 2d 6d 69 6e 2d 73 74 61  }-${cpu}-min-sta
0fd0: 74 69 63 22 0a 09 09 09 3b 3b 0a 09 09 77 69 6e  tic"....;;...win
0fe0: 33 32 7c 77 69 6e 33 32 2d 2a 29 0a 09 09 09 6b  32|win32-*)....k
0ff0: 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69  itcreator="./bui
1000: 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 77 69 6e 33  ld/make-kit-win3
1010: 32 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22  2"....xcompile="
1020: 31 22 0a 09 09 09 6b 69 74 72 75 6e 63 6d 64 3d  1"....kitruncmd=
1030: 22 77 69 6e 65 22 0a 09 09 09 3b 3b 0a 09 09 6c  "wine"....;;...l
1040: 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 7c  inux-mipsel-min|
1050: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e  linux-mipsel-min
1060: 2d 6b 69 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63  -kitdll)....kitc
1070: 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f  reator="./build/
1080: 6d 61 6b 65 2d 6b 69 74 2d 6d 69 70 73 65 6c 22  make-kit-mipsel"
1090: 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22  ....runnable="0"
10a0: 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22  ....xcompile="1"
10b0: 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
10c0: 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 3b 3b 0a  iszip="1"....;;.
10d0: 09 09 6c 69 6e 75 78 2d 61 6d 64 36 34 7c 6c 69  ..linux-amd64|li
10e0: 6e 75 78 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09  nux-amd64-*|\...
10f0: 73 6f 6c 61 72 69 73 2d 69 33 38 36 7c 73 6f 6c  solaris-i386|sol
1100: 61 72 69 73 2d 69 33 38 36 2d 2a 7c 5c 0a 09 09  aris-i386-*|\...
1110: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 7c 73 6f  solaris-amd64|so
1120: 6c 61 72 69 73 2d 61 6d 64 36 34 2d 2a 7c 5c 0a  laris-amd64-*|\.
1130: 09 09 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 7c  ..solaris-sparc|
1140: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 2a 7c  solaris-sparc-*|
1150: 5c 0a 09 09 73 6f 6c 61 72 69 73 2d 73 70 61 72  \...solaris-spar
1160: 63 36 34 7c 73 6f 6c 61 72 69 73 2d 73 70 61 72  c64|solaris-spar
1170: 63 36 34 2d 2a 7c 5c 0a 09 09 66 72 65 65 62 73  c64-*|\...freebs
1180: 64 2d 61 6d 64 36 34 7c 66 72 65 65 62 73 64 2d  d-amd64|freebsd-
1190: 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 6e 65 74 62  amd64-*|\...netb
11a0: 73 64 2d 69 33 38 36 7c 6e 65 74 62 73 64 2d 69  sd-i386|netbsd-i
11b0: 33 38 36 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64  386-*|\...netbsd
11c0: 2d 61 6d 64 36 34 7c 6e 65 74 62 73 64 2d 61 6d  -amd64|netbsd-am
11d0: 64 36 34 2d 2a 7c 5c 0a 09 09 68 70 75 78 2d 68  d64-*|\...hpux-h
11e0: 70 70 61 36 34 7c 68 70 75 78 2d 68 70 70 61 36  ppa64|hpux-hppa6
11f0: 34 2d 2a 29 0a 09 09 09 70 6c 61 74 66 6f 72 6d  4-*)....platform
1200: 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d  ="$(echo "${kit}
1210: 22 20 7c 20 63 75 74 20 2d 66 20 31 2d 32 20 2d  " | cut -f 1-2 -
1220: 64 20 27 2d 27 29 22 0a 09 09 09 6b 69 74 63 72  d '-')"....kitcr
1230: 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d  eator="./build/m
1240: 61 6b 65 2d 6b 69 74 2d 24 7b 70 6c 61 74 66 6f  ake-kit-${platfo
1250: 72 6d 7d 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65  rm}"....runnable
1260: 3d 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65  ="0"....xcompile
1270: 3d 22 31 22 0a 09 09 09 69 73 7a 69 70 3d 22 30  ="1"....iszip="0
1280: 22 0a 0a 09 09 09 69 66 20 65 63 68 6f 20 22 24  ".....if echo "$
1290: 7b 6b 69 74 7d 22 20 7c 20 65 67 72 65 70 20 2d  {kit}" | egrep -
12a0: 2d 20 27 2d 28 68 70 70 61 36 34 7c 61 6d 64 36  - '-(hppa64|amd6
12b0: 34 7c 73 70 61 72 63 36 34 29 2d 27 20 3e 2f 64  4|sparc64)-' >/d
12c0: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
12d0: 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20  ..args="${args} 
12e0: 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74 22 0a  --enable-64bit".
12f0: 09 09 09 66 69 0a 09 09 09 3b 3b 0a 09 65 73 61  ...fi....;;..esa
1300: 63 0a 0a 09 69 66 20 5b 20 22 24 7b 78 63 6f 6d  c...if [ "${xcom
1310: 70 69 6c 65 7d 22 20 21 3d 20 22 30 22 20 5d 3b  pile}" != "0" ];
1320: 20 74 68 65 6e 0a 09 09 6b 69 74 3d 22 24 7b 6b   then...kit="${k
1330: 69 74 7d 2d 78 63 6f 6d 70 69 6c 65 22 0a 09 66  it}-xcompile"..f
1340: 69 0a 0a 09 23 20 48 61 6e 64 6c 65 20 61 64 64  i...# Handle add
1350: 69 74 69 6f 6e 61 6c 20 63 6f 6e 66 69 67 75 72  itional configur
1360: 61 74 69 6f 6e 0a 09 74 65 6d 70 6b 69 74 3d 22  ation..tempkit="
1370: 2d 24 7b 6b 69 74 7d 2d 22 0a 09 66 6f 72 20 74  -${kit}-"..for t
1380: 72 79 20 69 6e 20 31 20 32 20 33 20 34 20 35 20  ry in 1 2 3 4 5 
1390: 36 20 37 20 38 20 39 3b 20 64 6f 0a 09 09 63 61  6 7 8 9; do...ca
13a0: 73 65 20 22 2d 24 7b 74 65 6d 70 6b 69 74 7d 2d  se "-${tempkit}-
13b0: 22 20 69 6e 0a 09 09 09 2a 2d 74 68 72 65 61 64  " in....*-thread
13c0: 65 64 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69  ed-*).....tempki
13d0: 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d  t="$(echo "${tem
13e0: 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40  pkit}" | sed 's@
13f0: 2d 74 68 72 65 61 64 65 64 2d 40 2d 40 27 29 22  -threaded-@-@')"
1400: 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67  .....args="${arg
1410: 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65  s} --enable-thre
1420: 61 64 73 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a  ads".....;;....*
1430: 2d 7a 69 70 2d 2a 29 0a 09 09 09 09 74 65 6d 70  -zip-*).....temp
1440: 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74  kit="$(echo "${t
1450: 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27  empkit}" | sed '
1460: 73 40 2d 7a 69 70 2d 40 2d 40 27 29 22 0a 09 09  s@-zip-@-@')"...
1470: 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20  ..args="${args} 
1480: 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f  --enable-kit-sto
1490: 72 61 67 65 3d 7a 69 70 22 0a 09 09 09 09 69 73  rage=zip".....is
14a0: 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09  zip="1".....;;..
14b0: 09 09 2a 2d 73 74 61 74 69 63 74 6b 2d 2a 29 0a  ..*-statictk-*).
14c0: 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65  ....tempkit="$(e
14d0: 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22  cho "${tempkit}"
14e0: 20 7c 20 73 65 64 20 27 73 40 2d 73 74 61 74 69   | sed 's@-stati
14f0: 63 74 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09 69  ctk-@-@')".....i
1500: 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20  f [ "${notk}" = 
1510: 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "0" ]; then.....
1520: 09 73 74 61 74 69 63 74 6b 3d 22 31 22 0a 09 09  .statictk="1"...
1530: 09 09 65 6c 73 65 0a 09 09 09 09 09 65 63 68 6f  ..else......echo
1540: 20 22 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c 65   "${kit}: Unable
1550: 20 74 6f 20 63 72 65 61 74 65 20 53 74 61 74 69   to create Stati
1560: 63 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69 67  cTk and NoTk, ig
1570: 6e 6f 72 69 6e 67 20 53 74 61 74 69 63 54 6b 22  noring StaticTk"
1580: 20 3e 26 32 0a 09 09 09 09 66 69 0a 09 09 09 09   >&2.....fi.....
1590: 3b 3b 0a 09 09 09 2a 2d 6e 6f 74 6b 2d 2a 29 0a  ;;....*-notk-*).
15a0: 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65  ....tempkit="$(e
15b0: 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22  cho "${tempkit}"
15c0: 20 7c 20 73 65 64 20 27 73 40 2d 6e 6f 74 6b 2d   | sed 's@-notk-
15d0: 40 2d 40 27 29 22 0a 09 09 09 09 69 66 20 5b 20  @-@')".....if [ 
15e0: 22 24 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d 20  "${statictk}" = 
15f0: 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "0" ]; then.....
1600: 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c  .notk="1".....el
1610: 73 65 0a 09 09 09 09 09 65 63 68 6f 20 22 24 7b  se......echo "${
1620: 6b 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20  kit}: Unable to 
1630: 63 72 65 61 74 65 20 53 74 61 74 69 63 54 6b 20  create StaticTk 
1640: 61 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69  and NoTk, ignori
1650: 6e 67 20 4e 6f 54 6b 22 20 3e 26 32 0a 09 09 09  ng NoTk" >&2....
1660: 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d  .fi.....;;....*-
1670: 6e 6f 6d 6b 34 2d 2a 29 0a 09 09 09 09 74 65 6d  nomk4-*).....tem
1680: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1690: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
16a0: 27 73 40 2d 6e 6f 6d 6b 34 2d 40 2d 40 27 29 22  's@-nomk4-@-@')"
16b0: 0a 09 09 09 09 6e 6f 6d 6b 34 3d 22 31 22 0a 09  .....nomk4="1"..
16c0: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
16d0: 09 3b 3b 0a 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d  .;;....*-kitdll-
16e0: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
16f0: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1700: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6b 69  t}" | sed 's@-ki
1710: 74 64 6c 6c 2d 40 2d 40 27 29 22 0a 09 09 09 09  tdll-@-@')".....
1720: 6b 69 74 64 6c 6c 3d 22 31 22 0a 09 09 09 09 3b  kitdll="1".....;
1730: 3b 0a 09 09 09 2a 2d 64 65 62 75 67 2d 2a 29 0a  ;....*-debug-*).
1740: 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65  ....tempkit="$(e
1750: 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22  cho "${tempkit}"
1760: 20 7c 20 73 65 64 20 27 73 40 2d 64 65 62 75 67   | sed 's@-debug
1770: 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73  -@-@')".....args
1780: 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62  ="${args} --enab
1790: 6c 65 2d 73 79 6d 62 6f 6c 73 22 0a 09 09 09 09  le-symbols".....
17a0: 3b 3b 0a 09 09 65 73 61 63 0a 09 64 6f 6e 65 0a  ;;...esac..done.
17b0: 0a 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
17c0: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
17d0: 0a 09 09 23 20 43 75 72 72 65 6e 74 6c 79 20 6e  ...# Currently n
17e0: 6f 20 4b 69 74 44 4c 4c 20 75 73 65 73 20 5a 69  o KitDLL uses Zi
17f0: 70 0a 09 09 69 73 7a 69 70 3d 22 30 22 0a 09 66  p...iszip="0"..f
1800: 69 0a 0a 09 66 6f 72 20 76 65 72 73 69 6f 6e 20  i...for version 
1810: 69 6e 20 24 7b 56 45 52 53 49 4f 4e 53 7d 3b 20  in ${VERSIONS}; 
1820: 64 6f 0a 09 09 23 20 57 6f 72 6b 20 61 72 6f 75  do...# Work arou
1830: 6e 64 20 63 68 61 6e 67 65 73 20 69 6e 20 64 65  nd changes in de
1840: 66 61 75 6c 74 20 62 65 68 61 76 69 6f 75 72 0a  fault behaviour.
1850: 09 09 69 66 20 5b 20 22 24 7b 76 65 72 73 69 6f  ..if [ "${versio
1860: 6e 7d 22 20 3d 20 22 63 76 73 5f 48 45 41 44 22  n}" = "cvs_HEAD"
1870: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 6b 69 74 3d   ]; then....kit=
1880: 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22  "$(echo "${kit}"
1890: 20 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65 61   | sed 's@-threa
18a0: 64 65 64 40 2d 75 6e 74 68 72 65 61 64 65 64 40  ded@-unthreaded@
18b0: 27 29 22 0a 09 09 09 61 72 67 73 3d 22 24 28 65  ')"....args="$(e
18c0: 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20  cho "${args}" | 
18d0: 73 65 64 20 27 73 40 20 2d 2d 65 6e 61 62 6c 65  sed 's@ --enable
18e0: 2d 74 68 72 65 61 64 73 40 20 2d 2d 64 69 73 61  -threads@ --disa
18f0: 62 6c 65 2d 74 68 72 65 61 64 73 40 27 29 22 0a  ble-threads@')".
1900: 09 09 66 69 0a 0a 09 09 23 20 43 72 65 61 74 65  ..fi....# Create
1910: 20 54 63 6c 6b 69 74 0a 09 09 69 66 20 5b 20 22   Tclkit...if [ "
1920: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
1930: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61   ]; then....crea
1940: 74 65 64 6b 69 74 3d 22 6c 69 62 74 63 6c 6b 69  tedkit="libtclki
1950: 74 2a 2e 64 6c 6c 20 6c 69 62 74 63 6c 6b 69 74  t*.dll libtclkit
1960: 2a 2e 2a 22 0a 09 09 09 6f 75 74 70 75 74 6e 61  *.*"....outputna
1970: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1980: 69 74 73 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b  its/libtclkit-${
1990: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22  version}-${kit}"
19a0: 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e 61  ....failoutputna
19b0: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
19c0: 69 74 73 2f 66 61 69 6c 65 64 2f 6c 69 62 74 63  its/failed/libtc
19d0: 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d  lkit-${version}-
19e0: 24 7b 6b 69 74 7d 22 0a 09 09 09 73 64 6b 3d 22  ${kit}"....sdk="
19f0: 24 28 65 63 68 6f 20 6c 69 62 74 63 6c 6b 69 74  $(echo libtclkit
1a00: 2d 73 64 6b 2d 2a 2e 74 61 72 2e 67 7a 29 22 0a  -sdk-*.tar.gz)".
1a10: 09 09 65 6c 73 65 0a 09 09 09 63 72 65 61 74 65  ..else....create
1a20: 64 6b 69 74 3d 22 74 63 6c 6b 69 74 2d 24 7b 76  dkit="tclkit-${v
1a30: 65 72 73 69 6f 6e 7d 22 0a 09 09 09 6f 75 74 70  ersion}"....outp
1a40: 75 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49  utname="${TESTDI
1a50: 52 7d 2f 6b 69 74 73 2f 74 63 6c 6b 69 74 2d 24  R}/kits/tclkit-$
1a60: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
1a70: 22 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e  "....failoutputn
1a80: 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f  ame="${TESTDIR}/
1a90: 6b 69 74 73 2f 66 61 69 6c 65 64 2f 74 63 6c 6b  kits/failed/tclk
1aa0: 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b  it-${version}-${
1ab0: 6b 69 74 7d 22 0a 09 09 09 73 64 6b 3d 27 27 0a  kit}"....sdk=''.
1ac0: 09 09 66 69 0a 09 09 62 75 69 6c 64 6c 6f 67 3d  ..fi...buildlog=
1ad0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62  "${outputname}-b
1ae0: 75 69 6c 64 2e 6c 6f 67 22 0a 09 09 66 61 69 6c  uild.log"...fail
1af0: 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 66 61 69 6c  buildlog="${fail
1b00: 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c  outputname}-buil
1b10: 64 2e 6c 6f 67 22 0a 09 09 74 65 73 74 72 65 73  d.log"...testres
1b20: 75 6c 74 73 6c 6f 67 3d 22 24 7b 6f 75 74 70 75  ultslog="${outpu
1b30: 74 6e 61 6d 65 7d 2d 74 65 73 74 73 2e 6c 6f 67  tname}-tests.log
1b40: 22 0a 0a 09 09 69 66 20 5b 20 21 20 2d 66 20 22  "....if [ ! -f "
1b50: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d  ${outputname}" ]
1b60: 3b 20 74 68 65 6e 0a 09 09 09 75 6e 73 65 74 20  ; then....unset 
1b70: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20  KITCREATOR_PKGS 
1b80: 53 54 41 54 49 43 54 4b 20 53 54 52 49 50 0a 0a  STATICTK STRIP..
1b90: 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 66 61  ...if [ -f "${fa
1ba0: 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d  iloutputname}" ]
1bb0: 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20  ; then.....echo 
1bc0: 22 53 6b 69 70 70 69 6e 67 20 72 65 62 75 69 6c  "Skipping rebuil
1bd0: 64 69 6e 67 20 66 61 69 6c 65 64 20 6b 69 74 20  ding failed kit 
1be0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
1bf0: 7d 20 2e 2e 2e 22 0a 0a 09 09 09 09 66 61 69 6c  } ..."......fail
1c00: 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b  ed="${failed} ${
1c10: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d  version}/${kit}-
1c20: 62 75 69 6c 64 22 0a 0a 09 09 09 09 63 6f 6e 74  build"......cont
1c30: 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 72  inue....fi.....r
1c40: 6d 20 2d 66 20 74 63 6c 73 68 0a 09 09 09 2e 2f  m -f tclsh...../
1c50: 6b 69 74 63 72 65 61 74 6f 72 20 63 6c 65 61 6e  kitcreator clean
1c60: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
1c70: 65 76 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63 68 6f  ev/null.....echo
1c80: 20 22 43 72 65 61 74 69 6e 67 20 54 63 6c 6b 69   "Creating Tclki
1c90: 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  t ${version}/${k
1ca0: 69 74 7d 2e 2e 2e 22 0a 09 09 09 65 63 68 6f 20  it}..."....echo 
1cb0: 22 20 2a 2a 2a 20 42 75 69 6c 64 20 73 74 61 72  " *** Build star
1cc0: 74 65 64 20 24 28 77 68 6f 61 6d 69 29 40 24 28  ted $(whoami)@$(
1cd0: 68 6f 73 74 6e 61 6d 65 29 20 6f 6e 20 24 28 64  hostname) on $(d
1ce0: 61 74 65 29 22 20 3e 20 22 24 7b 62 75 69 6c 64  ate)" > "${build
1cf0: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
1d00: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
1d10: 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20  "....echo " *** 
1d20: 42 75 69 6c 64 20 53 63 72 69 70 74 22 20 3e 3e  Build Script" >>
1d30: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a   "${buildlog}"..
1d40: 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d  ...if [ "${notk}
1d50: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
1d60: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
1d70: 4b 47 53 3d 27 69 74 63 6c 20 6d 6b 34 74 63 6c  KGS='itcl mk4tcl
1d80: 27 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b  '....fi.....if [
1d90: 20 22 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31   "${nomk4}" = "1
1da0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 69 66  " ]; then.....if
1db0: 20 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52 45 41   [ -z "${KITCREA
1dc0: 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68  TOR_PKGS}" ]; th
1dd0: 65 6e 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54  en......KITCREAT
1de0: 4f 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20 74 6b  OR_PKGS='itcl tk
1df0: 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09  '.....else......
1e00: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
1e10: 22 24 28 65 63 68 6f 20 22 24 7b 4b 49 54 43 52  "$(echo "${KITCR
1e20: 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 7c 20 73  EATOR_PKGS}" | s
1e30: 65 64 20 27 73 40 6d 6b 34 74 63 6c 40 40 27 29  ed 's@mk4tcl@@')
1e40: 22 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a  ".....fi....fi..
1e50: 09 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c  ...if [ "${kitdl
1e60: 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  l}" = "1" ]; the
1e70: 6e 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20 22 24  n.....if [ -z "$
1e80: 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53  {KITCREATOR_PKGS
1e90: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09  }" ]; then......
1ea0: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
1eb0: 27 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 20  'tk itcl mk4tcl 
1ec0: 6b 69 74 64 6c 6c 27 0a 09 09 09 09 65 6c 73 65  kitdll'.....else
1ed0: 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52  ......KITCREATOR
1ee0: 5f 50 4b 47 53 3d 22 24 7b 4b 49 54 43 52 45 41  _PKGS="${KITCREA
1ef0: 54 4f 52 5f 50 4b 47 53 7d 20 6b 69 74 64 6c 6c  TOR_PKGS} kitdll
1f00: 22 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a  ".....fi....fi..
1f10: 09 09 09 65 78 70 6f 72 74 20 4b 49 54 43 52 45  ...export KITCRE
1f20: 41 54 4f 52 5f 50 4b 47 53 0a 0a 09 09 09 69 66  ATOR_PKGS.....if
1f30: 20 5b 20 2d 6e 20 22 24 7b 4b 49 54 43 52 45 41   [ -n "${KITCREA
1f40: 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68  TOR_PKGS}" ]; th
1f50: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 20 20 4b  en.....echo "  K
1f60: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 5c  ITCREATOR_PKGS=\
1f70: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
1f80: 47 53 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69  GS}\"" >> "${bui
1f90: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f  ldlog}".....echo
1fa0: 20 22 20 20 65 78 70 6f 72 74 20 4b 49 54 43 52   "  export KITCR
1fb0: 45 41 54 4f 52 5f 50 4b 47 53 22 20 3e 3e 20 22  EATOR_PKGS" >> "
1fc0: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
1fd0: 66 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 73  fi.....if [ "${s
1fe0: 74 61 74 69 63 74 6b 7d 22 20 3d 20 22 31 22 20  tatictk}" = "1" 
1ff0: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 41 54  ]; then.....STAT
2000: 49 43 54 4b 3d 22 31 22 0a 09 09 09 09 65 78 70  ICTK="1".....exp
2010: 6f 72 74 20 53 54 41 54 49 43 54 4b 0a 0a 09 09  ort STATICTK....
2020: 09 09 65 63 68 6f 20 22 20 20 53 54 41 54 49 43  ..echo "  STATIC
2030: 54 4b 3d 5c 22 24 7b 53 54 41 54 49 43 54 4b 7d  TK=\"${STATICTK}
2040: 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  \"" >> "${buildl
2050: 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20  og}".....echo " 
2060: 20 65 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b   export STATICTK
2070: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
2080: 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20  }"....fi.....if 
2090: 65 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c  echo "${args}" |
20a0: 20 67 72 65 70 20 2d 2d 20 27 2d 2d 65 6e 61 62   grep -- '--enab
20b0: 6c 65 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f 64 65  le-symbols' >/de
20c0: 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09  v/null; then....
20d0: 09 53 54 52 49 50 3d 27 74 72 75 65 27 0a 09 09  .STRIP='true'...
20e0: 09 09 65 78 70 6f 72 74 20 53 54 52 49 50 0a 0a  ..export STRIP..
20f0: 09 09 09 09 65 63 68 6f 20 22 20 20 53 54 52 49  ....echo "  STRI
2100: 50 3d 27 74 72 75 65 27 22 20 3e 3e 20 22 24 7b  P='true'" >> "${
2110: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65  buildlog}".....e
2120: 63 68 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54  cho "  export ST
2130: 52 49 50 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  RIP" >> "${build
2140: 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09  log}"....fi.....
2150: 69 66 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74  if [ "${kitcreat
2160: 6f 72 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72  or}" != "./kitcr
2170: 65 61 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09  eator" ]; then..
2180: 09 09 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72  ...echo "  mkdir
2190: 20 62 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75   build" >> "${bu
21a0: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20  ildlog}"......# 
21b0: 53 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63  Several build sc
21c0: 72 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69  ripts rely on mi
21d0: 6e 6b 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09  nkit to work....
21e0: 09 69 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c  .if grep './buil
21f0: 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22  d/make-minkit' "
2200: 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e  ${kitcreator}" >
2210: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
2220: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2230: 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20  .echo "  cat << 
2240: 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69  \__EOF__ > ./bui
2250: 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20  ld/make-minkit" 
2260: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2270: 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ......sed 's@^@ 
2280: 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61   @'  './build/ma
2290: 6b 65 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24  ke-minkit' >> "$
22a0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
22b0: 09 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f  .echo "  __EOF__
22c0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
22d0: 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20  }"......echo '' 
22e0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
22f0: 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53  .....fi......# S
2300: 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72  everal build scr
2310: 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b  ipts rely on mak
2320: 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69  e-kit-crosscompi
2330: 6c 65 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69  le to work.....i
2340: 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f  f grep './build/
2350: 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f  make-kit-crossco
2360: 6d 70 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65  mpile' "${kitcre
2370: 61 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c  ator}" >/dev/nul
2380: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  l 2>/dev/null; t
2390: 68 65 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20  hen......echo " 
23a0: 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f   cat << \__EOF__
23b0: 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d   > ./build/make-
23c0: 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65  kit-crosscompile
23d0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
23e0: 7d 22 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e  }"......sed 's@^
23f0: 40 20 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f  @  @'  './build/
2400: 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f  make-kit-crossco
2410: 6d 70 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69  mpile' >> "${bui
2420: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68  ldlog}"......ech
2430: 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e  o "  __EOF__" >>
2440: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2450: 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
2460: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2470: 09 66 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20  .fi......echo " 
2480: 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f   cat << \__EOF__
2490: 20 3e 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d   > ${kitcreator}
24a0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
24b0: 7d 22 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40  }".....sed 's@^@
24c0: 20 20 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61    @'  "${kitcrea
24d0: 74 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c  tor}" >> "${buil
24e0: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
24f0: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
2500: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2510: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
2520: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a  uildlog}"....fi.
2530: 09 09 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b  ...echo "  \"${k
2540: 69 74 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24  itcreator}\" \"$
2550: 7b 76 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72  {version}\" ${ar
2560: 67 73 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  gs}" >> "${build
2570: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
2580: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2590: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
25a0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
25b0: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
25c0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
25d0: 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65  o " *** Build Re
25e0: 73 75 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69  sults" >> "${bui
25f0: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2600: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2610: 67 7d 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69  g}".....buildfai
2620: 6c 65 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69  led="0"...."${ki
2630: 74 63 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65  tcreator}" "${ve
2640: 72 73 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20  rsion}" ${args} 
2650: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2660: 20 32 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61   2>&1 || buildfa
2670: 69 6c 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70  iled="1"....grep
2680: 20 2d 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e   -n '^' */build.
2690: 6c 6f 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  log >> "${buildl
26a0: 6f 67 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66  og}" 2>&1.....if
26b0: 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d   [ "${kitdll}" =
26c0: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
26d0: 09 23 20 43 72 65 61 74 65 20 74 65 73 74 20 64  .# Create test d
26e0: 72 69 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c  rivers for KitDL
26f0: 4c 0a 09 09 09 09 28 0a 09 09 09 09 09 65 63 68  L.....(......ech
2700: 6f 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22  o ""......echo "
2710: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09  "......echo ""..
2720: 09 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42  ....echo " *** B
2730: 75 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74  uilding KitDLL t
2740: 65 73 74 20 64 72 69 76 65 72 20 28 74 63 6c 73  est driver (tcls
2750: 68 29 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22  h)"......echo ""
2760: 0a 0a 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f  .......cd kitsh/
2770: 62 75 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c  build/kitsh-*/ |
2780: 7c 20 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61  | exit 1......ma
2790: 6b 65 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70  ke tclsh......cp
27a0: 20 74 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f   tclsh ../../../
27b0: 0a 09 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69  .....) >> "${bui
27c0: 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09  ldlog}" 2>&1....
27d0: 66 69 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d  fi.....# Perform
27e0: 20 77 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73   wildcard expans
27f0: 69 6f 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  ion....createdki
2800: 74 3d 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72  t="$(ls -f1 ${cr
2810: 65 61 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76  eatedkit} 2>/dev
2820: 2f 6e 75 6c 6c 20 7c 20 67 72 65 70 20 2d 76 20  /null | grep -v 
2830: 27 5c 2e 74 61 72 5c 2e 67 7a 24 27 20 7c 20 68  '\.tar\.gz$' | h
2840: 65 61 64 20 2d 6e 20 31 29 22 0a 0a 09 09 09 69  ead -n 1)".....i
2850: 66 20 5b 20 21 20 2d 66 20 22 24 7b 63 72 65 61  f [ ! -f "${crea
2860: 74 65 64 6b 69 74 7d 22 20 5d 3b 20 74 68 65 6e  tedkit}" ]; then
2870: 0a 09 09 09 09 65 63 68 6f 20 22 46 61 69 6c 65  .....echo "Faile
2880: 64 20 74 6f 20 63 72 65 61 74 65 20 6b 69 74 20  d to create kit 
2890: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
28a0: 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c  }" >&2......fail
28b0: 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b  ed="${failed} ${
28c0: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d  version}/${kit}-
28d0: 62 75 69 6c 64 22 0a 0a 09 09 09 09 74 6f 75 63  build"......touc
28e0: 68 20 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e  h "${failoutputn
28f0: 61 6d 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b  ame}".....mv "${
2900: 62 75 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61  buildlog}" "${fa
2910: 69 6c 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09  ilbuildlog}"....
2920: 09 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09  ..rm -f tclsh...
2930: 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66  ...continue....f
2940: 69 0a 0a 09 09 09 23 20 56 65 72 69 66 79 20 73  i.....# Verify s
2950: 61 6e 69 74 79 20 6f 66 20 63 72 65 61 74 65 64  anity of created
2960: 20 6b 69 74 0a 09 09 09 69 73 73 61 6e 65 3d 31   kit....issane=1
2970: 0a 0a 09 09 09 23 23 20 56 65 72 69 66 79 20 74  .....## Verify t
2980: 68 61 74 20 57 69 6e 33 32 20 62 75 69 6c 64 73  hat Win32 builds
2990: 20 61 72 65 20 6f 66 20 63 6f 72 72 65 63 74 20   are of correct 
29a0: 74 79 70 65 0a 09 09 09 23 23 20 56 65 72 69 66  type....## Verif
29b0: 79 20 74 68 61 74 20 44 4c 4c 20 62 75 69 6c 64  y that DLL build
29c0: 73 20 61 72 65 20 6f 66 20 63 6f 72 72 65 63 74  s are of correct
29d0: 20 74 79 70 65 0a 09 09 09 63 61 73 65 20 22 2d   type....case "-
29e0: 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74  ${version}-${kit
29f0: 7d 2d 22 20 69 6e 0a 09 09 09 09 2a 2d 77 69 6e  }-" in.....*-win
2a00: 33 32 2d 6b 69 74 64 6c 6c 2d 2a 7c 2a 2d 77 69  32-kitdll-*|*-wi
2a10: 6e 33 32 2d 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a  n32-*-kitdll-*).
2a20: 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22  .....if ! file "
2a30: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c  ${createdkit}" |
2a40: 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77   grep 'MS Window
2a50: 73 20 28 44 4c 4c 29 27 20 3e 2f 64 65 76 2f 6e  s (DLL)' >/dev/n
2a60: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09  ull; then.......
2a70: 69 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69  issane=0......fi
2a80: 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 6b  ......;;.....*-k
2a90: 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66  itdll-*)......if
2aa0: 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74   ! file "${creat
2ab0: 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27  edkit}" | grep '
2ac0: 73 68 61 72 65 64 20 6f 62 6a 65 63 74 27 20 3e  shared object' >
2ad0: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
2ae0: 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09  ......issane=0..
2af0: 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09  ....fi......;;..
2b00: 09 09 09 2a 2d 77 69 6e 33 32 2d 6e 6f 74 6b 2d  ...*-win32-notk-
2b10: 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d 6e 6f 74 6b  *|*-win32-*-notk
2b20: 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66 69  -*)......if ! fi
2b30: 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  le "${createdkit
2b40: 7d 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69  }" | grep 'MS Wi
2b50: 6e 64 6f 77 73 20 28 63 6f 6e 73 6f 6c 65 29 27  ndows (console)'
2b60: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65   >/dev/null; the
2b70: 6e 0a 09 09 09 09 09 09 65 63 68 6f 20 22 4b 69  n.......echo "Ki
2b80: 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20  t failed sanity 
2b90: 63 68 65 63 6b 20 66 6f 72 20 62 65 69 6e 67 20  check for being 
2ba0: 61 20 63 6f 6e 73 6f 6c 65 20 61 70 70 6c 69 63  a console applic
2bb0: 61 74 69 6f 6e 22 20 3e 26 32 0a 09 09 09 09 09  ation" >&2......
2bc0: 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66  .issane=0......f
2bd0: 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d  i......;;.....*-
2be0: 77 69 6e 33 32 2d 2a 29 0a 09 09 09 09 09 69 66  win32-*)......if
2bf0: 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74   ! file "${creat
2c00: 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27  edkit}" | grep '
2c10: 4d 53 20 57 69 6e 64 6f 77 73 20 28 47 55 49 29  MS Windows (GUI)
2c20: 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68  ' >/dev/null; th
2c30: 65 6e 0a 09 09 09 09 09 09 65 63 68 6f 20 22 4b  en.......echo "K
2c40: 69 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79  it failed sanity
2c50: 20 63 68 65 63 6b 20 66 6f 72 20 62 65 69 6e 67   check for being
2c60: 20 61 20 47 55 49 20 61 70 70 6c 69 63 61 74 69   a GUI applicati
2c70: 6f 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73  on" >&2.......is
2c80: 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09  sane=0......fi..
2c90: 09 09 09 09 3b 3b 0a 09 09 09 65 73 61 63 0a 0a  ....;;....esac..
2ca0: 09 09 09 23 23 20 56 65 72 69 66 79 20 74 68 65  ...## Verify the
2cb0: 20 62 75 69 6c 64 20 63 6f 6d 70 6c 65 74 65 64   build completed
2cc0: 20 77 69 74 68 6f 75 74 20 77 61 72 6e 69 6e 67   without warning
2cd0: 73 0a 09 09 09 69 66 20 5b 20 22 24 7b 62 75 69  s....if [ "${bui
2ce0: 6c 64 66 61 69 6c 65 64 7d 22 20 3d 20 22 31 22  ldfailed}" = "1"
2cf0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
2d00: 6f 20 22 4b 69 74 20 66 61 69 6c 65 64 20 73 61  o "Kit failed sa
2d10: 6e 69 74 79 20 63 68 65 63 6b 20 66 6f 72 20 42  nity check for B
2d20: 75 69 6c 64 69 6e 67 22 20 3e 26 32 0a 0a 09 09  uilding" >&2....
2d30: 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 66 69  ..issane=0....fi
2d40: 0a 0a 09 09 09 23 20 4d 61 6b 65 20 6e 6f 74 65  .....# Make note
2d50: 20 6f 66 20 73 61 6e 69 74 79 20 66 61 69 6c 75   of sanity failu
2d60: 72 65 0a 09 09 09 69 66 20 5b 20 22 24 7b 69 73  re....if [ "${is
2d70: 73 61 6e 65 7d 22 20 21 3d 20 22 31 22 20 5d 3b  sane}" != "1" ];
2d80: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
2d90: 4b 69 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74  Kit failed sanit
2da0: 79 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  y ${version}/${k
2db0: 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61  it}" >&2......fa
2dc0: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
2dd0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
2de0: 7d 2d 73 61 6e 69 74 79 22 0a 0a 09 09 09 09 6d  }-sanity"......m
2df0: 76 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  v "${createdkit}
2e00: 22 20 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e  " "${failoutputn
2e10: 61 6d 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b  ame}".....mv "${
2e20: 62 75 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61  buildlog}" "${fa
2e30: 69 6c 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09  ilbuildlog}"....
2e40: 09 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09  ..rm -f tclsh...
2e50: 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66  ...continue....f
2e60: 69 0a 0a 09 09 09 23 20 52 65 6e 61 6d 65 20 63  i.....# Rename c
2e70: 72 65 61 74 65 64 20 6b 69 74 20 74 6f 20 66 69  reated kit to fi
2e80: 6e 61 6c 20 64 65 73 74 69 6e 61 74 69 6f 6e 0a  nal destination.
2e90: 09 09 09 6d 76 20 22 24 7b 63 72 65 61 74 65 64  ...mv "${created
2ea0: 6b 69 74 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e  kit}" "${outputn
2eb0: 61 6d 65 7d 22 0a 09 09 09 69 66 20 5b 20 2d 66  ame}"....if [ -f
2ec0: 20 22 74 63 6c 73 68 22 20 5d 3b 20 74 68 65 6e   "tclsh" ]; then
2ed0: 0a 09 09 09 09 6d 76 20 22 74 63 6c 73 68 22 20  .....mv "tclsh" 
2ee0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74  "${outputname}-t
2ef0: 63 6c 73 68 22 0a 09 09 09 66 69 0a 0a 09 09 09  clsh"....fi.....
2f00: 23 20 46 6f 72 20 4b 69 74 44 4c 4c 2c 20 6d 61  # For KitDLL, ma
2f10: 6b 65 20 61 20 6e 6f 74 65 20 6f 66 20 74 68 65  ke a note of the
2f20: 20 6f 72 69 67 69 6e 61 6c 20 6e 61 6d 65 0a 09   original name..
2f30: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
2f40: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
2f50: 0a 09 09 09 09 65 63 68 6f 20 22 24 7b 63 72 65  .....echo "${cre
2f60: 61 74 65 64 6b 69 74 7d 22 20 3e 20 22 24 7b 6f  atedkit}" > "${o
2f70: 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e  utputname}-orign
2f80: 61 6d 65 22 0a 09 09 09 66 69 0a 09 09 66 69 0a  ame"....fi...fi.
2f90: 0a 09 09 23 20 54 65 73 74 20 7a 69 70 20 73 74  ...# Test zip st
2fa0: 61 74 75 73 0a 09 09 69 66 20 75 6e 7a 69 70 20  atus...if unzip 
2fb0: 2d 6c 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -l "${outputname
2fc0: 7d 22 20 32 3e 26 31 20 7c 20 67 72 65 70 20 27  }" 2>&1 | grep '
2fd0: 62 6f 6f 74 5c 2e 74 63 6c 27 20 3e 2f 64 65 76  boot\.tcl' >/dev
2fe0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 63  /null; then....c
2ff0: 61 6e 75 6e 7a 69 70 3d 22 31 22 0a 09 09 65 6c  anunzip="1"...el
3000: 73 65 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22  se....canunzip="
3010: 30 22 0a 09 09 66 69 0a 0a 09 09 69 66 20 5b 20  0"...fi....if [ 
3020: 22 24 7b 69 73 7a 69 70 7d 22 20 21 3d 20 22 24  "${iszip}" != "$
3030: 7b 63 61 6e 75 6e 7a 69 70 7d 22 20 5d 3b 20 74  {canunzip}" ]; t
3040: 68 65 6e 0a 09 09 09 65 63 68 6f 20 22 46 61 69  hen....echo "Fai
3050: 6c 65 64 20 74 6f 20 75 6e 7a 69 70 20 7a 69 70  led to unzip zip
3060: 6b 69 74 20 6f 72 20 77 61 73 20 61 62 6c 65 20  kit or was able 
3070: 74 6f 20 75 6e 7a 69 70 20 6e 6f 6e 2d 7a 69 70  to unzip non-zip
3080: 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  kit ${version}/$
3090: 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 66  {kit}" >&2.....f
30a0: 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d  ailed="${failed}
30b0: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
30c0: 74 7d 2d 7a 69 70 22 0a 0a 09 09 09 63 6f 6e 74  t}-zip".....cont
30d0: 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20 44  inue...fi....# D
30e0: 6f 20 6e 6f 74 20 63 6f 6e 74 69 6e 75 65 20 70  o not continue p
30f0: 61 73 74 20 68 65 72 65 20 66 6f 72 20 75 6e 2d  ast here for un-
3100: 72 75 6e 6e 61 62 6c 65 20 6b 69 74 73 0a 09 09  runnable kits...
3110: 69 66 20 5b 20 22 24 7b 72 75 6e 6e 61 62 6c 65  if [ "${runnable
3120: 7d 22 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65  }" != "1" ]; the
3130: 6e 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  n....continue...
3140: 66 69 0a 0a 09 09 23 20 49 66 20 74 68 65 20 6e  fi....# If the n
3150: 61 6d 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69  ame of the origi
3160: 6e 61 6c 20 62 75 69 6c 64 20 6d 61 74 74 65 72  nal build matter
3170: 73 2c 20 73 79 6d 6c 69 6e 6b 20 69 74 20 75 70  s, symlink it up
3180: 0a 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75  ...if [ -f "${ou
3190: 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61  tputname}-origna
31a0: 6d 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63  me" ]; then....c
31b0: 72 65 61 74 65 64 6b 69 74 3d 22 24 28 63 61 74  reatedkit="$(cat
31c0: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d   "${outputname}-
31d0: 6f 72 69 67 6e 61 6d 65 22 29 22 0a 0a 09 09 09  origname")".....
31e0: 6c 6e 20 2d 73 20 22 24 7b 6f 75 74 70 75 74 6e  ln -s "${outputn
31f0: 61 6d 65 7d 22 20 22 24 7b 63 72 65 61 74 65 64  ame}" "${created
3200: 6b 69 74 7d 22 0a 09 09 66 69 0a 0a 09 09 23 20  kit}"...fi....# 
3210: 50 65 72 66 6f 72 6d 20 62 61 74 74 65 72 79 20  Perform battery 
3220: 6f 66 20 74 65 73 74 73 0a 09 09 23 23 20 43 6c  of tests...## Cl
3230: 65 61 6e 20 74 65 73 74 73 20 6c 6f 67 0a 09 09  ean tests log...
3240: 72 6d 20 2d 66 20 22 24 7b 74 65 73 74 72 65 73  rm -f "${testres
3250: 75 6c 74 73 6c 6f 67 7d 22 0a 09 09 66 6f 72 20  ultslog}"...for 
3260: 74 65 73 74 73 63 70 20 69 6e 20 22 24 7b 54 45  testscp in "${TE
3270: 53 54 44 49 52 7d 22 2f 74 65 73 74 73 2f 2a 2e  STDIR}"/tests/*.
3280: 74 63 6c 3b 20 64 6f 0a 09 09 09 74 65 73 74 73  tcl; do....tests
3290: 63 70 5f 74 61 67 3d 22 24 28 62 61 73 65 6e 61  cp_tag="$(basena
32a0: 6d 65 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20  me "${testscp}" 
32b0: 2e 74 63 6c 29 22 0a 09 09 09 74 65 73 74 73 63  .tcl)"....testsc
32c0: 70 70 72 65 3d 22 24 28 64 69 72 6e 61 6d 65 20  ppre="$(dirname 
32d0: 22 24 7b 74 65 73 74 73 63 70 7d 22 29 2f 24 7b  "${testscp}")/${
32e0: 74 65 73 74 73 63 70 5f 74 61 67 7d 2e 73 68 22  testscp_tag}.sh"
32f0: 0a 09 09 09 73 63 70 6c 6f 67 66 69 6c 65 3d 22  ....scplogfile="
3300: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 24 7b  ${outputname}-${
3310: 74 65 73 74 73 63 70 5f 74 61 67 7d 2e 6c 6f 67  testscp_tag}.log
3320: 22 0a 0a 09 09 09 23 20 49 66 20 61 20 63 6f 6d  ".....# If a com
3330: 6d 61 6e 64 20 69 73 20 72 65 71 75 69 72 65 64  mand is required
3340: 20 74 6f 20 73 74 61 72 74 20 74 68 65 20 6b 69   to start the ki
3350: 74 2c 20 70 72 65 70 61 72 65 20 74 6f 20 6b 69  t, prepare to ki
3360: 6c 6c 20 69 74 0a 09 09 09 23 20 69 6e 20 63 61  ll it....# in ca
3370: 73 65 20 6f 66 20 74 69 6d 65 6f 75 74 2e 0a 09  se of timeout...
3380: 09 09 23 23 20 54 65 6d 70 6f 72 61 72 69 6c 79  ..## Temporarily
3390: 20 64 69 73 61 62 6c 65 64 20 73 69 6e 63 65 20   disabled since 
33a0: 63 75 72 72 65 6e 74 6c 79 20 69 74 20 69 73 20  currently it is 
33b0: 63 61 75 73 69 6e 67 0a 09 09 09 23 23 20 6d 6f  causing....## mo
33c0: 72 65 20 70 72 6f 62 6c 65 6d 73 20 69 6e 20 74  re problems in t
33d0: 68 65 20 66 6f 72 6d 20 6f 66 20 74 65 73 74 73  he form of tests
33e0: 20 62 65 69 6e 67 20 6b 69 6c 6c 65 64 0a 09 09   being killed...
33f0: 09 23 23 20 70 72 65 6d 61 74 75 72 65 6c 79 20  .## prematurely 
3400: 74 68 61 6e 20 77 65 20 61 72 65 20 68 61 76 69  than we are havi
3410: 6e 67 20 69 73 73 75 65 73 20 77 69 74 68 20 74  ng issues with t
3420: 65 73 74 73 0a 09 09 09 23 23 20 68 61 6e 67 69  ests....## hangi
3430: 6e 67 0a 09 09 09 6b 69 74 72 75 6e 6b 69 6c 6c  ng....kitrunkill
3440: 70 69 64 3d 22 22 0a 09 09 09 69 66 20 5b 20 22  pid=""....if [ "
3450: 31 22 20 3d 20 22 30 22 20 2d 61 20 2d 6e 20 22  1" = "0" -a -n "
3460: 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 22 20 5d 3b  ${kitruncmd}" ];
3470: 20 74 68 65 6e 0a 09 09 09 09 28 0a 09 09 09 09   then.....(.....
3480: 09 73 6c 65 65 70 20 31 32 30 0a 09 09 09 09 09  .sleep 120......
3490: 6b 69 6c 6c 61 6c 6c 20 22 24 28 62 61 73 65 6e  killall "$(basen
34a0: 61 6d 65 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  ame "${outputnam
34b0: 65 7d 22 29 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c  e}")" >/dev/null
34c0: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09   2>/dev/null....
34d0: 09 29 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  .) >/dev/null 2>
34e0: 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 09 09 09  /dev/null &.....
34f0: 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 24  kitrunkillpid="$
3500: 21 22 0a 09 09 09 66 69 0a 0a 09 09 09 28 0a 09  !"....fi.....(..
3510: 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 74 65  ...if [ -f "${te
3520: 73 74 73 63 70 70 72 65 7d 22 20 5d 3b 20 74 68  stscppre}" ]; th
3530: 65 6e 0a 09 09 09 09 09 2e 20 22 24 7b 74 65 73  en....... "${tes
3540: 74 73 63 70 70 72 65 7d 22 0a 09 09 09 09 66 69  tscppre}".....fi
3550: 0a 0a 09 09 09 09 69 66 20 5b 20 22 24 7b 6b 69  ......if [ "${ki
3560: 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20  tdll}" = "1" ]; 
3570: 74 68 65 6e 0a 09 09 09 09 09 24 7b 6b 69 74 72  then......${kitr
3580: 75 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74  uncmd} "${output
3590: 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 20 22 24 7b  name}-tclsh" "${
35a0: 74 65 73 74 73 63 70 7d 22 20 22 24 7b 6f 75 74  testscp}" "${out
35b0: 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74  putname}" "${kit
35c0: 7d 22 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a  }" "${version}".
35d0: 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 24 7b  ....else......${
35e0: 6b 69 74 72 75 6e 63 6d 64 7d 20 22 24 7b 6f 75  kitruncmd} "${ou
35f0: 74 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 74 65  tputname}" "${te
3600: 73 74 73 63 70 7d 22 20 22 24 7b 6f 75 74 70 75  stscp}" "${outpu
3610: 74 6e 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22  tname}" "${kit}"
3620: 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09   "${version}"...
3630: 09 09 66 69 0a 09 09 09 29 20 3e 20 22 24 7b 73  ..fi....) > "${s
3640: 63 70 6c 6f 67 66 69 6c 65 7d 22 20 32 3e 26 31  cplogfile}" 2>&1
3650: 0a 0a 09 09 09 69 66 20 5b 20 22 24 3f 22 20 21  .....if [ "$?" !
3660: 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "0" ]; then...
3670: 09 09 65 63 68 6f 20 22 53 63 72 69 70 74 20 66  ..echo "Script f
3680: 61 69 6c 65 64 3a 20 24 7b 74 65 73 74 73 63 70  ailed: ${testscp
3690: 5f 74 61 67 7d 20 6f 6e 20 24 7b 76 65 72 73 69  _tag} on ${versi
36a0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a  on}/${kit}" >&2.
36b0: 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
36c0: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
36d0: 7d 2f 24 7b 6b 69 74 7d 2d 74 65 73 74 2d 24 7b  }/${kit}-test-${
36e0: 74 65 73 74 73 63 70 5f 74 61 67 7d 22 0a 0a 09  testscp_tag}"...
36f0: 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74 73  ...echo "${tests
3700: 63 70 5f 74 61 67 7d 3a 20 46 41 49 4c 22 20 3e  cp_tag}: FAIL" >
3710: 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74  >  "${testresult
3720: 73 6c 6f 67 7d 22 0a 0a 09 09 09 09 63 6f 6e 74  slog}"......cont
3730: 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23  inue....fi.....#
3740: 20 4b 69 6c 6c 20 74 68 65 20 77 61 74 63 68 64   Kill the watchd
3750: 6f 67 20 66 6f 72 20 74 68 69 73 20 69 74 65 72  og for this iter
3760: 61 74 69 6f 6e 0a 09 09 09 69 66 20 5b 20 2d 6e  ation....if [ -n
3770: 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69   "${kitrunkillpi
3780: 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  d}" ]; then.....
3790: 6b 69 6c 6c 20 2d 39 20 22 24 7b 6b 69 74 72 75  kill -9 "${kitru
37a0: 6e 6b 69 6c 6c 70 69 64 7d 22 20 3e 2f 64 65 76  nkillpid}" >/dev
37b0: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
37c0: 6c 0a 09 09 09 66 69 0a 0a 09 09 09 65 63 68 6f  l....fi.....echo
37d0: 20 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d   "${testscp_tag}
37e0: 3a 20 50 41 53 53 22 20 3e 3e 20 20 22 24 7b 74  : PASS" >>  "${t
37f0: 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a  estresultslog}".
3800: 0a 09 09 09 72 6d 20 2d 66 20 22 24 7b 73 63 70  ....rm -f "${scp
3810: 6c 6f 67 66 69 6c 65 7d 22 0a 09 09 64 6f 6e 65  logfile}"...done
3820: 0a 0a 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 6f  ....if [ -f "${o
3830: 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e  utputname}-orign
3840: 61 6d 65 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  ame" ]; then....
3850: 72 6d 20 2d 66 20 22 24 7b 63 72 65 61 74 65 64  rm -f "${created
3860: 6b 69 74 7d 22 0a 09 09 66 69 0a 09 64 6f 6e 65  kit}"...fi..done
3870: 0a 64 6f 6e 65 0a 0a 69 66 20 5b 20 2d 6e 20 22  .done..if [ -n "
3880: 24 7b 66 61 69 6c 65 64 7d 22 20 5d 3b 20 74 68  ${failed}" ]; th
3890: 65 6e 0a 09 65 63 68 6f 20 22 46 61 69 6c 65 64  en..echo "Failed
38a0: 3a 20 24 7b 66 61 69 6c 65 64 7d 22 0a 66 69 0a  : ${failed}".fi.
38b0: 0a 23 20 43 6c 65 61 6e 75 70 0a 23 23 20 54 65  .# Cleanup.## Te
38c0: 72 6d 69 6e 61 74 65 20 58 76 66 62 0a 6b 69 6c  rminate Xvfb.kil
38d0: 6c 20 2d 39 20 22 24 7b 58 56 46 42 5f 50 49 44  l -9 "${XVFB_PID
38e0: 7d 22 0a 0a 23 23 20 52 65 6d 6f 76 65 20 77 69  }"..## Remove wi
38f0: 6e 65 0a 72 6d 20 2d 72 66 20 22 24 7b 57 49 4e  ne.rm -rf "${WIN
3900: 45 50 52 45 46 49 58 7d 22 0a 0a 2e 2f 6b 69 74  EPREFIX}".../kit
3910: 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 0a 72 6d  creator clean.rm
3920: 20 2d 66 20 74 63 6c 73 68 0a                     -f tclsh.