Hex Artifact Content

Artifact 7efabc4a202a6aa39495b567d332fb1529bbfe58:


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 35 2e 31 34 20 38  RSIONS="8.5.14 8
0020: 2e 36 2e 30 20 63 76 73 5f 48 45 41 44 22 0a 0a  .6.0 cvs_HEAD"..
0030: 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65 20  # Find the base 
0040: 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78 20  directory.for x 
0050: 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61 69  in 1 2 3 4 __fai
0060: 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22 24  l__; do..if [ "$
0070: 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f 5f  {x}" = "__fail__
0080: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68 6f  " ]; then...echo
0090: 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64   'Unable to find
00a0: 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62 6f   KitCreator, abo
00b0: 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09 65  rting.' >&2....e
00c0: 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20 5b  xit 1..fi...if [
00d0: 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20 5d   -x kitcreator ]
00e0: 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a 09  ; then...break..
00f0: 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65 0a  fi...cd ...done.
0100: 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64 29  .ROOTDIR="$(pwd)
0110: 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f 4f  ".TESTDIR="${ROO
0120: 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73 74  TDIR}/build/test
0130: 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49 52  ".export ROOTDIR
0140: 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e 64   TESTDIR..# Hand
0150: 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 20  le command-line 
0160: 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20 22  arguments.if [ "
0170: 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d 3b  $1" = "clean" ];
0180: 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22 24   then..rm -rf "$
0190: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22 0a  {TESTDIR}/kits".
01a0: 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c 61  fi..# Create pla
01b0: 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a 6d  ce to put kits.m
01c0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
01d0: 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75 6c  /kits" >/dev/nul
01e0: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d 6b  l 2>/dev/null.mk
01f0: 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d 2f  dir "${TESTDIR}/
0200: 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f 64  kits/failed" >/d
0210: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
0220: 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22 24  ull.if [ ! -d "$
0230: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22 20  {TESTDIR}/kits" 
0240: 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27 55  ]; then..echo 'U
0250: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
0260: 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79 2c  kits/ directory,
0270: 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a   aborting.' >&2.
0280: 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20 43  ..exit 1.fi..# C
0290: 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65 20  leanup.for file 
02a0: 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f  in "${TESTDIR}"/
02b0: 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a 09  kits/*.log; do..
02c0: 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65 7d  if echo "${file}
02d0: 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62 75  " | grep -- '-bu
02e0: 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76 2f  ild.log$' >/dev/
02f0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f 6e  null; then...con
0300: 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20 2d  tinue..fi...rm -
0310: 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e 65  f "${file}".done
0320: 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e 45  ..# Disable WINE
0330: 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45 50   debugging.WINEP
0340: 52 45 46 49 58 3d 22 24 7b 54 45 53 54 44 49 52  REFIX="${TESTDIR
0350: 7d 2f 2e 77 69 6e 65 22 0a 65 78 70 6f 72 74 20  }/.wine".export 
0360: 57 49 4e 45 50 52 45 46 49 58 0a 72 6d 20 2d 72  WINEPREFIX.rm -r
0370: 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d  f "${WINEPREFIX}
0380: 22 0a 6d 6b 64 69 72 20 22 24 7b 57 49 4e 45 50  ".mkdir "${WINEP
0390: 52 45 46 49 58 7d 22 0a 0a 63 61 74 20 3c 3c 20  REFIX}"..cat << 
03a0: 5c 5f 45 4f 46 5f 20 3e 20 22 24 7b 57 49 4e 45  \_EOF_ > "${WINE
03b0: 50 52 45 46 49 58 7d 2f 75 70 64 61 74 65 2d 72  PREFIX}/update-r
03c0: 65 67 22 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c 5f  eg".[HKEY_LOCAL_
03d0: 4d 41 43 48 49 4e 45 5c 53 6f 66 74 77 61 72 65  MACHINE\Software
03e0: 5c 4d 69 63 72 6f 73 6f 66 74 5c 57 69 6e 64 6f  \Microsoft\Windo
03f0: 77 73 20 4e 54 5c 43 75 72 72 65 6e 74 56 65 72  ws NT\CurrentVer
0400: 73 69 6f 6e 5c 41 65 44 65 62 75 67 5d 0a 22 41  sion\AeDebug]."A
0410: 75 74 6f 22 3d 64 77 6f 72 64 3a 30 30 30 30 30  uto"=dword:00000
0420: 30 30 31 0a 22 44 65 62 75 67 67 65 72 22 3d 22  001."Debugger"="
0430: 66 61 6c 73 65 22 0a 5f 45 4f 46 5f 0a 0a 72 65  false"._EOF_..re
0440: 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52 45  gedit "${WINEPRE
0450: 46 49 58 7d 2f 75 70 64 61 74 65 2d 72 65 67 22  FIX}/update-reg"
0460: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
0470: 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61 72 74  ev/null..# Start
0480: 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d 62 61   Xvfb for X11-ba
0490: 73 65 64 20 74 65 73 74 73 0a 58 56 46 42 5f 50  sed tests.XVFB_P
04a0: 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a 33 31  ID="$(..Xvfb :31
04b0: 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30 78 36   -screen 0 800x6
04c0: 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65 6e 20  00x24 -nolisten 
04d0: 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32  tcp >/dev/null 2
04e0: 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 65 63  >/dev/null &..ec
04f0: 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53 50 4c  ho "$!".)".DISPL
0500: 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20 44 49  AY=:31.export DI
0510: 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24 7b 42  SPLAY..if [ "${B
0520: 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31 22 20  IGBUILD}" = "1" 
0530: 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d 22 24  ]; then..kits="$
0540: 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c 2d 7a  (echo normal{,-z
0550: 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72  ip,-nomk4}{,-thr
0560: 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63 74  eaded}{,-statict
0570: 6b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d 61 6c 7b  k,-notk} normal{
0580: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f  ,-threaded}{,-no
0590: 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 64  tk}{,-nomk4}{,-d
05a0: 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 77 69 6e  ebug}-kitdll win
05b0: 33 32 2d 69 35 38 36 7b 2c 2d 7a 69 70 2c 2d 6e  32-i586{,-zip,-n
05c0: 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64  omk4}{,-threaded
05d0: 7d 7b 2c 2d 6e 6f 74 6b 7d 20 77 69 6e 33 32 2d  }{,-notk} win32-
05e0: 69 35 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d  i586{,-threaded}
05f0: 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34  {,-notk}{,-nomk4
0600: 7d 2d 6b 69 74 64 6c 6c 20 6d 69 6e 7b 2c 2d 73  }-kitdll min{,-s
0610: 74 61 74 69 63 7d 20 7b 6c 69 6e 75 78 2d 6d 69  tatic} {linux-mi
0620: 70 73 65 6c 2d 6d 69 6e 7d 7b 2c 2d 64 65 62 75  psel-min}{,-debu
0630: 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b 6c 69  g}{,-kitdll} {li
0640: 6e 75 78 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73  nux-i386,solaris
0650: 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d 61 6d  -i386,solaris-am
0660: 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72  d64,solaris-spar
0670: 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36  c,solaris-sparc6
0680: 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2c  4,freebsd-amd64,
0690: 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b 2c 2d  netbsd-amd64}{,-
06a0: 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68  zip,-nomk4}{,-th
06b0: 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63  readed}{,-static
06c0: 74 6b 2c 2d 6e 6f 74 6b 7d 7b 2c 64 65 62 75 67  tk,-notk}{,debug
06d0: 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38 36 2c  } {solaris-i386,
06e0: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c 73 6f  solaris-amd64,so
06f0: 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f 6c 61  laris-sparc,sola
0700: 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72 65 65  ris-sparc64,free
0710: 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62 73 64  bsd-amd64,netbsd
0720: 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65 61 64  -amd64}{,-thread
0730: 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f  ed}{,-notk}{,-no
0740: 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d 6b 69 74  mk4}{,debug}-kit
0750: 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38 36 7b  dll netbsd-i386{
0760: 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  ,-zip,-nomk4}{,-
0770: 74 68 72 65 61 64 65 64 7d 7b 2c 64 65 62 75 67  threaded}{,debug
0780: 7d 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d 69 33  }-notk netbsd-i3
0790: 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c  86{,-threaded}{,
07a0: 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d  -nomk4}{,debug}-
07b0: 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61 6e 64 72  notk-kitdll andr
07c0: 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 7b 2c 2d 64  oid-arm-notk{,-d
07d0: 65 62 75 67 7d 20 61 6e 64 6f 69 64 2d 61 72 6d  ebug} andoid-arm
07e0: 2d 6e 6f 74 6b 7b 2c 2d 64 65 62 75 67 7d 2d 6b  -notk{,-debug}-k
07f0: 69 74 64 6c 6c 29 22 0a 65 6c 73 65 0a 09 6b 69  itdll)".else..ki
0800: 74 73 3d 22 6e 6f 72 6d 61 6c 20 6e 6f 72 6d 61  ts="normal norma
0810: 6c 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 74 68 72  l-zip normal-thr
0820: 65 61 64 65 64 20 6e 6f 72 6d 61 6c 2d 74 68 72  eaded normal-thr
0830: 65 61 64 65 64 2d 7a 69 70 20 6e 6f 72 6d 61 6c  eaded-zip normal
0840: 2d 73 74 61 74 69 63 74 6b 20 6e 6f 72 6d 61 6c  -statictk normal
0850: 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72  -notk normal-thr
0860: 65 61 64 65 64 2d 6e 6f 74 6b 20 6e 6f 72 6d 61  eaded-notk norma
0870: 6c 2d 74 68 72 65 61 64 65 64 2d 7a 69 70 2d 6e  l-threaded-zip-n
0880: 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34  otk normal-nomk4
0890: 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 20 6d 69   normal-debug mi
08a0: 6e 20 6d 69 6e 2d 73 74 61 74 69 63 20 6e 6f 72  n min-static nor
08b0: 6d 61 6c 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61  mal-kitdll norma
08c0: 6c 2d 74 68 72 65 61 64 65 64 2d 6b 69 74 64 6c  l-threaded-kitdl
08d0: 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d 6b 69  l normal-notk-ki
08e0: 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b  tdll normal-nomk
08f0: 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d  4-kitdll normal-
0900: 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c  nomk4-notk-kitdl
0910: 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65  l normal-threade
0920: 64 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e  d-nomk4-kitdll n
0930: 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e  ormal-threaded-n
0940: 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c  otk-nomk4-kitdll
0950: 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 2d 6b 69   normal-debug-ki
0960: 74 64 6c 6c 20 6d 69 6e 2d 6b 69 74 64 6c 6c 20  tdll min-kitdll 
0970: 77 69 6e 33 32 2d 69 35 38 36 20 77 69 6e 33 32  win32-i586 win32
0980: 2d 69 35 38 36 2d 7a 69 70 20 77 69 6e 33 32 2d  -i586-zip win32-
0990: 69 35 38 36 2d 74 68 72 65 61 64 65 64 20 77 69  i586-threaded wi
09a0: 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65  n32-i586-threade
09b0: 64 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35 38 36  d-zip win32-i586
09c0: 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69 35 38 36  -notk win32-i586
09d0: 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b 20 77  -threaded-notk w
09e0: 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 20  in32-i586-nomk4 
09f0: 77 69 6e 33 32 2d 69 35 38 36 2d 6b 69 74 64 6c  win32-i586-kitdl
0a00: 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72  l win32-i586-thr
0a10: 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 77 69 6e  eaded-kitdll win
0a20: 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 2d 6b 69 74  32-i586-notk-kit
0a30: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e  dll win32-i586-n
0a40: 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  omk4-kitdll win3
0a50: 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6e 6f 74  2-i586-nomk4-not
0a60: 6b 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69  k-kitdll win32-i
0a70: 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d  586-threaded-nom
0a80: 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  k4-kitdll win32-
0a90: 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f  i586-threaded-no
0aa0: 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20  tk-nomk4-kitdll 
0ab0: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e 6f 74  linux-mipsel-not
0ac0: 6b 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e  k linux-mipsel-n
0ad0: 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  otk-kitdll linux
0ae0: 2d 69 33 38 36 20 6c 69 6e 75 78 2d 69 33 38 36  -i386 linux-i386
0af0: 2d 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38  -debug linux-i38
0b00: 36 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69  6-kitdll linux-i
0b10: 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  386-debug-kitdll
0b20: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b   linux-i386-notk
0b30: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b   linux-i386-notk
0b40: 2d 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38  -debug linux-i38
0b50: 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69  6-notk-kitdll li
0b60: 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65  nux-i386-notk-de
0b70: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0b80: 69 73 2d 69 33 38 36 20 73 6f 6c 61 72 69 73 2d  is-i386 solaris-
0b90: 69 33 38 36 2d 64 65 62 75 67 20 73 6f 6c 61 72  i386-debug solar
0ba0: 69 73 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73  is-i386-kitdll s
0bb0: 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64 65 62 75  olaris-i386-debu
0bc0: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0bd0: 2d 61 6d 64 36 34 20 73 6f 6c 61 72 69 73 2d 61  -amd64 solaris-a
0be0: 6d 64 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72  md64-debug solar
0bf0: 69 73 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20  is-amd64-kitdll 
0c00: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65  solaris-amd64-de
0c10: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0c20: 69 73 2d 73 70 61 72 63 20 73 6f 6c 61 72 69 73  is-sparc solaris
0c30: 2d 73 70 61 72 63 2d 64 65 62 75 67 20 73 6f 6c  -sparc-debug sol
0c40: 61 72 69 73 2d 73 70 61 72 63 2d 6b 69 74 64 6c  aris-sparc-kitdl
0c50: 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d  l solaris-sparc-
0c60: 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c  debug-kitdll sol
0c70: 61 72 69 73 2d 73 70 61 72 63 36 34 20 73 6f 6c  aris-sparc64 sol
0c80: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 64 65 62  aris-sparc64-deb
0c90: 75 67 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ug solaris-sparc
0ca0: 36 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  64-kitdll solari
0cb0: 73 2d 73 70 61 72 63 36 34 2d 64 65 62 75 67 2d  s-sparc64-debug-
0cc0: 6b 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61  kitdll freebsd-a
0cd0: 6d 64 36 34 20 66 72 65 65 62 73 64 2d 61 6d 64  md64 freebsd-amd
0ce0: 36 34 2d 64 65 62 75 67 20 66 72 65 65 62 73 64  64-debug freebsd
0cf0: 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 66 72  -amd64-kitdll fr
0d00: 65 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75  eebsd-amd64-debu
0d10: 67 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  g-kitdll netbsd-
0d20: 69 33 38 36 2d 6e 6f 74 6b 20 6e 65 74 62 73 64  i386-notk netbsd
0d30: 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67  -i386-notk-debug
0d40: 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74   netbsd-i386-not
0d50: 6b 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  k-kitdll netbsd-
0d60: 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d  i386-notk-debug-
0d70: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d  kitdll netbsd-am
0d80: 64 36 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34  d64 netbsd-amd64
0d90: 2d 64 65 62 75 67 20 6e 65 74 62 73 64 2d 61 6d  -debug netbsd-am
0da0: 64 36 34 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73  d64-kitdll netbs
0db0: 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69  d-amd64-debug-ki
0dc0: 74 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d  tdll android-arm
0dd0: 2d 6e 6f 74 6b 20 61 6e 64 72 6f 69 64 2d 61 72  -notk android-ar
0de0: 6d 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 61 6e 64  m-notk-debug and
0df0: 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 6b 69  roid-arm-notk-ki
0e00: 74 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d  tdll android-arm
0e10: 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64  -notk-debug-kitd
0e20: 6c 6c 22 0a 66 69 0a 0a 66 61 69 6c 65 64 3d 22  ll".fi..failed="
0e30: 22 0a 66 6f 72 20 6b 69 74 20 69 6e 20 24 6b 69  ".for kit in $ki
0e40: 74 73 3b 20 64 6f 0a 09 6b 69 74 63 72 65 61 74  ts; do..kitcreat
0e50: 6f 72 3d 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72  or="./kitcreator
0e60: 22 0a 09 61 72 67 73 3d 22 22 0a 09 72 75 6e 6e  "..args=""..runn
0e70: 61 62 6c 65 3d 22 31 22 0a 09 69 73 7a 69 70 3d  able="1"..iszip=
0e80: 22 30 22 0a 09 73 74 61 74 69 63 74 6b 3d 22 30  "0"..statictk="0
0e90: 22 0a 09 6e 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d  "..notk="0"..nom
0ea0: 6b 34 3d 22 30 22 0a 09 78 63 6f 6d 70 69 6c 65  k4="0"..xcompile
0eb0: 3d 22 30 22 0a 09 6b 69 74 64 6c 6c 3d 22 30 22  ="0"..kitdll="0"
0ec0: 0a 09 6b 69 74 72 75 6e 63 6d 64 3d 22 22 0a 0a  ..kitruncmd=""..
0ed0: 09 23 20 48 61 6e 64 6c 65 20 62 61 73 65 20 63  .# Handle base c
0ee0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09 6f 73  onfiguration..os
0ef0: 3d 22 24 28 75 6e 61 6d 65 20 2d 73 20 7c 20 64  ="$(uname -s | d
0f00: 64 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f  d conv=lcase 2>/
0f10: 64 65 76 2f 6e 75 6c 6c 29 22 0a 09 63 70 75 3d  dev/null)"..cpu=
0f20: 22 24 28 75 6e 61 6d 65 20 2d 6d 20 7c 20 64 64  "$(uname -m | dd
0f30: 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64   conv=lcase 2>/d
0f40: 65 76 2f 6e 75 6c 6c 20 7c 20 73 65 64 20 27 73  ev/null | sed 's
0f50: 40 78 38 36 5f 36 34 40 61 6d 64 36 34 40 3b 73  @x86_64@amd64@;s
0f60: 40 69 2e 38 36 40 69 33 38 36 40 27 29 22 0a 09  @i.86@i386@')"..
0f70: 63 61 73 65 20 22 24 7b 6b 69 74 7d 22 20 69 6e  case "${kit}" in
0f80: 0a 09 09 6e 6f 72 6d 61 6c 7c 6e 6f 72 6d 61 6c  ...normal|normal
0f90: 2d 2a 29 0a 09 09 09 6b 69 74 3d 22 24 28 65 63  -*)....kit="$(ec
0fa0: 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65  ho "${kit}" | se
0fb0: 64 20 22 73 40 5e 6e 6f 72 6d 61 6c 40 24 6f 73  d "s@^normal@$os
0fc0: 2d 24 63 70 75 40 22 29 22 0a 09 09 09 3b 3b 0a  -$cpu@")"....;;.
0fd0: 09 09 6d 69 6e 7c 6d 69 6e 2d 6b 69 74 64 6c 6c  ..min|min-kitdll
0fe0: 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d  )....kitcreator=
0ff0: 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69  "./build/make-mi
1000: 6e 6b 69 74 22 0a 09 09 09 69 73 7a 69 70 3d 22  nkit"....iszip="
1010: 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09  1"....notk="1"..
1020: 09 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24  ..kit="$(echo "$
1030: 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40  {kit}" | sed "s@
1040: 5e 6d 69 6e 40 24 6f 73 2d 24 63 70 75 2d 6d 69  ^min@$os-$cpu-mi
1050: 6e 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69  n@")"....;;...mi
1060: 6e 2d 73 74 61 74 69 63 29 0a 09 09 09 6b 69 74  n-static)....kit
1070: 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64  creator="./build
1080: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 2d 73 74 61  /make-minkit-sta
1090: 74 69 63 22 0a 09 09 09 69 73 7a 69 70 3d 22 31  tic"....iszip="1
10a0: 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09  "....notk="1"...
10b0: 09 6b 69 74 3d 22 24 7b 6f 73 7d 2d 24 7b 63 70  .kit="${os}-${cp
10c0: 75 7d 2d 6d 69 6e 2d 73 74 61 74 69 63 22 0a 09  u}-min-static"..
10d0: 09 09 3b 3b 0a 09 09 77 69 6e 33 32 7c 77 69 6e  ..;;...win32|win
10e0: 33 32 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61  32-*)....kitcrea
10f0: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
1100: 65 2d 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09  e-kit-win32"....
1110: 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09  xcompile="1"....
1120: 72 75 6e 6e 61 62 6c 65 3d 22 31 22 0a 09 09 09  runnable="1"....
1130: 6b 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22  kitruncmd="wine"
1140: 0a 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 6d  ....;;...linux-m
1150: 69 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e 75 78 2d  ipsel-min|linux-
1160: 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64 6c  mipsel-min-kitdl
1170: 6c 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72  l)....kitcreator
1180: 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b  ="./build/make-k
1190: 69 74 2d 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 22  it-linux-mipsel"
11a0: 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22  ....runnable="0"
11b0: 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22  ....xcompile="1"
11c0: 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
11d0: 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 3b 3b 0a  iszip="1"....;;.
11e0: 09 09 6c 69 6e 75 78 2d 69 33 38 36 7c 6c 69 6e  ..linux-i386|lin
11f0: 75 78 2d 69 33 38 36 2d 2a 29 0a 09 09 09 6b 69  ux-i386-*)....ki
1200: 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c  tcreator="./buil
1210: 64 2f 6d 61 6b 65 2d 6b 69 74 2d 6c 69 6e 75 78  d/make-kit-linux
1220: 2d 69 33 38 36 22 0a 09 09 09 78 63 6f 6d 70 69  -i386"....xcompi
1230: 6c 65 3d 22 31 22 0a 09 09 09 3b 3b 0a 09 09 61  le="1"....;;...a
1240: 6e 64 72 6f 69 64 2d 61 72 6d 7c 61 6e 64 72 6f  ndroid-arm|andro
1250: 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09 09 6c 69 6e  id-arm-*|\...lin
1260: 75 78 2d 6d 69 70 73 65 6c 7c 6c 69 6e 75 78 2d  ux-mipsel|linux-
1270: 6d 69 70 73 65 6c 2d 2a 7c 5c 0a 09 09 6c 69 6e  mipsel-*|\...lin
1280: 75 78 2d 61 6d 64 36 34 7c 6c 69 6e 75 78 2d 61  ux-amd64|linux-a
1290: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  md64-*|\...solar
12a0: 69 73 2d 69 33 38 36 7c 73 6f 6c 61 72 69 73 2d  is-i386|solaris-
12b0: 69 33 38 36 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  i386-*|\...solar
12c0: 69 73 2d 61 6d 64 36 34 7c 73 6f 6c 61 72 69 73  is-amd64|solaris
12d0: 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c  -amd64-*|\...sol
12e0: 61 72 69 73 2d 73 70 61 72 63 7c 73 6f 6c 61 72  aris-sparc|solar
12f0: 69 73 2d 73 70 61 72 63 2d 2a 7c 5c 0a 09 09 73  is-sparc-*|\...s
1300: 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34 7c 73  olaris-sparc64|s
1310: 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34 2d 2a  olaris-sparc64-*
1320: 7c 5c 0a 09 09 66 72 65 65 62 73 64 2d 61 6d 64  |\...freebsd-amd
1330: 36 34 7c 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64|freebsd-amd64
1340: 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 69 33  -*|\...netbsd-i3
1350: 38 36 7c 6e 65 74 62 73 64 2d 69 33 38 36 2d 2a  86|netbsd-i386-*
1360: 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 61 6d 64 36  |\...netbsd-amd6
1370: 34 7c 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 2a  4|netbsd-amd64-*
1380: 7c 5c 0a 09 09 68 70 75 78 2d 68 70 70 61 36 34  |\...hpux-hppa64
1390: 7c 68 70 75 78 2d 68 70 70 61 36 34 2d 2a 29 0a  |hpux-hppa64-*).
13a0: 09 09 09 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65  ...platform="$(e
13b0: 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 63  cho "${kit}" | c
13c0: 75 74 20 2d 66 20 31 2d 32 20 2d 64 20 27 2d 27  ut -f 1-2 -d '-'
13d0: 29 22 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72  )"....kitcreator
13e0: 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b  ="./build/make-k
13f0: 69 74 2d 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 0a  it-${platform}".
1400: 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a  ...runnable="0".
1410: 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a  ...xcompile="1".
1420: 09 09 09 69 73 7a 69 70 3d 22 30 22 0a 0a 09 09  ...iszip="0"....
1430: 09 69 66 20 65 63 68 6f 20 22 24 7b 6b 69 74 7d  .if echo "${kit}
1440: 22 20 7c 20 65 67 72 65 70 20 2d 2d 20 27 2d 28  " | egrep -- '-(
1450: 68 70 70 61 36 34 7c 61 6d 64 36 34 7c 73 70 61  hppa64|amd64|spa
1460: 72 63 36 34 29 2d 27 20 3e 2f 64 65 76 2f 6e 75  rc64)-' >/dev/nu
1470: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 61 72 67  ll; then.....arg
1480: 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61  s="${args} --ena
1490: 62 6c 65 2d 36 34 62 69 74 22 0a 09 09 09 66 69  ble-64bit"....fi
14a0: 0a 09 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09 69  ....;;..esac...i
14b0: 66 20 5b 20 22 24 7b 78 63 6f 6d 70 69 6c 65 7d  f [ "${xcompile}
14c0: 22 20 21 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  " != "0" ]; then
14d0: 0a 09 09 6b 69 74 3d 22 24 7b 6b 69 74 7d 2d 78  ...kit="${kit}-x
14e0: 63 6f 6d 70 69 6c 65 22 0a 09 66 69 0a 0a 09 23  compile"..fi...#
14f0: 20 48 61 6e 64 6c 65 20 61 64 64 69 74 69 6f 6e   Handle addition
1500: 61 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  al configuration
1510: 0a 09 74 65 6d 70 6b 69 74 3d 22 2d 24 7b 6b 69  ..tempkit="-${ki
1520: 74 7d 2d 22 0a 09 66 6f 72 20 74 72 79 20 69 6e  t}-"..for try in
1530: 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 38   1 2 3 4 5 6 7 8
1540: 20 39 3b 20 64 6f 0a 09 09 63 61 73 65 20 22 2d   9; do...case "-
1550: 24 7b 74 65 6d 70 6b 69 74 7d 2d 22 20 69 6e 0a  ${tempkit}-" in.
1560: 09 09 09 2a 2d 74 68 72 65 61 64 65 64 2d 2a 29  ...*-threaded-*)
1570: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
1580: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
1590: 22 20 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65  " | sed 's@-thre
15a0: 61 64 65 64 2d 40 2d 40 27 29 22 0a 09 09 09 09  aded-@-@')".....
15b0: 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d  args="${args} --
15c0: 65 6e 61 62 6c 65 2d 74 68 72 65 61 64 73 22 0a  enable-threads".
15d0: 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 7a 69 70 2d  ....;;....*-zip-
15e0: 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22  *).....tempkit="
15f0: 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69  $(echo "${tempki
1600: 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 7a 69  t}" | sed 's@-zi
1610: 70 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67  p-@-@')".....arg
1620: 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61  s="${args} --ena
1630: 62 6c 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d  ble-kit-storage=
1640: 7a 69 70 22 0a 09 09 09 09 69 73 7a 69 70 3d 22  zip".....iszip="
1650: 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 73  1".....;;....*-s
1660: 74 61 74 69 63 74 6b 2d 2a 29 0a 09 09 09 09 74  tatictk-*).....t
1670: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
1680: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1690: 64 20 27 73 40 2d 73 74 61 74 69 63 74 6b 2d 40  d 's@-statictk-@
16a0: 2d 40 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22  -@')".....if [ "
16b0: 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 30 22 20 5d  ${notk}" = "0" ]
16c0: 3b 20 74 68 65 6e 0a 09 09 09 09 09 73 74 61 74  ; then......stat
16d0: 69 63 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73  ictk="1".....els
16e0: 65 0a 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b  e......echo "${k
16f0: 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63  it}: Unable to c
1700: 72 65 61 74 65 20 53 74 61 74 69 63 54 6b 20 61  reate StaticTk a
1710: 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e  nd NoTk, ignorin
1720: 67 20 53 74 61 74 69 63 54 6b 22 20 3e 26 32 0a  g StaticTk" >&2.
1730: 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09  ....fi.....;;...
1740: 09 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 74  .*-notk-*).....t
1750: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
1760: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1770: 64 20 27 73 40 2d 6e 6f 74 6b 2d 40 2d 40 27 29  d 's@-notk-@-@')
1780: 22 0a 09 09 09 09 69 66 20 5b 20 22 24 7b 73 74  ".....if [ "${st
1790: 61 74 69 63 74 6b 7d 22 20 3d 20 22 30 22 20 5d  atictk}" = "0" ]
17a0: 3b 20 74 68 65 6e 0a 09 09 09 09 09 6e 6f 74 6b  ; then......notk
17b0: 3d 22 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09  ="1".....else...
17c0: 09 09 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a  ...echo "${kit}:
17d0: 20 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74   Unable to creat
17e0: 65 20 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e  e StaticTk and N
17f0: 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 4e 6f  oTk, ignoring No
1800: 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09  Tk" >&2.....fi..
1810: 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 6d 6b 34  ...;;....*-nomk4
1820: 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d  -*).....tempkit=
1830: 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b  "$(echo "${tempk
1840: 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6e  it}" | sed 's@-n
1850: 6f 6d 6b 34 2d 40 2d 40 27 29 22 0a 09 09 09 09  omk4-@-@')".....
1860: 6e 6f 6d 6b 34 3d 22 31 22 0a 09 09 09 09 69 73  nomk4="1".....is
1870: 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09  zip="1".....;;..
1880: 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09  ..*-kitdll-*)...
1890: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
18a0: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
18b0: 20 73 65 64 20 27 73 40 2d 6b 69 74 64 6c 6c 2d   sed 's@-kitdll-
18c0: 40 2d 40 27 29 22 0a 09 09 09 09 6b 69 74 64 6c  @-@')".....kitdl
18d0: 6c 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09  l="1".....;;....
18e0: 2a 2d 64 65 62 75 67 2d 2a 29 0a 09 09 09 09 74  *-debug-*).....t
18f0: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
1900: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1910: 64 20 27 73 40 2d 64 65 62 75 67 2d 40 2d 40 27  d 's@-debug-@-@'
1920: 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61  )".....args="${a
1930: 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 73 79  rgs} --enable-sy
1940: 6d 62 6f 6c 73 22 0a 09 09 09 09 3b 3b 0a 09 09  mbols".....;;...
1950: 65 73 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20  esac..done...if 
1960: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
1970: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 23 20  "1" ]; then...# 
1980: 43 75 72 72 65 6e 74 6c 79 20 6e 6f 20 4b 69 74  Currently no Kit
1990: 44 4c 4c 20 75 73 65 73 20 5a 69 70 0a 09 09 69  DLL uses Zip...i
19a0: 73 7a 69 70 3d 22 30 22 0a 09 66 69 0a 0a 09 66  szip="0"..fi...f
19b0: 6f 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 24 7b  or version in ${
19c0: 56 45 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a 09 09  VERSIONS}; do...
19d0: 23 20 57 6f 72 6b 20 61 72 6f 75 6e 64 20 63 68  # Work around ch
19e0: 61 6e 67 65 73 20 69 6e 20 64 65 66 61 75 6c 74  anges in default
19f0: 20 62 65 68 61 76 69 6f 75 72 0a 09 09 69 66 20   behaviour...if 
1a00: 5b 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 20 3d  [ "${version}" =
1a10: 20 22 63 76 73 5f 48 45 41 44 22 20 5d 3b 20 74   "cvs_HEAD" ]; t
1a20: 68 65 6e 0a 09 09 09 6b 69 74 3d 22 24 28 65 63  hen....kit="$(ec
1a30: 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65  ho "${kit}" | se
1a40: 64 20 27 73 40 2d 74 68 72 65 61 64 65 64 40 2d  d 's@-threaded@-
1a50: 75 6e 74 68 72 65 61 64 65 64 40 27 29 22 0a 09  unthreaded@')"..
1a60: 09 09 61 72 67 73 3d 22 24 28 65 63 68 6f 20 22  ..args="$(echo "
1a70: 24 7b 61 72 67 73 7d 22 20 7c 20 73 65 64 20 27  ${args}" | sed '
1a80: 73 40 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65  s@ --enable-thre
1a90: 61 64 73 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74  ads@ --disable-t
1aa0: 68 72 65 61 64 73 40 27 29 22 0a 09 09 66 69 0a  hreads@')"...fi.
1ab0: 0a 09 09 23 20 43 72 65 61 74 65 20 54 63 6c 6b  ...# Create Tclk
1ac0: 69 74 0a 09 09 69 66 20 5b 20 22 24 7b 6b 69 74  it...if [ "${kit
1ad0: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
1ae0: 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  hen....createdki
1af0: 74 3d 22 6c 69 62 74 63 6c 6b 69 74 2a 2e 64 6c  t="libtclkit*.dl
1b00: 6c 20 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a 22 0a  l libtclkit*.*".
1b10: 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ...outputname="$
1b20: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 6c  {TESTDIR}/kits/l
1b30: 69 62 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  ibtclkit-${versi
1b40: 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66  on}-${kit}"....f
1b50: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ailoutputname="$
1b60: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
1b70: 61 69 6c 65 64 2f 6c 69 62 74 63 6c 6b 69 74 2d  ailed/libtclkit-
1b80: 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74  ${version}-${kit
1b90: 7d 22 0a 09 09 09 73 64 6b 3d 22 6c 69 62 74 63  }"....sdk="libtc
1ba0: 6c 6b 69 74 2d 73 64 6b 2d 24 7b 76 65 72 73 69  lkit-sdk-${versi
1bb0: 6f 6e 7d 2e 74 61 72 2e 67 7a 22 0a 09 09 65 6c  on}.tar.gz"...el
1bc0: 73 65 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74  se....createdkit
1bd0: 3d 22 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  ="tclkit-${versi
1be0: 6f 6e 7d 22 0a 09 09 09 6f 75 74 70 75 74 6e 61  on}"....outputna
1bf0: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1c00: 69 74 73 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72  its/tclkit-${ver
1c10: 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09  sion}-${kit}"...
1c20: 09 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d  .failoutputname=
1c30: 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73  "${TESTDIR}/kits
1c40: 2f 66 61 69 6c 65 64 2f 74 63 6c 6b 69 74 2d 24  /failed/tclkit-$
1c50: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
1c60: 22 0a 09 09 09 73 64 6b 3d 27 27 0a 09 09 66 69  "....sdk=''...fi
1c70: 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 6f  ...buildlog="${o
1c80: 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64  utputname}-build
1c90: 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62 75 69 6c  .log"...failbuil
1ca0: 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f 75 74 70  dlog="${failoutp
1cb0: 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f  utname}-build.lo
1cc0: 67 22 0a 09 09 74 65 73 74 72 65 73 75 6c 74 73  g"...testresults
1cd0: 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d  log="${outputnam
1ce0: 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22 0a 0a 09  e}-tests.log"...
1cf0: 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b 6f 75  .if [ ! -f "${ou
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 75 6e 73 65 74 20 4b 49 54 43  en....unset KITC
1d20: 52 45 41 54 4f 52 5f 50 4b 47 53 20 53 54 41 54  REATOR_PKGS STAT
1d30: 49 43 54 4b 20 53 54 52 49 50 0a 0a 09 09 09 69  ICTK STRIP.....i
1d40: 66 20 5b 20 2d 66 20 22 24 7b 66 61 69 6c 6f 75  f [ -f "${failou
1d50: 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68  tputname}" ]; th
1d60: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53 6b 69  en.....echo "Ski
1d70: 70 70 69 6e 67 20 72 65 62 75 69 6c 64 69 6e 67  pping rebuilding
1d80: 20 66 61 69 6c 65 64 20 6b 69 74 20 24 7b 76 65   failed kit ${ve
1d90: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20 2e 2e  rsion}/${kit} ..
1da0: 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22  ."......failed="
1db0: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
1dc0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c  ion}/${kit}-buil
1dd0: 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65  d"......continue
1de0: 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d 20 2d 66  ....fi.....rm -f
1df0: 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b 69 74 63   tclsh...../kitc
1e00: 72 65 61 74 6f 72 20 63 6c 65 61 6e 20 3e 2f 64  reator clean >/d
1e10: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
1e20: 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20 22 43 72  ull.....echo "Cr
1e30: 65 61 74 69 6e 67 20 54 63 6c 6b 69 74 20 24 7b  eating Tclkit ${
1e40: 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2e  version}/${kit}.
1e50: 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a  .."....echo " **
1e60: 2a 20 42 75 69 6c 64 20 73 74 61 72 74 65 64 20  * Build started 
1e70: 24 28 77 68 6f 61 6d 69 29 40 24 28 68 6f 73 74  $(whoami)@$(host
1e80: 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61 74 65 29  name) on $(date)
1e90: 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d  " > "${buildlog}
1ea0: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
1eb0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
1ec0: 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c  .echo " *** Buil
1ed0: 64 20 53 63 72 69 70 74 22 20 3e 3e 20 22 24 7b  d Script" >> "${
1ee0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 69  buildlog}".....i
1ef0: 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20  f [ "${notk}" = 
1f00: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
1f10: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
1f20: 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27 0a 09 09  'itcl mk4tcl'...
1f30: 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b  .fi.....if [ "${
1f40: 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22 20 5d 3b  nomk4}" = "1" ];
1f50: 20 74 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d   then.....if [ -
1f60: 7a 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  z "${KITCREATOR_
1f70: 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  PKGS}" ]; then..
1f80: 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50  ....KITCREATOR_P
1f90: 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27 0a 09 09  KGS='itcl tk'...
1fa0: 09 09 65 6c 73 65 0a 09 09 09 09 09 4b 49 54 43  ..else......KITC
1fb0: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22 24 28 65  REATOR_PKGS="$(e
1fc0: 63 68 6f 20 22 24 7b 4b 49 54 43 52 45 41 54 4f  cho "${KITCREATO
1fd0: 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65 64 20 27  R_PKGS}" | sed '
1fe0: 73 40 6d 6b 34 74 63 6c 40 40 27 29 22 0a 09 09  s@mk4tcl@@')"...
1ff0: 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 69  ..fi....fi.....i
2000: 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20  f [ "${kitdll}" 
2010: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
2020: 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54  ..if [ -z "${KIT
2030: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d  CREATOR_PKGS}" ]
2040: 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43  ; then......KITC
2050: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20  REATOR_PKGS='tk 
2060: 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b 69 74 64  itcl mk4tcl kitd
2070: 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09  ll'.....else....
2080: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
2090: 53 3d 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  S="${KITCREATOR_
20a0: 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22 0a 09 09  PKGS} kitdll"...
20b0: 09 09 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 65  ..fi....fi.....e
20c0: 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52  xport KITCREATOR
20d0: 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20 5b 20 2d  _PKGS.....if [ -
20e0: 6e 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  n "${KITCREATOR_
20f0: 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  PKGS}" ]; then..
2100: 09 09 09 65 63 68 6f 20 22 20 20 4b 49 54 43 52  ...echo "  KITCR
2110: 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22 24 7b 4b  EATOR_PKGS=\"${K
2120: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 5c  ITCREATOR_PKGS}\
2130: 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  "" >> "${buildlo
2140: 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20  g}".....echo "  
2150: 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f  export KITCREATO
2160: 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24 7b 62 75  R_PKGS" >> "${bu
2170: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a  ildlog}"....fi..
2180: 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61 74 69  ...if [ "${stati
2190: 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  ctk}" = "1" ]; t
21a0: 68 65 6e 0a 09 09 09 09 53 54 41 54 49 43 54 4b  hen.....STATICTK
21b0: 3d 22 31 22 0a 09 09 09 09 65 78 70 6f 72 74 20  ="1".....export 
21c0: 53 54 41 54 49 43 54 4b 0a 0a 09 09 09 09 65 63  STATICTK......ec
21d0: 68 6f 20 22 20 20 53 54 41 54 49 43 54 4b 3d 5c  ho "  STATICTK=\
21e0: 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c 22 22 20  "${STATICTK}\"" 
21f0: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2200: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65 78 70  .....echo "  exp
2210: 6f 72 74 20 53 54 41 54 49 43 54 4b 22 20 3e 3e  ort STATICTK" >>
2220: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2230: 09 09 66 69 0a 0a 09 09 09 69 66 20 65 63 68 6f  ..fi.....if echo
2240: 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 67 72 65   "${args}" | gre
2250: 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65 2d 73  p -- '--enable-s
2260: 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76 2f 6e 75  ymbols' >/dev/nu
2270: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 52  ll; then.....STR
2280: 49 50 3d 27 74 72 75 65 27 0a 09 09 09 09 65 78  IP='true'.....ex
2290: 70 6f 72 74 20 53 54 52 49 50 0a 0a 09 09 09 09  port STRIP......
22a0: 65 63 68 6f 20 22 20 20 53 54 52 49 50 3d 27 74  echo "  STRIP='t
22b0: 72 75 65 27 22 20 3e 3e 20 22 24 7b 62 75 69 6c  rue'" >> "${buil
22c0: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
22d0: 22 20 20 65 78 70 6f 72 74 20 53 54 52 49 50 22  "  export STRIP"
22e0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
22f0: 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b  "....fi.....if [
2300: 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22   "${kitcreator}"
2310: 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65 61 74 6f   != "./kitcreato
2320: 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  r" ]; then.....e
2330: 63 68 6f 20 22 20 20 6d 6b 64 69 72 20 62 75 69  cho "  mkdir bui
2340: 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  ld" >> "${buildl
2350: 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53 65 76 65  og}"......# Seve
2360: 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74  ral build script
2370: 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b 69 74  s rely on minkit
2380: 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20   to work.....if 
2390: 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61  grep './build/ma
23a0: 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24 7b 6b 69  ke-minkit' "${ki
23b0: 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76  tcreator}" >/dev
23c0: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
23d0: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68  l; then......ech
23e0: 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45  o "  cat << \__E
23f0: 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d  OF__ > ./build/m
2400: 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e 20 22  ake-minkit" >> "
2410: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2420: 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20  ..sed 's@^@  @' 
2430: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d   './build/make-m
2440: 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b 62 75 69  inkit' >> "${bui
2450: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68  ldlog}"......ech
2460: 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e  o "  __EOF__" >>
2470: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2480: 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
2490: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
24a0: 09 66 69 0a 0a 09 09 09 09 23 20 53 65 76 65 72  .fi......# Sever
24b0: 61 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74 73  al build scripts
24c0: 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d 6b 69   rely on make-ki
24d0: 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 20 74  t-crosscompile t
24e0: 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72  o work.....if gr
24f0: 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  ep './build/make
2500: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
2510: 65 27 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72  e' "${kitcreator
2520: 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  }" >/dev/null 2>
2530: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
2540: 09 09 09 09 09 65 63 68 6f 20 22 20 20 63 61 74  .....echo "  cat
2550: 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e   << \__EOF__ > .
2560: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d  /build/make-kit-
2570: 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22 20 3e 3e  crosscompile" >>
2580: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2590: 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40  ....sed 's@^@  @
25a0: 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  '  './build/make
25b0: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
25c0: 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  e' >> "${buildlo
25d0: 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 22 20  g}"......echo " 
25e0: 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b   __EOF__" >> "${
25f0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
2600: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
2610: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66 69 0a  ildlog}".....fi.
2620: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 63 61 74  .....echo "  cat
2630: 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 24   << \__EOF__ > $
2640: 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 3e  {kitcreator}" >>
2650: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2660: 09 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27  ...sed 's@^@  @'
2670: 20 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d    "${kitcreator}
2680: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
2690: 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 5f  }".....echo "  _
26a0: 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75  _EOF__" >> "${bu
26b0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
26c0: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
26d0: 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09 09 09 65  log}"....fi....e
26e0: 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69 74 63 72  cho "  \"${kitcr
26f0: 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b 76 65 72  eator}\" \"${ver
2700: 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67 73 7d 22  sion}\" ${args}"
2710: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2720: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
2730: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
2740: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
2750: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
2760: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
2770: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20  log}"....echo " 
2780: 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73 75 6c 74  *** Build Result
2790: 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  s" >> "${buildlo
27a0: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
27b0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
27c0: 0a 09 09 09 62 75 69 6c 64 66 61 69 6c 65 64 3d  ....buildfailed=
27d0: 22 30 22 0a 09 09 09 22 24 7b 6b 69 74 63 72 65  "0"...."${kitcre
27e0: 61 74 6f 72 7d 22 20 22 24 7b 76 65 72 73 69 6f  ator}" "${versio
27f0: 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e 3e 20 22  n}" ${args} >> "
2800: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26  ${buildlog}" 2>&
2810: 31 20 7c 7c 20 62 75 69 6c 64 66 61 69 6c 65 64  1 || buildfailed
2820: 3d 22 31 22 0a 09 09 09 67 72 65 70 20 2d 6e 20  ="1"....grep -n 
2830: 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f 67 20  '^' */build.log 
2840: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2850: 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b 20 22   2>&1.....if [ "
2860: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
2870: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 23 20 43   ]; then.....# C
2880: 72 65 61 74 65 20 74 65 73 74 20 64 72 69 76 65  reate test drive
2890: 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c 0a 09 09  rs for KitDLL...
28a0: 09 09 28 0a 09 09 09 09 09 65 63 68 6f 20 22 22  ..(......echo ""
28b0: 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09  ......echo ""...
28c0: 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09 09 09  ...echo ""......
28d0: 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64  echo " *** Build
28e0: 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65 73 74 20  ing KitDLL test 
28f0: 64 72 69 76 65 72 20 28 74 63 6c 73 68 29 22 0a  driver (tclsh)".
2900: 09 09 09 09 09 65 63 68 6f 20 22 22 0a 0a 09 09  .....echo ""....
2910: 09 09 09 63 64 20 6b 69 74 73 68 2f 62 75 69 6c  ...cd kitsh/buil
2920: 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20 65 78  d/kitsh-*/ || ex
2930: 69 74 20 31 0a 09 09 09 09 09 6d 61 6b 65 20 74  it 1......make t
2940: 63 6c 73 68 0a 09 09 09 09 09 63 70 20 74 63 6c  clsh......cp tcl
2950: 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09 09 09  sh ../../../....
2960: 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  .) >> "${buildlo
2970: 67 7d 22 20 32 3e 26 31 0a 09 09 09 66 69 0a 0a  g}" 2>&1....fi..
2980: 09 09 09 23 20 50 65 72 66 6f 72 6d 20 77 69 6c  ...# Perform wil
2990: 64 63 61 72 64 20 65 78 70 61 6e 73 69 6f 6e 0a  dcard expansion.
29a0: 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22 24  ...createdkit="$
29b0: 28 6c 73 20 2d 66 31 20 24 7b 63 72 65 61 74 65  (ls -f1 ${create
29c0: 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f 6e 75 6c  dkit} 2>/dev/nul
29d0: 6c 20 7c 20 67 72 65 70 20 2d 76 20 27 5c 2e 74  l | grep -v '\.t
29e0: 61 72 5c 2e 67 7a 24 27 20 7c 20 68 65 61 64 20  ar\.gz$' | head 
29f0: 2d 6e 20 31 29 22 0a 0a 09 09 09 69 66 20 5b 20  -n 1)".....if [ 
2a00: 21 20 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b  ! -f "${createdk
2a10: 69 74 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  it}" ]; then....
2a20: 09 65 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f  .echo "Failed to
2a30: 20 63 72 65 61 74 65 20 6b 69 74 20 24 7b 76 65   create kit ${ve
2a40: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e  rsion}/${kit}" >
2a50: 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22  &2......failed="
2a60: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
2a70: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c  ion}/${kit}-buil
2a80: 64 22 0a 0a 09 09 09 09 74 6f 75 63 68 20 22 24  d"......touch "$
2a90: 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d  {failoutputname}
2aa0: 22 0a 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c  ".....mv "${buil
2ab0: 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75  dlog}" "${failbu
2ac0: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d  ildlog}"......rm
2ad0: 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63   -f tclsh......c
2ae0: 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09  ontinue....fi...
2af0: 09 09 23 20 56 65 72 69 66 79 20 73 61 6e 69 74  ..# Verify sanit
2b00: 79 20 6f 66 20 63 72 65 61 74 65 64 20 6b 69 74  y of created kit
2b10: 0a 09 09 09 69 73 73 61 6e 65 3d 31 0a 0a 09 09  ....issane=1....
2b20: 09 23 23 20 56 65 72 69 66 79 20 74 68 61 74 20  .## Verify that 
2b30: 57 69 6e 33 32 20 62 75 69 6c 64 73 20 61 72 65  Win32 builds are
2b40: 20 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70 65   of correct type
2b50: 0a 09 09 09 23 23 20 56 65 72 69 66 79 20 74 68  ....## Verify th
2b60: 61 74 20 44 4c 4c 20 62 75 69 6c 64 73 20 61 72  at DLL builds ar
2b70: 65 20 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70  e of correct typ
2b80: 65 0a 09 09 09 63 61 73 65 20 22 2d 24 7b 76 65  e....case "-${ve
2b90: 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20  rsion}-${kit}-" 
2ba0: 69 6e 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6b  in.....*-win32-k
2bb0: 69 74 64 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d  itdll-*|*-win32-
2bc0: 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09  *-kitdll-*).....
2bd0: 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72  .if ! file "${cr
2be0: 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65  eatedkit}" | gre
2bf0: 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 27 20 7c  p 'MS Windows' |
2c00: 20 67 72 65 70 20 27 28 44 4c 4c 29 27 20 3e 2f   grep '(DLL)' >/
2c10: 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09  dev/null; then..
2c20: 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09  .....issane=0...
2c30: 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09  ...fi......;;...
2c40: 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09  ..*-kitdll-*)...
2c50: 09 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b  ...if ! file "${
2c60: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67  createdkit}" | g
2c70: 72 65 70 20 27 73 68 61 72 65 64 20 6f 62 6a 65  rep 'shared obje
2c80: 63 74 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20  ct' >/dev/null; 
2c90: 74 68 65 6e 0a 09 09 09 09 09 09 69 73 73 61 6e  then.......issan
2ca0: 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09  e=0......fi.....
2cb0: 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d  .;;.....*-win32-
2cc0: 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a  notk-*|*-win32-*
2cd0: 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 09 69 66  -notk-*)......if
2ce0: 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74   ! file "${creat
2cf0: 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27  edkit}" | grep '
2d00: 4d 53 20 57 69 6e 64 6f 77 73 27 20 7c 20 67 72  MS Windows' | gr
2d10: 65 70 20 27 28 63 6f 6e 73 6f 6c 65 29 27 20 3e  ep '(console)' >
2d20: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
2d30: 09 09 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20  ......echo "Kit 
2d40: 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68  failed sanity ch
2d50: 65 63 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20  eck for being a 
2d60: 63 6f 6e 73 6f 6c 65 20 61 70 70 6c 69 63 61 74  console applicat
2d70: 69 6f 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69  ion" >&2.......i
2d80: 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a  ssane=0......fi.
2d90: 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69  .....;;.....*-wi
2da0: 6e 33 32 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  n32-*)......if !
2db0: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
2dc0: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53  kit}" | grep 'MS
2dd0: 20 57 69 6e 64 6f 77 73 27 20 7c 20 67 72 65 70   Windows' | grep
2de0: 20 27 28 47 55 49 29 27 20 3e 2f 64 65 76 2f 6e   '(GUI)' >/dev/n
2df0: 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09  ull; then.......
2e00: 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64  echo "Kit failed
2e10: 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f   sanity check fo
2e20: 72 20 62 65 69 6e 67 20 61 20 47 55 49 20 61 70  r being a GUI ap
2e30: 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32 0a 09  plication" >&2..
2e40: 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09  .....issane=0...
2e50: 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09  ...fi......;;...
2e60: 09 65 73 61 63 0a 0a 09 09 09 23 23 20 56 65 72  .esac.....## Ver
2e70: 69 66 79 20 74 68 65 20 62 75 69 6c 64 20 63 6f  ify the build co
2e80: 6d 70 6c 65 74 65 64 20 77 69 74 68 6f 75 74 20  mpleted without 
2e90: 77 61 72 6e 69 6e 67 73 0a 09 09 09 69 66 20 5b  warnings....if [
2ea0: 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65 64 7d   "${buildfailed}
2eb0: 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a  " = "1" ]; then.
2ec0: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
2ed0: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
2ee0: 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e 67 22 20  k for Building" 
2ef0: 3e 26 32 0a 0a 09 09 09 09 69 73 73 61 6e 65 3d  >&2......issane=
2f00: 30 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4d 61  0....fi.....# Ma
2f10: 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61 6e 69 74  ke note of sanit
2f20: 79 20 66 61 69 6c 75 72 65 0a 09 09 09 69 66 20  y failure....if 
2f30: 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22 20 21 3d  [ "${issane}" !=
2f40: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
2f50: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
2f60: 64 20 73 61 6e 69 74 79 20 24 7b 76 65 72 73 69  d sanity ${versi
2f70: 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a  on}/${kit}" >&2.
2f80: 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
2f90: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
2fa0: 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69 74 79 22  }/${kit}-sanity"
2fb0: 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63 72 65 61  ......mv "${crea
2fc0: 74 65 64 6b 69 74 7d 22 20 22 24 7b 66 61 69 6c  tedkit}" "${fail
2fd0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09  outputname}"....
2fe0: 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d  .mv "${buildlog}
2ff0: 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c 6f  " "${failbuildlo
3000: 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20 74  g}"......rm -f t
3010: 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69 6e  clsh......contin
3020: 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 52  ue....fi.....# R
3030: 65 6e 61 6d 65 20 63 72 65 61 74 65 64 20 6b 69  ename created ki
3040: 74 20 74 6f 20 66 69 6e 61 6c 20 64 65 73 74 69  t to final desti
3050: 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20 22 24 7b  nation....mv "${
3060: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b  createdkit}" "${
3070: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09  outputname}"....
3080: 69 66 20 5b 20 2d 66 20 22 74 63 6c 73 68 22 20  if [ -f "tclsh" 
3090: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d 76 20 22  ]; then.....mv "
30a0: 74 63 6c 73 68 22 20 22 24 7b 6f 75 74 70 75 74  tclsh" "${output
30b0: 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a 09 09 09  name}-tclsh"....
30c0: 66 69 0a 0a 09 09 09 23 20 46 6f 72 20 4b 69 74  fi.....# For Kit
30d0: 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f 74 65  DLL, make a note
30e0: 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c   of the original
30f0: 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b 20 22 24   name....if [ "$
3100: 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20  {kitdll}" = "1" 
3110: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f  ]; then.....echo
3120: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
3130: 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65   > "${outputname
3140: 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 0a 09 09 09  }-origname".....
3150: 09 69 66 20 5b 20 2d 66 20 22 24 7b 73 64 6b 7d  .if [ -f "${sdk}
3160: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 6d  " ]; then......m
3170: 76 20 22 24 7b 73 64 6b 7d 22 20 22 24 7b 6f 75  v "${sdk}" "${ou
3180: 74 70 75 74 6e 61 6d 65 7d 2d 73 64 6b 2e 74 61  tputname}-sdk.ta
3190: 72 2e 67 7a 22 0a 09 09 09 09 66 69 0a 09 09 09  r.gz".....fi....
31a0: 66 69 0a 09 09 66 69 0a 0a 09 09 23 20 54 65 73  fi...fi....# Tes
31b0: 74 20 7a 69 70 20 73 74 61 74 75 73 0a 09 09 69  t zip status...i
31c0: 66 20 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f 75  f unzip -l "${ou
31d0: 74 70 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31 20  tputname}" 2>&1 
31e0: 7c 20 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74 63  | grep 'boot\.tc
31f0: 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  l' >/dev/null; t
3200: 68 65 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d  hen....canunzip=
3210: 22 31 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 61  "1"...else....ca
3220: 6e 75 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69 0a  nunzip="0"...fi.
3230: 0a 09 09 69 66 20 5b 20 22 24 7b 69 73 7a 69 70  ...if [ "${iszip
3240: 7d 22 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a 69  }" != "${canunzi
3250: 70 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 65  p}" ]; then....e
3260: 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 75  cho "Failed to u
3270: 6e 7a 69 70 20 7a 69 70 6b 69 74 20 6f 72 20 77  nzip zipkit or w
3280: 61 73 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69 70  as able to unzip
3290: 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76 65   non-zipkit ${ve
32a0: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e  rsion}/${kit}" >
32b0: 26 32 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22 24  &2.....failed="$
32c0: 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69  {failed} ${versi
32d0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22 0a  on}/${kit}-zip".
32e0: 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66  ....continue...f
32f0: 69 0a 0a 09 09 23 20 44 6f 20 6e 6f 74 20 63 6f  i....# Do not co
3300: 6e 74 69 6e 75 65 20 70 61 73 74 20 68 65 72 65  ntinue past here
3310: 20 66 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c 65   for un-runnable
3320: 20 6b 69 74 73 0a 09 09 69 66 20 5b 20 22 24 7b   kits...if [ "${
3330: 72 75 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22 31  runnable}" != "1
3340: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f 6e  " ]; then....con
3350: 74 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20  tinue...fi....# 
3360: 49 66 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74  If the name of t
3370: 68 65 20 6f 72 69 67 69 6e 61 6c 20 62 75 69 6c  he original buil
3380: 64 20 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c 69  d matters, symli
3390: 6e 6b 20 69 74 20 75 70 0a 09 09 69 66 20 5b 20  nk it up...if [ 
33a0: 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  -f "${outputname
33b0: 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74  }-origname" ]; t
33c0: 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  hen....createdki
33d0: 74 3d 22 24 28 63 61 74 20 22 24 7b 6f 75 74 70  t="$(cat "${outp
33e0: 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65  utname}-origname
33f0: 22 29 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22 24  ")".....ln -s "$
3400: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22 24  {outputname}" "$
3410: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09  {createdkit}"...
3420: 66 69 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d 20  fi....# Perform 
3430: 62 61 74 74 65 72 79 20 6f 66 20 74 65 73 74 73  battery of tests
3440: 0a 09 09 23 23 20 43 6c 65 61 6e 20 74 65 73 74  ...## Clean test
3450: 73 20 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22 24  s log...rm -f "$
3460: 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d  {testresultslog}
3470: 22 0a 09 09 66 6f 72 20 74 65 73 74 73 63 70 20  "...for testscp 
3480: 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f  in "${TESTDIR}"/
3490: 74 65 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f 0a  tests/*.tcl; do.
34a0: 09 09 09 74 65 73 74 73 63 70 5f 74 61 67 3d 22  ...testscp_tag="
34b0: 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 74 65  $(basename "${te
34c0: 73 74 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a 09  stscp}" .tcl)"..
34d0: 09 09 74 65 73 74 73 63 70 70 72 65 3d 22 24 28  ..testscppre="$(
34e0: 64 69 72 6e 61 6d 65 20 22 24 7b 74 65 73 74 73  dirname "${tests
34f0: 63 70 7d 22 29 2f 24 7b 74 65 73 74 73 63 70 5f  cp}")/${testscp_
3500: 74 61 67 7d 2e 73 68 22 0a 09 09 09 73 63 70 6c  tag}.sh"....scpl
3510: 6f 67 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75 74  ogfile="${output
3520: 6e 61 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70 5f  name}-${testscp_
3530: 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23 20  tag}.log".....# 
3540: 49 66 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73 20  If a command is 
3550: 72 65 71 75 69 72 65 64 20 74 6f 20 73 74 61 72  required to star
3560: 74 20 74 68 65 20 6b 69 74 2c 20 70 72 65 70 61  t the kit, prepa
3570: 72 65 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09 09  re to kill it...
3580: 09 23 20 69 6e 20 63 61 73 65 20 6f 66 20 74 69  .# in case of ti
3590: 6d 65 6f 75 74 2e 0a 09 09 09 23 23 20 54 65 6d  meout.....## Tem
35a0: 70 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c 65  porarily disable
35b0: 64 20 73 69 6e 63 65 20 63 75 72 72 65 6e 74 6c  d since currentl
35c0: 79 20 69 74 20 69 73 20 63 61 75 73 69 6e 67 0a  y it is causing.
35d0: 09 09 09 23 23 20 6d 6f 72 65 20 70 72 6f 62 6c  ...## more probl
35e0: 65 6d 73 20 69 6e 20 74 68 65 20 66 6f 72 6d 20  ems in the form 
35f0: 6f 66 20 74 65 73 74 73 20 62 65 69 6e 67 20 6b  of tests being k
3600: 69 6c 6c 65 64 0a 09 09 09 23 23 20 70 72 65 6d  illed....## prem
3610: 61 74 75 72 65 6c 79 20 74 68 61 6e 20 77 65 20  aturely than we 
3620: 61 72 65 20 68 61 76 69 6e 67 20 69 73 73 75 65  are having issue
3630: 73 20 77 69 74 68 20 74 65 73 74 73 0a 09 09 09  s with tests....
3640: 23 23 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b 69  ## hanging....ki
3650: 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a 09  trunkillpid=""..
3660: 09 09 69 66 20 5b 20 22 31 22 20 3d 20 22 30 22  ..if [ "1" = "0"
3670: 20 2d 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75 6e   -a -n "${kitrun
3680: 63 6d 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09  cmd}" ]; then...
3690: 09 09 28 0a 09 09 09 09 09 73 6c 65 65 70 20 31  ..(......sleep 1
36a0: 32 30 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c 20  20......killall 
36b0: 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 6f  "$(basename "${o
36c0: 75 74 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e 2f  utputname}")" >/
36d0: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
36e0: 6e 75 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65 76  null.....) >/dev
36f0: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
3700: 6c 20 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b 69  l &.....kitrunki
3710: 6c 6c 70 69 64 3d 22 24 21 22 0a 09 09 09 66 69  llpid="$!"....fi
3720: 0a 0a 09 09 09 28 0a 09 09 09 09 69 66 20 5b 20  .....(.....if [ 
3730: 2d 66 20 22 24 7b 74 65 73 74 73 63 70 70 72 65  -f "${testscppre
3740: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09  }" ]; then......
3750: 2e 20 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d  . "${testscppre}
3760: 22 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 69 66  ".....fi......if
3770: 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d   [ "${kitdll}" =
3780: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
3790: 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20 22  ..${kitruncmd} "
37a0: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63  ${outputname}-tc
37b0: 6c 73 68 22 20 22 24 7b 74 65 73 74 73 63 70 7d  lsh" "${testscp}
37c0: 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  " "${outputname}
37d0: 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65  " "${kit}" "${ve
37e0: 72 73 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73 65  rsion}".....else
37f0: 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d  ......${kitruncm
3800: 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  d} "${outputname
3810: 7d 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20  }" "${testscp}" 
3820: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20  "${outputname}" 
3830: 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72 73  "${kit}" "${vers
3840: 69 6f 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09 09  ion}".....fi....
3850: 29 20 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c  ) > "${scplogfil
3860: 65 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20  e}" 2>&1.....if 
3870: 5b 20 22 24 3f 22 20 21 3d 20 22 30 22 20 5d 3b  [ "$?" != "0" ];
3880: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
3890: 53 63 72 69 70 74 20 66 61 69 6c 65 64 3a 20 24  Script failed: $
38a0: 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 20 6f 6e  {testscp_tag} on
38b0: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
38c0: 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69  t}" >&2......fai
38d0: 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24  led="${failed} $
38e0: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
38f0: 2d 74 65 73 74 2d 24 7b 74 65 73 74 73 63 70 5f  -test-${testscp_
3900: 74 61 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f 20  tag}"......echo 
3910: 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a  "${testscp_tag}:
3920: 20 46 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74 65   FAIL" >>  "${te
3930: 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a  stresultslog}"..
3940: 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09  ....continue....
3950: 66 69 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74 68  fi.....# Kill th
3960: 65 20 77 61 74 63 68 64 6f 67 20 66 6f 72 20 74  e watchdog for t
3970: 68 69 73 20 69 74 65 72 61 74 69 6f 6e 0a 09 09  his iteration...
3980: 09 69 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74 72  .if [ -n "${kitr
3990: 75 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20 74  unkillpid}" ]; t
39a0: 68 65 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39 20  hen.....kill -9 
39b0: 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64  "${kitrunkillpid
39c0: 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  }" >/dev/null 2>
39d0: 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69 0a  /dev/null....fi.
39e0: 0a 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74  ....echo "${test
39f0: 73 63 70 5f 74 61 67 7d 3a 20 50 41 53 53 22 20  scp_tag}: PASS" 
3a00: 3e 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c  >>  "${testresul
3a10: 74 73 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20 2d  tslog}".....rm -
3a20: 66 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65 7d  f "${scplogfile}
3a30: 22 0a 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20 5b  "...done....if [
3a40: 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d   -f "${outputnam
3a50: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20  e}-origname" ]; 
3a60: 74 68 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22 24  then....rm -f "$
3a70: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09  {createdkit}"...
3a80: 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a 69  fi..done.done..i
3a90: 66 20 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65 64  f [ -n "${failed
3aa0: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f  }" ]; then..echo
3ab0: 20 22 46 61 69 6c 65 64 3a 20 24 7b 66 61 69 6c   "Failed: ${fail
3ac0: 65 64 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61 6e  ed}".fi..# Clean
3ad0: 75 70 0a 23 23 20 54 65 72 6d 69 6e 61 74 65 20  up.## Terminate 
3ae0: 58 76 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24 7b  Xvfb.kill -9 "${
3af0: 58 56 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20 52  XVFB_PID}"..## R
3b00: 65 6d 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d 72  emove wine.rm -r
3b10: 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d  f "${WINEPREFIX}
3b20: 22 0a 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20  ".../kitcreator 
3b30: 63 6c 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c 73  clean.rm -f tcls
3b40: 68 0a                                            h.