Hex Artifact Content

Artifact 3dddaeddf2d0fb5f8420013028a867b08ebdfa16:


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