Hex Artifact Content

Artifact f42651a667cb6259171b2a17d403d742b12fb63d:


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: 23 20 58 58 58 3a 20 44 69 73 61 62 6c 65 64 20  # XXX: Disabled 
1130: 66 6f 72 20 6e 6f 77 2c 20 73 69 6e 63 65 20 49  for now, since I
1140: 20 64 6f 6e 27 74 20 68 61 76 65 20 57 49 4e 45   don't have WINE
1150: 20 69 6e 73 74 61 6c 6c 65 64 0a 09 09 09 72 75   installed....ru
1160: 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09 09 23 6b  nnable="0"....#k
1170: 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22 0a  itruncmd="wine".
1180: 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 6d 69  ...;;...linux-mi
1190: 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e 75 78 2d 6d  psel-min|linux-m
11a0: 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64 6c 6c  ipsel-min-kitdll
11b0: 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d  )....kitcreator=
11c0: 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69  "./build/make-ki
11d0: 74 2d 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 22 0a  t-linux-mipsel".
11e0: 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a  ...runnable="0".
11f0: 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a  ...xcompile="1".
1200: 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 69  ...notk="1"....i
1210: 73 7a 69 70 3d 22 31 22 0a 09 09 09 3b 3b 0a 09  szip="1"....;;..
1220: 09 61 6e 64 72 6f 69 64 2d 61 72 6d 7c 61 6e 64  .android-arm|and
1230: 72 6f 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09 09 6c  roid-arm-*|\...l
1240: 69 6e 75 78 2d 6d 69 70 73 65 6c 7c 6c 69 6e 75  inux-mipsel|linu
1250: 78 2d 6d 69 70 73 65 6c 2d 2a 7c 5c 0a 09 09 6c  x-mipsel-*|\...l
1260: 69 6e 75 78 2d 69 33 38 36 7c 6c 69 6e 75 78 2d  inux-i386|linux-
1270: 69 33 38 36 2d 2a 7c 5c 0a 09 09 6c 69 6e 75 78  i386-*|\...linux
1280: 2d 61 6d 64 36 34 7c 6c 69 6e 75 78 2d 61 6d 64  -amd64|linux-amd
1290: 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  64-*|\...solaris
12a0: 2d 69 33 38 36 7c 73 6f 6c 61 72 69 73 2d 69 33  -i386|solaris-i3
12b0: 38 36 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  86-*|\...solaris
12c0: 2d 61 6d 64 36 34 7c 73 6f 6c 61 72 69 73 2d 61  -amd64|solaris-a
12d0: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  md64-*|\...solar
12e0: 69 73 2d 73 70 61 72 63 7c 73 6f 6c 61 72 69 73  is-sparc|solaris
12f0: 2d 73 70 61 72 63 2d 2a 7c 5c 0a 09 09 73 6f 6c  -sparc-*|\...sol
1300: 61 72 69 73 2d 73 70 61 72 63 36 34 7c 73 6f 6c  aris-sparc64|sol
1310: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 2a 7c 5c  aris-sparc64-*|\
1320: 0a 09 09 66 72 65 65 62 73 64 2d 61 6d 64 36 34  ...freebsd-amd64
1330: 7c 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d 2a  |freebsd-amd64-*
1340: 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 69 33 38 36  |\...netbsd-i386
1350: 7c 6e 65 74 62 73 64 2d 69 33 38 36 2d 2a 7c 5c  |netbsd-i386-*|\
1360: 0a 09 09 6e 65 74 62 73 64 2d 61 6d 64 36 34 7c  ...netbsd-amd64|
1370: 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c  netbsd-amd64-*|\
1380: 0a 09 09 68 70 75 78 2d 68 70 70 61 36 34 7c 68  ...hpux-hppa64|h
1390: 70 75 78 2d 68 70 70 61 36 34 2d 2a 29 0a 09 09  pux-hppa64-*)...
13a0: 09 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65 63 68  .platform="$(ech
13b0: 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 63 75 74  o "${kit}" | cut
13c0: 20 2d 66 20 31 2d 32 20 2d 64 20 27 2d 27 29 22   -f 1-2 -d '-')"
13d0: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
13e0: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74  ./build/make-kit
13f0: 2d 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 0a 09 09  -${platform}"...
1400: 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09  .runnable="0"...
1410: 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09  .xcompile="1"...
1420: 09 69 73 7a 69 70 3d 22 30 22 0a 0a 09 09 09 69  .iszip="0".....i
1430: 66 20 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20  f echo "${kit}" 
1440: 7c 20 65 67 72 65 70 20 2d 2d 20 27 2d 28 68 70  | egrep -- '-(hp
1450: 70 61 36 34 7c 61 6d 64 36 34 7c 73 70 61 72 63  pa64|amd64|sparc
1460: 36 34 29 2d 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  64)-' >/dev/null
1470: 3b 20 74 68 65 6e 0a 09 09 09 09 61 72 67 73 3d  ; then.....args=
1480: 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c  "${args} --enabl
1490: 65 2d 36 34 62 69 74 22 0a 09 09 09 66 69 0a 09  e-64bit"....fi..
14a0: 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09 69 66 20  ..;;..esac...if 
14b0: 5b 20 22 24 7b 78 63 6f 6d 70 69 6c 65 7d 22 20  [ "${xcompile}" 
14c0: 21 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e 0a 09  != "0" ]; then..
14d0: 09 6b 69 74 3d 22 24 7b 6b 69 74 7d 2d 78 63 6f  .kit="${kit}-xco
14e0: 6d 70 69 6c 65 22 0a 09 66 69 0a 0a 09 23 20 48  mpile"..fi...# H
14f0: 61 6e 64 6c 65 20 61 64 64 69 74 69 6f 6e 61 6c  andle additional
1500: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09   configuration..
1510: 74 65 6d 70 6b 69 74 3d 22 2d 24 7b 6b 69 74 7d  tempkit="-${kit}
1520: 2d 22 0a 09 66 6f 72 20 74 72 79 20 69 6e 20 31  -"..for try in 1
1530: 20 32 20 33 20 34 20 35 20 36 20 37 20 38 20 39   2 3 4 5 6 7 8 9
1540: 3b 20 64 6f 0a 09 09 63 61 73 65 20 22 2d 24 7b  ; do...case "-${
1550: 74 65 6d 70 6b 69 74 7d 2d 22 20 69 6e 0a 09 09  tempkit}-" in...
1560: 09 2a 2d 74 68 72 65 61 64 65 64 2d 2a 29 0a 09  .*-threaded-*)..
1570: 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63  ...tempkit="$(ec
1580: 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20  ho "${tempkit}" 
1590: 7c 20 73 65 64 20 27 73 40 2d 74 68 72 65 61 64  | sed 's@-thread
15a0: 65 64 2d 40 2d 40 27 29 22 0a 09 09 09 09 61 72  ed-@-@')".....ar
15b0: 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e  gs="${args} --en
15c0: 61 62 6c 65 2d 74 68 72 65 61 64 73 22 0a 09 09  able-threads"...
15d0: 09 09 3b 3b 0a 09 09 09 2a 2d 7a 69 70 2d 2a 29  ..;;....*-zip-*)
15e0: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
15f0: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
1600: 22 20 7c 20 73 65 64 20 27 73 40 2d 7a 69 70 2d  " | sed 's@-zip-
1610: 40 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d  @-@')".....args=
1620: 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c  "${args} --enabl
1630: 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7a 69  e-kit-storage=zi
1640: 70 22 0a 09 09 09 09 69 73 7a 69 70 3d 22 31 22  p".....iszip="1"
1650: 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 73 74 61  .....;;....*-sta
1660: 74 69 63 74 6b 2d 2a 29 0a 09 09 09 09 74 65 6d  tictk-*).....tem
1670: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1680: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1690: 27 73 40 2d 73 74 61 74 69 63 74 6b 2d 40 2d 40  's@-statictk-@-@
16a0: 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22 24 7b  ')".....if [ "${
16b0: 6e 6f 74 6b 7d 22 20 3d 20 22 30 22 20 5d 3b 20  notk}" = "0" ]; 
16c0: 74 68 65 6e 0a 09 09 09 09 09 73 74 61 74 69 63  then......static
16d0: 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73 65 0a  tk="1".....else.
16e0: 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b 69 74  .....echo "${kit
16f0: 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63 72 65  }: Unable to cre
1700: 61 74 65 20 53 74 61 74 69 63 54 6b 20 61 6e 64  ate StaticTk and
1710: 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67 20   NoTk, ignoring 
1720: 53 74 61 74 69 63 54 6b 22 20 3e 26 32 0a 09 09  StaticTk" >&2...
1730: 09 09 66 69 0a 09 09 09 09 3b 3b 0a 09 09 09 2a  ..fi.....;;....*
1740: 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09 09 74 65 6d  -notk-*).....tem
1750: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1760: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1770: 27 73 40 2d 6e 6f 74 6b 2d 40 2d 40 27 29 22 0a  's@-notk-@-@')".
1780: 09 09 09 09 69 66 20 5b 20 22 24 7b 73 74 61 74  ....if [ "${stat
1790: 69 63 74 6b 7d 22 20 3d 20 22 30 22 20 5d 3b 20  ictk}" = "0" ]; 
17a0: 74 68 65 6e 0a 09 09 09 09 09 6e 6f 74 6b 3d 22  then......notk="
17b0: 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09  1".....else.....
17c0: 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a 20 55  .echo "${kit}: U
17d0: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
17e0: 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e 6f 54  StaticTk and NoT
17f0: 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 4e 6f 54 6b  k, ignoring NoTk
1800: 22 20 3e 26 32 0a 09 09 09 09 66 69 0a 09 09 09  " >&2.....fi....
1810: 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 6d 6b 34 2d 2a  .;;....*-nomk4-*
1820: 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24  ).....tempkit="$
1830: 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74  (echo "${tempkit
1840: 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 6e 6f 6d  }" | sed 's@-nom
1850: 6b 34 2d 40 2d 40 27 29 22 0a 09 09 09 09 6e 6f  k4-@-@')".....no
1860: 6d 6b 34 3d 22 31 22 0a 09 09 09 09 69 73 7a 69  mk4="1".....iszi
1870: 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09  p="1".....;;....
1880: 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09  *-kitdll-*).....
1890: 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20  tempkit="$(echo 
18a0: 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73  "${tempkit}" | s
18b0: 65 64 20 27 73 40 2d 6b 69 74 64 6c 6c 2d 40 2d  ed 's@-kitdll-@-
18c0: 40 27 29 22 0a 09 09 09 09 6b 69 74 64 6c 6c 3d  @')".....kitdll=
18d0: 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d  "1".....;;....*-
18e0: 64 65 62 75 67 2d 2a 29 0a 09 09 09 09 74 65 6d  debug-*).....tem
18f0: 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  pkit="$(echo "${
1900: 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20  tempkit}" | sed 
1910: 27 73 40 2d 64 65 62 75 67 2d 40 2d 40 27 29 22  's@-debug-@-@')"
1920: 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67  .....args="${arg
1930: 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 73 79 6d 62  s} --enable-symb
1940: 6f 6c 73 22 0a 09 09 09 09 3b 3b 0a 09 09 65 73  ols".....;;...es
1950: 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20 5b 20  ac..done...if [ 
1960: 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31  "${kitdll}" = "1
1970: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 23 20 43 75  " ]; then...# Cu
1980: 72 72 65 6e 74 6c 79 20 6e 6f 20 4b 69 74 44 4c  rrently no KitDL
1990: 4c 20 75 73 65 73 20 5a 69 70 0a 09 09 69 73 7a  L uses Zip...isz
19a0: 69 70 3d 22 30 22 0a 09 66 69 0a 0a 09 66 6f 72  ip="0"..fi...for
19b0: 20 76 65 72 73 69 6f 6e 20 69 6e 20 24 7b 56 45   version in ${VE
19c0: 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a 09 09 23 20  RSIONS}; do...# 
19d0: 57 6f 72 6b 20 61 72 6f 75 6e 64 20 63 68 61 6e  Work around chan
19e0: 67 65 73 20 69 6e 20 64 65 66 61 75 6c 74 20 62  ges in default b
19f0: 65 68 61 76 69 6f 75 72 0a 09 09 69 66 20 5b 20  ehaviour...if [ 
1a00: 22 24 7b 76 65 72 73 69 6f 6e 7d 22 20 3d 20 22  "${version}" = "
1a10: 63 76 73 5f 48 45 41 44 22 20 5d 3b 20 74 68 65  cvs_HEAD" ]; the
1a20: 6e 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68 6f  n....kit="$(echo
1a30: 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20   "${kit}" | sed 
1a40: 27 73 40 2d 74 68 72 65 61 64 65 64 40 2d 75 6e  's@-threaded@-un
1a50: 74 68 72 65 61 64 65 64 40 27 29 22 0a 09 09 09  threaded@')"....
1a60: 61 72 67 73 3d 22 24 28 65 63 68 6f 20 22 24 7b  args="$(echo "${
1a70: 61 72 67 73 7d 22 20 7c 20 73 65 64 20 27 73 40  args}" | sed 's@
1a80: 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64   --enable-thread
1a90: 73 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74 68 72  s@ --disable-thr
1aa0: 65 61 64 73 40 27 29 22 0a 09 09 66 69 0a 0a 09  eads@')"...fi...
1ab0: 09 23 20 43 72 65 61 74 65 20 54 63 6c 6b 69 74  .# Create Tclkit
1ac0: 0a 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c  ...if [ "${kitdl
1ad0: 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  l}" = "1" ]; the
1ae0: 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d  n....createdkit=
1af0: 22 6c 69 62 74 63 6c 6b 69 74 2a 2e 64 6c 6c 20  "libtclkit*.dll 
1b00: 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a 22 0a 09 09  libtclkit*.*"...
1b10: 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54  .outputname="${T
1b20: 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 6c 69 62  ESTDIR}/kits/lib
1b30: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
1b40: 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66 61 69  }-${kit}"....fai
1b50: 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54  loutputname="${T
1b60: 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66 61 69  ESTDIR}/kits/fai
1b70: 6c 65 64 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b  led/libtclkit-${
1b80: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22  version}-${kit}"
1b90: 0a 09 09 09 73 64 6b 3d 22 6c 69 62 74 63 6c 6b  ....sdk="libtclk
1ba0: 69 74 2d 73 64 6b 2d 24 7b 76 65 72 73 69 6f 6e  it-sdk-${version
1bb0: 7d 2e 74 61 72 2e 67 7a 22 0a 09 09 65 6c 73 65  }.tar.gz"...else
1bc0: 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d 22  ....createdkit="
1bd0: 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e  tclkit-${version
1be0: 7d 22 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65  }"....outputname
1bf0: 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74  ="${TESTDIR}/kit
1c00: 73 2f 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  s/tclkit-${versi
1c10: 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66  on}-${kit}"....f
1c20: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ailoutputname="$
1c30: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
1c40: 61 69 6c 65 64 2f 74 63 6c 6b 69 74 2d 24 7b 76  ailed/tclkit-${v
1c50: 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a  ersion}-${kit}".
1c60: 09 09 09 73 64 6b 3d 27 27 0a 09 09 66 69 0a 09  ...sdk=''...fi..
1c70: 09 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 6f 75 74  .buildlog="${out
1c80: 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c  putname}-build.l
1c90: 6f 67 22 0a 09 09 66 61 69 6c 62 75 69 6c 64 6c  og"...failbuildl
1ca0: 6f 67 3d 22 24 7b 66 61 69 6c 6f 75 74 70 75 74  og="${failoutput
1cb0: 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f 67 22  name}-build.log"
1cc0: 0a 09 09 74 65 73 74 72 65 73 75 6c 74 73 6c 6f  ...testresultslo
1cd0: 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  g="${outputname}
1ce0: 2d 74 65 73 74 73 2e 6c 6f 67 22 0a 0a 09 09 69  -tests.log"....i
1cf0: 66 20 5b 20 21 20 2d 66 20 22 24 7b 6f 75 74 70  f [ ! -f "${outp
1d00: 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68 65 6e  utname}" ]; then
1d10: 0a 09 09 09 75 6e 73 65 74 20 4b 49 54 43 52 45  ....unset KITCRE
1d20: 41 54 4f 52 5f 50 4b 47 53 20 53 54 41 54 49 43  ATOR_PKGS STATIC
1d30: 54 4b 20 53 54 52 49 50 0a 0a 09 09 09 69 66 20  TK STRIP.....if 
1d40: 5b 20 2d 66 20 22 24 7b 66 61 69 6c 6f 75 74 70  [ -f "${failoutp
1d50: 75 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68 65 6e  utname}" ]; then
1d60: 0a 09 09 09 09 65 63 68 6f 20 22 53 6b 69 70 70  .....echo "Skipp
1d70: 69 6e 67 20 72 65 62 75 69 6c 64 69 6e 67 20 66  ing rebuilding f
1d80: 61 69 6c 65 64 20 6b 69 74 20 24 7b 76 65 72 73  ailed kit ${vers
1d90: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 20 2e 2e 2e 22  ion}/${kit} ..."
1da0: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
1db0: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
1dc0: 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22  n}/${kit}-build"
1dd0: 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09  ......continue..
1de0: 09 09 66 69 0a 0a 09 09 09 72 6d 20 2d 66 20 74  ..fi.....rm -f t
1df0: 63 6c 73 68 0a 09 09 09 2e 2f 6b 69 74 63 72 65  clsh...../kitcre
1e00: 61 74 6f 72 20 63 6c 65 61 6e 20 3e 2f 64 65 76  ator clean >/dev
1e10: 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c  /null 2>/dev/nul
1e20: 6c 0a 0a 09 09 09 65 63 68 6f 20 22 43 72 65 61  l.....echo "Crea
1e30: 74 69 6e 67 20 54 63 6c 6b 69 74 20 24 7b 76 65  ting Tclkit ${ve
1e40: 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2e 2e 2e  rsion}/${kit}...
1e50: 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20  "....echo " *** 
1e60: 42 75 69 6c 64 20 73 74 61 72 74 65 64 20 24 28  Build started $(
1e70: 77 68 6f 61 6d 69 29 40 24 28 68 6f 73 74 6e 61  whoami)@$(hostna
1e80: 6d 65 29 20 6f 6e 20 24 28 64 61 74 65 29 22 20  me) on $(date)" 
1e90: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
1ea0: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
1eb0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
1ec0: 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20  cho " *** Build 
1ed0: 53 63 72 69 70 74 22 20 3e 3e 20 22 24 7b 62 75  Script" >> "${bu
1ee0: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 69 66 20  ildlog}".....if 
1ef0: 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 31  [ "${notk}" = "1
1f00: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 4b 49  " ]; then.....KI
1f10: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 69  TCREATOR_PKGS='i
1f20: 74 63 6c 20 6d 6b 34 74 63 6c 27 0a 09 09 09 66  tcl mk4tcl'....f
1f30: 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f  i.....if [ "${no
1f40: 6d 6b 34 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  mk4}" = "1" ]; t
1f50: 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20  hen.....if [ -z 
1f60: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
1f70: 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  GS}" ]; then....
1f80: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
1f90: 53 3d 27 69 74 63 6c 20 74 6b 27 0a 09 09 09 09  S='itcl tk'.....
1fa0: 65 6c 73 65 0a 09 09 09 09 09 4b 49 54 43 52 45  else......KITCRE
1fb0: 41 54 4f 52 5f 50 4b 47 53 3d 22 24 28 65 63 68  ATOR_PKGS="$(ech
1fc0: 6f 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  o "${KITCREATOR_
1fd0: 50 4b 47 53 7d 22 20 7c 20 73 65 64 20 27 73 40  PKGS}" | sed 's@
1fe0: 6d 6b 34 74 63 6c 40 40 27 29 22 0a 09 09 09 09  mk4tcl@@')".....
1ff0: 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20  fi....fi.....if 
2000: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
2010: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
2020: 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52  if [ -z "${KITCR
2030: 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20  EATOR_PKGS}" ]; 
2040: 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43 52 45  then......KITCRE
2050: 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74  ATOR_PKGS='tk it
2060: 63 6c 20 6d 6b 34 74 63 6c 20 6b 69 74 64 6c 6c  cl mk4tcl kitdll
2070: 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09  '.....else......
2080: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d  KITCREATOR_PKGS=
2090: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
20a0: 47 53 7d 20 6b 69 74 64 6c 6c 22 0a 09 09 09 09  GS} kitdll".....
20b0: 66 69 0a 09 09 09 66 69 0a 0a 09 09 09 65 78 70  fi....fi.....exp
20c0: 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50  ort KITCREATOR_P
20d0: 4b 47 53 0a 0a 09 09 09 69 66 20 5b 20 2d 6e 20  KGS.....if [ -n 
20e0: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
20f0: 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  GS}" ]; then....
2100: 09 65 63 68 6f 20 22 20 20 4b 49 54 43 52 45 41  .echo "  KITCREA
2110: 54 4f 52 5f 50 4b 47 53 3d 5c 22 24 7b 4b 49 54  TOR_PKGS=\"${KIT
2120: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 5c 22 22  CREATOR_PKGS}\""
2130: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2140: 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20 65 78  ".....echo "  ex
2150: 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f 52 5f  port KITCREATOR_
2160: 50 4b 47 53 22 20 3e 3e 20 22 24 7b 62 75 69 6c  PKGS" >> "${buil
2170: 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09  dlog}"....fi....
2180: 09 69 66 20 5b 20 22 24 7b 73 74 61 74 69 63 74  .if [ "${statict
2190: 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  k}" = "1" ]; the
21a0: 6e 0a 09 09 09 09 53 54 41 54 49 43 54 4b 3d 22  n.....STATICTK="
21b0: 31 22 0a 09 09 09 09 65 78 70 6f 72 74 20 53 54  1".....export ST
21c0: 41 54 49 43 54 4b 0a 0a 09 09 09 09 65 63 68 6f  ATICTK......echo
21d0: 20 22 20 20 53 54 41 54 49 43 54 4b 3d 5c 22 24   "  STATICTK=\"$
21e0: 7b 53 54 41 54 49 43 54 4b 7d 5c 22 22 20 3e 3e  {STATICTK}\"" >>
21f0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2200: 09 09 09 65 63 68 6f 20 22 20 20 65 78 70 6f 72  ...echo "  expor
2210: 74 20 53 54 41 54 49 43 54 4b 22 20 3e 3e 20 22  t STATICTK" >> "
2220: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2230: 66 69 0a 0a 09 09 09 69 66 20 65 63 68 6f 20 22  fi.....if echo "
2240: 24 7b 61 72 67 73 7d 22 20 7c 20 67 72 65 70 20  ${args}" | grep 
2250: 2d 2d 20 27 2d 2d 65 6e 61 62 6c 65 2d 73 79 6d  -- '--enable-sym
2260: 62 6f 6c 73 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  bols' >/dev/null
2270: 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 52 49 50  ; then.....STRIP
2280: 3d 27 74 72 75 65 27 0a 09 09 09 09 65 78 70 6f  ='true'.....expo
2290: 72 74 20 53 54 52 49 50 0a 0a 09 09 09 09 65 63  rt STRIP......ec
22a0: 68 6f 20 22 20 20 53 54 52 49 50 3d 27 74 72 75  ho "  STRIP='tru
22b0: 65 27 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  e'" >> "${buildl
22c0: 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20  og}".....echo " 
22d0: 20 65 78 70 6f 72 74 20 53 54 52 49 50 22 20 3e   export STRIP" >
22e0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
22f0: 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22  ...fi.....if [ "
2300: 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 21  ${kitcreator}" !
2310: 3d 20 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72 22  = "./kitcreator"
2320: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
2330: 6f 20 22 20 20 6d 6b 64 69 72 20 62 75 69 6c 64  o "  mkdir build
2340: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
2350: 7d 22 0a 0a 09 09 09 09 23 20 53 65 76 65 72 61  }"......# Severa
2360: 6c 20 62 75 69 6c 64 20 73 63 72 69 70 74 73 20  l build scripts 
2370: 72 65 6c 79 20 6f 6e 20 6d 69 6e 6b 69 74 20 74  rely on minkit t
2380: 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72  o work.....if gr
2390: 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  ep './build/make
23a0: 2d 6d 69 6e 6b 69 74 27 20 22 24 7b 6b 69 74 63  -minkit' "${kitc
23b0: 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e  reator}" >/dev/n
23c0: 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b  ull 2>/dev/null;
23d0: 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68 6f 20   then......echo 
23e0: 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46  "  cat << \__EOF
23f0: 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b  __ > ./build/mak
2400: 65 2d 6d 69 6e 6b 69 74 22 20 3e 3e 20 22 24 7b  e-minkit" >> "${
2410: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
2420: 73 65 64 20 27 73 40 5e 40 20 20 40 27 20 20 27  sed 's@^@  @'  '
2430: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e  ./build/make-min
2440: 6b 69 74 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  kit' >> "${build
2450: 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20  log}"......echo 
2460: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
2470: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2480: 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b  ..echo '' >> "${
2490: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 66  buildlog}".....f
24a0: 69 0a 0a 09 09 09 09 23 20 53 65 76 65 72 61 6c  i......# Several
24b0: 20 62 75 69 6c 64 20 73 63 72 69 70 74 73 20 72   build scripts r
24c0: 65 6c 79 20 6f 6e 20 6d 61 6b 65 2d 6b 69 74 2d  ely on make-kit-
24d0: 63 72 6f 73 73 63 6f 6d 70 69 6c 65 20 74 6f 20  crosscompile to 
24e0: 77 6f 72 6b 0a 09 09 09 09 69 66 20 67 72 65 70  work.....if grep
24f0: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b   './build/make-k
2500: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 27  it-crosscompile'
2510: 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22   "${kitcreator}"
2520: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
2530: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2540: 09 09 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c  ...echo "  cat <
2550: 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62  < \__EOF__ > ./b
2560: 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72  uild/make-kit-cr
2570: 6f 73 73 63 6f 6d 70 69 6c 65 22 20 3e 3e 20 22  osscompile" >> "
2580: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2590: 09 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20  ..sed 's@^@  @' 
25a0: 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b   './build/make-k
25b0: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 27  it-crosscompile'
25c0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
25d0: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20 5f  "......echo "  _
25e0: 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75  _EOF__" >> "${bu
25f0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63  ildlog}"......ec
2600: 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c  ho '' >> "${buil
2610: 64 6c 6f 67 7d 22 0a 09 09 09 09 66 69 0a 0a 09  dlog}".....fi...
2620: 09 09 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c  ...echo "  cat <
2630: 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 24 7b 6b  < \__EOF__ > ${k
2640: 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 3e 20 22  itcreator}" >> "
2650: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2660: 09 73 65 64 20 27 73 40 5e 40 20 20 40 27 20 20  .sed 's@^@  @'  
2670: 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20  "${kitcreator}" 
2680: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2690: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 5f 5f 45  .....echo "  __E
26a0: 4f 46 5f 5f 22 20 3e 3e 20 22 24 7b 62 75 69 6c  OF__" >> "${buil
26b0: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
26c0: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
26d0: 67 7d 22 0a 09 09 09 66 69 0a 09 09 09 65 63 68  g}"....fi....ech
26e0: 6f 20 22 20 20 5c 22 24 7b 6b 69 74 63 72 65 61  o "  \"${kitcrea
26f0: 74 6f 72 7d 5c 22 20 5c 22 24 7b 76 65 72 73 69  tor}\" \"${versi
2700: 6f 6e 7d 5c 22 20 24 7b 61 72 67 73 7d 22 20 3e  on}\" ${args}" >
2710: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2720: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2730: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
2740: 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69  cho '' >> "${bui
2750: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2760: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2770: 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a  g}"....echo " **
2780: 2a 20 42 75 69 6c 64 20 52 65 73 75 6c 74 73 22  * Build Results"
2790: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
27a0: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
27b0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09  "${buildlog}"...
27c0: 09 09 62 75 69 6c 64 66 61 69 6c 65 64 3d 22 30  ..buildfailed="0
27d0: 22 0a 09 09 09 22 24 7b 6b 69 74 63 72 65 61 74  "...."${kitcreat
27e0: 6f 72 7d 22 20 22 24 7b 76 65 72 73 69 6f 6e 7d  or}" "${version}
27f0: 22 20 24 7b 61 72 67 73 7d 20 3e 3e 20 22 24 7b  " ${args} >> "${
2800: 62 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 20  buildlog}" 2>&1 
2810: 7c 7c 20 62 75 69 6c 64 66 61 69 6c 65 64 3d 22  || buildfailed="
2820: 31 22 0a 09 09 09 67 72 65 70 20 2d 6e 20 27 5e  1"....grep -n '^
2830: 27 20 2a 2f 62 75 69 6c 64 2e 6c 6f 67 20 3e 3e  ' */build.log >>
2840: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 32   "${buildlog}" 2
2850: 3e 26 31 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b  >&1.....if [ "${
2860: 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d  kitdll}" = "1" ]
2870: 3b 20 74 68 65 6e 0a 09 09 09 09 23 20 43 72 65  ; then.....# Cre
2880: 61 74 65 20 74 65 73 74 20 64 72 69 76 65 72 73  ate test drivers
2890: 20 66 6f 72 20 4b 69 74 44 4c 4c 0a 09 09 09 09   for KitDLL.....
28a0: 28 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09  (......echo ""..
28b0: 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09 09 09  ....echo "".....
28c0: 09 65 63 68 6f 20 22 22 0a 09 09 09 09 09 65 63  .echo ""......ec
28d0: 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 69 6e  ho " *** Buildin
28e0: 67 20 4b 69 74 44 4c 4c 20 74 65 73 74 20 64 72  g KitDLL test dr
28f0: 69 76 65 72 20 28 74 63 6c 73 68 29 22 0a 09 09  iver (tclsh)"...
2900: 09 09 09 65 63 68 6f 20 22 22 0a 0a 09 09 09 09  ...echo ""......
2910: 09 63 64 20 6b 69 74 73 68 2f 62 75 69 6c 64 2f  .cd kitsh/build/
2920: 6b 69 74 73 68 2d 2a 2f 20 7c 7c 20 65 78 69 74  kitsh-*/ || exit
2930: 20 31 0a 09 09 09 09 09 6d 61 6b 65 20 74 63 6c   1......make tcl
2940: 73 68 0a 09 09 09 09 09 63 70 20 74 63 6c 73 68  sh......cp tclsh
2950: 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a 09 09 09 09 29   ../../../.....)
2960: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2970: 22 20 32 3e 26 31 0a 09 09 09 66 69 0a 0a 09 09  " 2>&1....fi....
2980: 09 23 20 50 65 72 66 6f 72 6d 20 77 69 6c 64 63  .# Perform wildc
2990: 61 72 64 20 65 78 70 61 6e 73 69 6f 6e 0a 09 09  ard expansion...
29a0: 09 63 72 65 61 74 65 64 6b 69 74 3d 22 24 28 6c  .createdkit="$(l
29b0: 73 20 2d 66 31 20 24 7b 63 72 65 61 74 65 64 6b  s -f1 ${createdk
29c0: 69 74 7d 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20  it} 2>/dev/null 
29d0: 7c 20 67 72 65 70 20 2d 76 20 27 5c 2e 74 61 72  | grep -v '\.tar
29e0: 5c 2e 67 7a 24 27 20 7c 20 68 65 61 64 20 2d 6e  \.gz$' | head -n
29f0: 20 31 29 22 0a 0a 09 09 09 69 66 20 5b 20 21 20   1)".....if [ ! 
2a00: 2d 66 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  -f "${createdkit
2a10: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  }" ]; then.....e
2a20: 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 63  cho "Failed to c
2a30: 72 65 61 74 65 20 6b 69 74 20 24 7b 76 65 72 73  reate kit ${vers
2a40: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32  ion}/${kit}" >&2
2a50: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
2a60: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
2a70: 6e 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22  n}/${kit}-build"
2a80: 0a 0a 09 09 09 09 74 6f 75 63 68 20 22 24 7b 66  ......touch "${f
2a90: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a  ailoutputname}".
2aa0: 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c  ....mv "${buildl
2ab0: 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c  og}" "${failbuil
2ac0: 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d  dlog}"......rm -
2ad0: 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e  f tclsh......con
2ae0: 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09  tinue....fi.....
2af0: 23 20 56 65 72 69 66 79 20 73 61 6e 69 74 79 20  # Verify sanity 
2b00: 6f 66 20 63 72 65 61 74 65 64 20 6b 69 74 0a 09  of created kit..
2b10: 09 09 69 73 73 61 6e 65 3d 31 0a 0a 09 09 09 23  ..issane=1.....#
2b20: 23 20 56 65 72 69 66 79 20 74 68 61 74 20 57 69  # Verify that Wi
2b30: 6e 33 32 20 62 75 69 6c 64 73 20 61 72 65 20 6f  n32 builds are o
2b40: 66 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09  f correct type..
2b50: 09 09 23 23 20 56 65 72 69 66 79 20 74 68 61 74  ..## Verify that
2b60: 20 44 4c 4c 20 62 75 69 6c 64 73 20 61 72 65 20   DLL builds are 
2b70: 6f 66 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a  of correct type.
2b80: 09 09 09 63 61 73 65 20 22 2d 24 7b 76 65 72 73  ...case "-${vers
2b90: 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20 69 6e  ion}-${kit}-" in
2ba0: 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6b 69 74  .....*-win32-kit
2bb0: 64 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d  dll-*|*-win32-*-
2bc0: 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69  kitdll-*)......i
2bd0: 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61  f ! file "${crea
2be0: 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20  tedkit}" | grep 
2bf0: 27 4d 53 20 57 69 6e 64 6f 77 73 27 20 7c 20 67  'MS Windows' | g
2c00: 72 65 70 20 27 28 44 4c 4c 29 27 20 3e 2f 64 65  rep '(DLL)' >/de
2c10: 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09  v/null; then....
2c20: 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 09  ...issane=0.....
2c30: 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09 09  .fi......;;.....
2c40: 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09  *-kitdll-*).....
2c50: 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72  .if ! file "${cr
2c60: 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65  eatedkit}" | gre
2c70: 70 20 27 73 68 61 72 65 64 20 6f 62 6a 65 63 74  p 'shared object
2c80: 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68  ' >/dev/null; th
2c90: 65 6e 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d  en.......issane=
2ca0: 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b  0......fi......;
2cb0: 3b 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6e 6f  ;.....*-win32-no
2cc0: 74 6b 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d 6e  tk-*|*-win32-*-n
2cd0: 6f 74 6b 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  otk-*)......if !
2ce0: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
2cf0: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53  kit}" | grep 'MS
2d00: 20 57 69 6e 64 6f 77 73 27 20 7c 20 67 72 65 70   Windows' | grep
2d10: 20 27 28 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64   '(console)' >/d
2d20: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2d30: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
2d40: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
2d50: 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20 63 6f  k for being a co
2d60: 6e 73 6f 6c 65 20 61 70 70 6c 69 63 61 74 69 6f  nsole applicatio
2d70: 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73  n" >&2.......iss
2d80: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
2d90: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33  ...;;.....*-win3
2da0: 32 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66  2-*)......if ! f
2db0: 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69  ile "${createdki
2dc0: 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57  t}" | grep 'MS W
2dd0: 69 6e 64 6f 77 73 27 20 7c 20 67 72 65 70 20 27  indows' | grep '
2de0: 28 47 55 49 29 27 20 3e 2f 64 65 76 2f 6e 75 6c  (GUI)' >/dev/nul
2df0: 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 65 63  l; then.......ec
2e00: 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64 20 73  ho "Kit failed s
2e10: 61 6e 69 74 79 20 63 68 65 63 6b 20 66 6f 72 20  anity check for 
2e20: 62 65 69 6e 67 20 61 20 47 55 49 20 61 70 70 6c  being a GUI appl
2e30: 69 63 61 74 69 6f 6e 22 20 3e 26 32 0a 09 09 09  ication" >&2....
2e40: 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09 09  ...issane=0.....
2e50: 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09 65  .fi......;;....e
2e60: 73 61 63 0a 0a 09 09 09 23 23 20 56 65 72 69 66  sac.....## Verif
2e70: 79 20 74 68 65 20 62 75 69 6c 64 20 63 6f 6d 70  y the build comp
2e80: 6c 65 74 65 64 20 77 69 74 68 6f 75 74 20 77 61  leted without wa
2e90: 72 6e 69 6e 67 73 0a 09 09 09 69 66 20 5b 20 22  rnings....if [ "
2ea0: 24 7b 62 75 69 6c 64 66 61 69 6c 65 64 7d 22 20  ${buildfailed}" 
2eb0: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
2ec0: 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c  ..echo "Kit fail
2ed0: 65 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20  ed sanity check 
2ee0: 66 6f 72 20 42 75 69 6c 64 69 6e 67 22 20 3e 26  for Building" >&
2ef0: 32 0a 0a 09 09 09 09 69 73 73 61 6e 65 3d 30 0a  2......issane=0.
2f00: 09 09 09 66 69 0a 0a 09 09 09 23 20 4d 61 6b 65  ...fi.....# Make
2f10: 20 6e 6f 74 65 20 6f 66 20 73 61 6e 69 74 79 20   note of sanity 
2f20: 66 61 69 6c 75 72 65 0a 09 09 09 69 66 20 5b 20  failure....if [ 
2f30: 22 24 7b 69 73 73 61 6e 65 7d 22 20 21 3d 20 22  "${issane}" != "
2f40: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65  1" ]; then.....e
2f50: 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65 64 20  cho "Kit failed 
2f60: 73 61 6e 69 74 79 20 24 7b 76 65 72 73 69 6f 6e  sanity ${version
2f70: 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09  }/${kit}" >&2...
2f80: 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66 61 69  ...failed="${fai
2f90: 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f  led} ${version}/
2fa0: 24 7b 6b 69 74 7d 2d 73 61 6e 69 74 79 22 0a 0a  ${kit}-sanity"..
2fb0: 09 09 09 09 6d 76 20 22 24 7b 63 72 65 61 74 65  ....mv "${create
2fc0: 64 6b 69 74 7d 22 20 22 24 7b 66 61 69 6c 6f 75  dkit}" "${failou
2fd0: 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09 09 6d  tputname}".....m
2fe0: 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20  v "${buildlog}" 
2ff0: 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c 6f 67 7d  "${failbuildlog}
3000: 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20 74 63 6c  "......rm -f tcl
3010: 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65  sh......continue
3020: 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 52 65 6e  ....fi.....# Ren
3030: 61 6d 65 20 63 72 65 61 74 65 64 20 6b 69 74 20  ame created kit 
3040: 74 6f 20 66 69 6e 61 6c 20 64 65 73 74 69 6e 61  to final destina
3050: 74 69 6f 6e 0a 09 09 09 6d 76 20 22 24 7b 63 72  tion....mv "${cr
3060: 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b 6f 75  eatedkit}" "${ou
3070: 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09 09 69 66  tputname}"....if
3080: 20 5b 20 2d 66 20 22 74 63 6c 73 68 22 20 5d 3b   [ -f "tclsh" ];
3090: 20 74 68 65 6e 0a 09 09 09 09 6d 76 20 22 74 63   then.....mv "tc
30a0: 6c 73 68 22 20 22 24 7b 6f 75 74 70 75 74 6e 61  lsh" "${outputna
30b0: 6d 65 7d 2d 74 63 6c 73 68 22 0a 09 09 09 66 69  me}-tclsh"....fi
30c0: 0a 0a 09 09 09 23 20 46 6f 72 20 4b 69 74 44 4c  .....# For KitDL
30d0: 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f 74 65 20 6f  L, make a note o
30e0: 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 6e  f the original n
30f0: 61 6d 65 0a 09 09 09 69 66 20 5b 20 22 24 7b 6b  ame....if [ "${k
3100: 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b  itdll}" = "1" ];
3110: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
3120: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 3e  ${createdkit}" >
3130: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d   "${outputname}-
3140: 6f 72 69 67 6e 61 6d 65 22 0a 0a 09 09 09 09 69  origname"......i
3150: 66 20 5b 20 2d 66 20 22 24 7b 73 64 6b 7d 22 20  f [ -f "${sdk}" 
3160: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 6d 76 20  ]; then......mv 
3170: 22 24 7b 73 64 6b 7d 22 20 22 24 7b 6f 75 74 70  "${sdk}" "${outp
3180: 75 74 6e 61 6d 65 7d 2d 73 64 6b 2e 74 61 72 2e  utname}-sdk.tar.
3190: 67 7a 22 0a 09 09 09 09 66 69 0a 09 09 09 66 69  gz".....fi....fi
31a0: 0a 09 09 66 69 0a 0a 09 09 23 20 54 65 73 74 20  ...fi....# Test 
31b0: 7a 69 70 20 73 74 61 74 75 73 0a 09 09 69 66 20  zip status...if 
31c0: 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f 75 74 70  unzip -l "${outp
31d0: 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31 20 7c 20  utname}" 2>&1 | 
31e0: 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74 63 6c 27  grep 'boot\.tcl'
31f0: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65   >/dev/null; the
3200: 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70 3d 22 31  n....canunzip="1
3210: 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 61 6e 75  "...else....canu
3220: 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69 0a 0a 09  nzip="0"...fi...
3230: 09 69 66 20 5b 20 22 24 7b 69 73 7a 69 70 7d 22  .if [ "${iszip}"
3240: 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a 69 70 7d   != "${canunzip}
3250: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 65 63 68  " ]; then....ech
3260: 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 75 6e 7a  o "Failed to unz
3270: 69 70 20 7a 69 70 6b 69 74 20 6f 72 20 77 61 73  ip zipkit or was
3280: 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69 70 20 6e   able to unzip n
3290: 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76 65 72 73  on-zipkit ${vers
32a0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32  ion}/${kit}" >&2
32b0: 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
32c0: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
32d0: 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22 0a 0a 09  }/${kit}-zip"...
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 44 6f 20 6e 6f 74 20 63 6f 6e 74  ...# Do not cont
3300: 69 6e 75 65 20 70 61 73 74 20 68 65 72 65 20 66  inue past here f
3310: 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c 65 20 6b  or un-runnable k
3320: 69 74 73 0a 09 09 69 66 20 5b 20 22 24 7b 72 75  its...if [ "${ru
3330: 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22 31 22 20  nnable}" != "1" 
3340: 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f 6e 74 69  ]; then....conti
3350: 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23 20 49 66  nue...fi....# If
3360: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65   the name of the
3370: 20 6f 72 69 67 69 6e 61 6c 20 62 75 69 6c 64 20   original build 
3380: 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c 69 6e 6b  matters, symlink
3390: 20 69 74 20 75 70 0a 09 09 69 66 20 5b 20 2d 66   it up...if [ -f
33a0: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d   "${outputname}-
33b0: 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74 68 65  origname" ]; the
33c0: 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74 3d  n....createdkit=
33d0: 22 24 28 63 61 74 20 22 24 7b 6f 75 74 70 75 74  "$(cat "${output
33e0: 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 29  name}-origname")
33f0: 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22 24 7b 6f  ".....ln -s "${o
3400: 75 74 70 75 74 6e 61 6d 65 7d 22 20 22 24 7b 63  utputname}" "${c
3410: 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09 66 69  reatedkit}"...fi
3420: 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d 20 62 61  ....# Perform ba
3430: 74 74 65 72 79 20 6f 66 20 74 65 73 74 73 0a 09  ttery of tests..
3440: 09 23 23 20 43 6c 65 61 6e 20 74 65 73 74 73 20  .## Clean tests 
3450: 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22 24 7b 74  log...rm -f "${t
3460: 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a  estresultslog}".
3470: 09 09 66 6f 72 20 74 65 73 74 73 63 70 20 69 6e  ..for testscp in
3480: 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f 74 65   "${TESTDIR}"/te
3490: 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f 0a 09 09  sts/*.tcl; do...
34a0: 09 74 65 73 74 73 63 70 5f 74 61 67 3d 22 24 28  .testscp_tag="$(
34b0: 62 61 73 65 6e 61 6d 65 20 22 24 7b 74 65 73 74  basename "${test
34c0: 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a 09 09 09  scp}" .tcl)"....
34d0: 74 65 73 74 73 63 70 70 72 65 3d 22 24 28 64 69  testscppre="$(di
34e0: 72 6e 61 6d 65 20 22 24 7b 74 65 73 74 73 63 70  rname "${testscp
34f0: 7d 22 29 2f 24 7b 74 65 73 74 73 63 70 5f 74 61  }")/${testscp_ta
3500: 67 7d 2e 73 68 22 0a 09 09 09 73 63 70 6c 6f 67  g}.sh"....scplog
3510: 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75 74 6e 61  file="${outputna
3520: 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70 5f 74 61  me}-${testscp_ta
3530: 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23 20 49 66  g}.log".....# If
3540: 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73 20 72 65   a command is re
3550: 71 75 69 72 65 64 20 74 6f 20 73 74 61 72 74 20  quired to start 
3560: 74 68 65 20 6b 69 74 2c 20 70 72 65 70 61 72 65  the kit, prepare
3570: 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09 09 09 23   to kill it....#
3580: 20 69 6e 20 63 61 73 65 20 6f 66 20 74 69 6d 65   in case of time
3590: 6f 75 74 2e 0a 09 09 09 23 23 20 54 65 6d 70 6f  out.....## Tempo
35a0: 72 61 72 69 6c 79 20 64 69 73 61 62 6c 65 64 20  rarily disabled 
35b0: 73 69 6e 63 65 20 63 75 72 72 65 6e 74 6c 79 20  since currently 
35c0: 69 74 20 69 73 20 63 61 75 73 69 6e 67 0a 09 09  it is causing...
35d0: 09 23 23 20 6d 6f 72 65 20 70 72 6f 62 6c 65 6d  .## more problem
35e0: 73 20 69 6e 20 74 68 65 20 66 6f 72 6d 20 6f 66  s in the form of
35f0: 20 74 65 73 74 73 20 62 65 69 6e 67 20 6b 69 6c   tests being kil
3600: 6c 65 64 0a 09 09 09 23 23 20 70 72 65 6d 61 74  led....## premat
3610: 75 72 65 6c 79 20 74 68 61 6e 20 77 65 20 61 72  urely than we ar
3620: 65 20 68 61 76 69 6e 67 20 69 73 73 75 65 73 20  e having issues 
3630: 77 69 74 68 20 74 65 73 74 73 0a 09 09 09 23 23  with tests....##
3640: 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b 69 74 72   hanging....kitr
3650: 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a 09 09 09  unkillpid=""....
3660: 69 66 20 5b 20 22 31 22 20 3d 20 22 30 22 20 2d  if [ "1" = "0" -
3670: 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75 6e 63 6d  a -n "${kitruncm
3680: 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  d}" ]; then.....
3690: 28 0a 09 09 09 09 09 73 6c 65 65 70 20 31 32 30  (......sleep 120
36a0: 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c 20 22 24  ......killall "$
36b0: 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 6f 75 74  (basename "${out
36c0: 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e 2f 64 65  putname}")" >/de
36d0: 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75  v/null 2>/dev/nu
36e0: 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65 76 2f 6e  ll.....) >/dev/n
36f0: 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20  ull 2>/dev/null 
3700: 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b 69 6c 6c  &.....kitrunkill
3710: 70 69 64 3d 22 24 21 22 0a 09 09 09 66 69 0a 0a  pid="$!"....fi..
3720: 09 09 09 28 0a 09 09 09 09 69 66 20 5b 20 2d 66  ...(.....if [ -f
3730: 20 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d 22   "${testscppre}"
3740: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 2e 20   ]; then....... 
3750: 22 24 7b 74 65 73 74 73 63 70 70 72 65 7d 22 0a  "${testscppre}".
3760: 09 09 09 09 66 69 0a 0a 09 09 09 09 69 66 20 5b  ....fi......if [
3770: 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22   "${kitdll}" = "
3780: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09  1" ]; then......
3790: 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20 22 24 7b  ${kitruncmd} "${
37a0: 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74 63 6c 73  outputname}-tcls
37b0: 68 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20  h" "${testscp}" 
37c0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20  "${outputname}" 
37d0: 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72 73  "${kit}" "${vers
37e0: 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73 65 0a 09  ion}".....else..
37f0: 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d  ....${kitruncmd}
3800: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3810: 20 22 24 7b 74 65 73 74 73 63 70 7d 22 20 22 24   "${testscp}" "$
3820: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22 24  {outputname}" "$
3830: 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72 73 69 6f  {kit}" "${versio
3840: 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09 09 29 20  n}".....fi....) 
3850: 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65 7d  > "${scplogfile}
3860: 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20 5b 20  " 2>&1.....if [ 
3870: 22 24 3f 22 20 21 3d 20 22 30 22 20 5d 3b 20 74  "$?" != "0" ]; t
3880: 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 53 63  hen.....echo "Sc
3890: 72 69 70 74 20 66 61 69 6c 65 64 3a 20 24 7b 74  ript failed: ${t
38a0: 65 73 74 73 63 70 5f 74 61 67 7d 20 6f 6e 20 24  estscp_tag} on $
38b0: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
38c0: 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c 65  " >&2......faile
38d0: 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76  d="${failed} ${v
38e0: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 74  ersion}/${kit}-t
38f0: 65 73 74 2d 24 7b 74 65 73 74 73 63 70 5f 74 61  est-${testscp_ta
3900: 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f 20 22 24  g}"......echo "$
3910: 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 3a 20 46  {testscp_tag}: F
3920: 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74 65 73 74  AIL" >>  "${test
3930: 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09  resultslog}"....
3940: 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69  ..continue....fi
3950: 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74 68 65 20  .....# Kill the 
3960: 77 61 74 63 68 64 6f 67 20 66 6f 72 20 74 68 69  watchdog for thi
3970: 73 20 69 74 65 72 61 74 69 6f 6e 0a 09 09 09 69  s iteration....i
3980: 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74 72 75 6e  f [ -n "${kitrun
3990: 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20 74 68 65  killpid}" ]; the
39a0: 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39 20 22 24  n.....kill -9 "$
39b0: 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 7d 22  {kitrunkillpid}"
39c0: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
39d0: 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69 0a 0a 09  ev/null....fi...
39e0: 09 09 65 63 68 6f 20 22 24 7b 74 65 73 74 73 63  ..echo "${testsc
39f0: 70 5f 74 61 67 7d 3a 20 50 41 53 53 22 20 3e 3e  p_tag}: PASS" >>
3a00: 20 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74 73    "${testresults
3a10: 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20 2d 66 20  log}".....rm -f 
3a20: 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65 7d 22 0a  "${scplogfile}".
3a30: 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20 5b 20 2d  ..done....if [ -
3a40: 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  f "${outputname}
3a50: 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20 74 68  -origname" ]; th
3a60: 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22 24 7b 63  en....rm -f "${c
3a70: 72 65 61 74 65 64 6b 69 74 7d 22 0a 09 09 66 69  reatedkit}"...fi
3a80: 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a 69 66 20  ..done.done..if 
3a90: 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65 64 7d 22  [ -n "${failed}"
3aa0: 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 22   ]; then..echo "
3ab0: 46 61 69 6c 65 64 3a 20 24 7b 66 61 69 6c 65 64  Failed: ${failed
3ac0: 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61 6e 75 70  }".fi..# Cleanup
3ad0: 0a 23 23 20 54 65 72 6d 69 6e 61 74 65 20 58 76  .## Terminate Xv
3ae0: 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24 7b 58 56  fb.kill -9 "${XV
3af0: 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20 52 65 6d  FB_PID}"..## Rem
3b00: 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d 72 66 20  ove wine.rm -rf 
3b10: 22 24 7b 57 49 4e 45 50 52 45 46 49 58 7d 22 0a  "${WINEPREFIX}".
3b20: 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 63 6c  ../kitcreator cl
3b30: 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c 73 68 0a  ean.rm -f tclsh.