Hex Artifact Content

Artifact 40509a80e06a164130929daf9c2894a045f93ccb:


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 35 20 38  RSIONS="8.5.15 8
0020: 2e 36 2e 31 20 63 76 73 5f 48 45 41 44 22 0a 0a  .6.1 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: 77 69 6e 36 34 2d 61 6d 64 36 34 20 77 69 6e 36  win64-amd64 win6
0ac0: 34 2d 61 6d 64 36 34 2d 7a 69 70 20 77 69 6e 36  4-amd64-zip win6
0ad0: 34 2d 61 6d 64 36 34 2d 74 68 72 65 61 64 65 64  4-amd64-threaded
0ae0: 20 77 69 6e 36 34 2d 61 6d 64 36 34 2d 74 68 72   win64-amd64-thr
0af0: 65 61 64 65 64 2d 7a 69 70 20 77 69 6e 36 34 2d  eaded-zip win64-
0b00: 61 6d 64 36 34 2d 6e 6f 74 6b 20 77 69 6e 36 34  amd64-notk win64
0b10: 2d 61 6d 64 36 34 2d 74 68 72 65 61 64 65 64 2d  -amd64-threaded-
0b20: 6e 6f 74 6b 20 77 69 6e 36 34 2d 61 6d 64 36 34  notk win64-amd64
0b30: 2d 6e 6f 6d 6b 34 20 77 69 6e 36 34 2d 61 6d 64  -nomk4 win64-amd
0b40: 36 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d  64-kitdll win64-
0b50: 61 6d 64 36 34 2d 74 68 72 65 61 64 65 64 2d 6b  amd64-threaded-k
0b60: 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d 64 36  itdll win64-amd6
0b70: 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69  4-notk-kitdll wi
0b80: 6e 36 34 2d 61 6d 64 36 34 2d 6e 6f 6d 6b 34 2d  n64-amd64-nomk4-
0b90: 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d 64  kitdll win64-amd
0ba0: 36 34 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69  64-nomk4-notk-ki
0bb0: 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d 64 36 34  tdll win64-amd64
0bc0: 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d  -threaded-nomk4-
0bd0: 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d 64  kitdll win64-amd
0be0: 36 34 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b  64-threaded-notk
0bf0: 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6c 69  -nomk4-kitdll li
0c00: 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e 6f 74 6b 20  nux-mipsel-notk 
0c10: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e 6f 74  linux-mipsel-not
0c20: 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69  k-kitdll linux-i
0c30: 33 38 36 20 6c 69 6e 75 78 2d 69 33 38 36 2d 64  386 linux-i386-d
0c40: 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38 36 2d  ebug linux-i386-
0c50: 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69 33 38  kitdll linux-i38
0c60: 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 6c  6-debug-kitdll l
0c70: 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 20 6c  inux-i386-notk l
0c80: 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64  inux-i386-notk-d
0c90: 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38 36 2d  ebug linux-i386-
0ca0: 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75  notk-kitdll linu
0cb0: 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75  x-i386-notk-debu
0cc0: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0cd0: 2d 69 33 38 36 20 73 6f 6c 61 72 69 73 2d 69 33  -i386 solaris-i3
0ce0: 38 36 2d 64 65 62 75 67 20 73 6f 6c 61 72 69 73  86-debug solaris
0cf0: 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73 6f 6c  -i386-kitdll sol
0d00: 61 72 69 73 2d 69 33 38 36 2d 64 65 62 75 67 2d  aris-i386-debug-
0d10: 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d 61  kitdll solaris-a
0d20: 6d 64 36 34 20 73 6f 6c 61 72 69 73 2d 61 6d 64  md64 solaris-amd
0d30: 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72 69 73  64-debug solaris
0d40: 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 73 6f  -amd64-kitdll so
0d50: 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65 62 75  laris-amd64-debu
0d60: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0d70: 2d 73 70 61 72 63 20 73 6f 6c 61 72 69 73 2d 73  -sparc solaris-s
0d80: 70 61 72 63 2d 64 65 62 75 67 20 73 6f 6c 61 72  parc-debug solar
0d90: 69 73 2d 73 70 61 72 63 2d 6b 69 74 64 6c 6c 20  is-sparc-kitdll 
0da0: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 64 65  solaris-sparc-de
0db0: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0dc0: 69 73 2d 73 70 61 72 63 36 34 20 73 6f 6c 61 72  is-sparc64 solar
0dd0: 69 73 2d 73 70 61 72 63 36 34 2d 64 65 62 75 67  is-sparc64-debug
0de0: 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36 34   solaris-sparc64
0df0: 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73 2d  -kitdll solaris-
0e00: 73 70 61 72 63 36 34 2d 64 65 62 75 67 2d 6b 69  sparc64-debug-ki
0e10: 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61 6d 64  tdll freebsd-amd
0e20: 36 34 20 66 72 65 65 62 73 64 2d 61 6d 64 36 34  64 freebsd-amd64
0e30: 2d 64 65 62 75 67 20 66 72 65 65 62 73 64 2d 61  -debug freebsd-a
0e40: 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 66 72 65 65  md64-kitdll free
0e50: 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d  bsd-amd64-debug-
0e60: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33  kitdll netbsd-i3
0e70: 38 36 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d 69  86-notk netbsd-i
0e80: 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 6e  386-notk-debug n
0e90: 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74 6b 2d  etbsd-i386-notk-
0ea0: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33  kitdll netbsd-i3
0eb0: 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69  86-notk-debug-ki
0ec0: 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64 36  tdll netbsd-amd6
0ed0: 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 64  4 netbsd-amd64-d
0ee0: 65 62 75 67 20 6e 65 74 62 73 64 2d 61 6d 64 36  ebug netbsd-amd6
0ef0: 34 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  4-kitdll netbsd-
0f00: 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69 74 64  amd64-debug-kitd
0f10: 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d 2d 6e  ll android-arm-n
0f20: 6f 74 6b 20 61 6e 64 72 6f 69 64 2d 61 72 6d 2d  otk android-arm-
0f30: 6e 6f 74 6b 2d 64 65 62 75 67 20 61 6e 64 72 6f  notk-debug andro
0f40: 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 6b 69 74 64  id-arm-notk-kitd
0f50: 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d 2d 6e  ll android-arm-n
0f60: 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  otk-debug-kitdll
0f70: 22 0a 66 69 0a 0a 66 61 69 6c 65 64 3d 22 22 0a  ".fi..failed="".
0f80: 66 6f 72 20 6b 69 74 20 69 6e 20 24 6b 69 74 73  for kit in $kits
0f90: 3b 20 64 6f 0a 09 6b 69 74 63 72 65 61 74 6f 72  ; do..kitcreator
0fa0: 3d 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72 22 0a  ="./kitcreator".
0fb0: 09 61 72 67 73 3d 22 22 0a 09 72 75 6e 6e 61 62  .args=""..runnab
0fc0: 6c 65 3d 22 31 22 0a 09 69 73 7a 69 70 3d 22 30  le="1"..iszip="0
0fd0: 22 0a 09 73 74 61 74 69 63 74 6b 3d 22 30 22 0a  "..statictk="0".
0fe0: 09 6e 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d 6b 34  .notk="0"..nomk4
0ff0: 3d 22 30 22 0a 09 78 63 6f 6d 70 69 6c 65 3d 22  ="0"..xcompile="
1000: 30 22 0a 09 6b 69 74 64 6c 6c 3d 22 30 22 0a 09  0"..kitdll="0"..
1010: 6b 69 74 72 75 6e 63 6d 64 3d 22 22 0a 0a 09 23  kitruncmd=""...#
1020: 20 48 61 6e 64 6c 65 20 62 61 73 65 20 63 6f 6e   Handle base con
1030: 66 69 67 75 72 61 74 69 6f 6e 0a 09 6f 73 3d 22  figuration..os="
1040: 24 28 75 6e 61 6d 65 20 2d 73 20 7c 20 64 64 20  $(uname -s | dd 
1050: 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65  conv=lcase 2>/de
1060: 76 2f 6e 75 6c 6c 29 22 0a 09 63 70 75 3d 22 24  v/null)"..cpu="$
1070: 28 75 6e 61 6d 65 20 2d 6d 20 7c 20 64 64 20 63  (uname -m | dd c
1080: 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64 65 76  onv=lcase 2>/dev
1090: 2f 6e 75 6c 6c 20 7c 20 73 65 64 20 27 73 40 78  /null | sed 's@x
10a0: 38 36 5f 36 34 40 61 6d 64 36 34 40 3b 73 40 69  86_64@amd64@;s@i
10b0: 2e 38 36 40 69 33 38 36 40 27 29 22 0a 09 63 61  .86@i386@')"..ca
10c0: 73 65 20 22 24 7b 6b 69 74 7d 22 20 69 6e 0a 09  se "${kit}" in..
10d0: 09 6e 6f 72 6d 61 6c 7c 6e 6f 72 6d 61 6c 2d 2a  .normal|normal-*
10e0: 29 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68 6f  )....kit="$(echo
10f0: 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20   "${kit}" | sed 
1100: 22 73 40 5e 6e 6f 72 6d 61 6c 40 24 6f 73 2d 24  "s@^normal@$os-$
1110: 63 70 75 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09  cpu@")"....;;...
1120: 6d 69 6e 7c 6d 69 6e 2d 6b 69 74 64 6c 6c 29 0a  min|min-kitdll).
1130: 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e  ...kitcreator=".
1140: 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b  /build/make-mink
1150: 69 74 22 0a 09 09 09 69 73 7a 69 70 3d 22 31 22  it"....iszip="1"
1160: 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
1170: 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 6b  kit="$(echo "${k
1180: 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40 5e 6d  it}" | sed "s@^m
1190: 69 6e 40 24 6f 73 2d 24 63 70 75 2d 6d 69 6e 40  in@$os-$cpu-min@
11a0: 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e 2d  ")"....;;...min-
11b0: 73 74 61 74 69 63 29 0a 09 09 09 6b 69 74 63 72  static)....kitcr
11c0: 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d  eator="./build/m
11d0: 61 6b 65 2d 6d 69 6e 6b 69 74 2d 73 74 61 74 69  ake-minkit-stati
11e0: 63 22 0a 09 09 09 69 73 7a 69 70 3d 22 31 22 0a  c"....iszip="1".
11f0: 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09 6b  ...notk="1"....k
1200: 69 74 3d 22 24 7b 6f 73 7d 2d 24 7b 63 70 75 7d  it="${os}-${cpu}
1210: 2d 6d 69 6e 2d 73 74 61 74 69 63 22 0a 09 09 09  -min-static"....
1220: 3b 3b 0a 09 09 77 69 6e 33 32 7c 77 69 6e 33 32  ;;...win32|win32
1230: 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f  -*)....kitcreato
1240: 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d  r="./build/make-
1250: 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09 78 63  kit-win32"....xc
1260: 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 72 75  ompile="1"....ru
1270: 6e 6e 61 62 6c 65 3d 22 31 22 0a 09 09 09 6b 69  nnable="1"....ki
1280: 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22 0a 09  truncmd="wine"..
1290: 09 09 3b 3b 0a 09 09 77 69 6e 36 34 7c 77 69 6e  ..;;...win64|win
12a0: 36 34 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61  64-*)....kitcrea
12b0: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
12c0: 65 2d 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09  e-kit-win32"....
12d0: 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09  xcompile="1"....
12e0: 72 75 6e 6e 61 62 6c 65 3d 22 31 22 0a 09 09 09  runnable="1"....
12f0: 6b 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 36  kitruncmd="wine6
1300: 34 22 0a 09 09 09 61 72 67 73 3d 22 24 7b 61 72  4"....args="${ar
1310: 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62  gs} --enable-64b
1320: 69 74 22 0a 09 09 09 3b 3b 0a 09 09 6c 69 6e 75  it"....;;...linu
1330: 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e  x-mipsel-min|lin
1340: 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69  ux-mipsel-min-ki
1350: 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63 72 65 61  tdll)....kitcrea
1360: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
1370: 65 2d 6b 69 74 2d 6c 69 6e 75 78 2d 6d 69 70 73  e-kit-linux-mips
1380: 65 6c 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d  el"....runnable=
1390: 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d  "0"....xcompile=
13a0: 22 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a  "1"....notk="1".
13b0: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
13c0: 3b 3b 0a 09 09 6c 69 6e 75 78 2d 69 33 38 36 7c  ;;...linux-i386|
13d0: 6c 69 6e 75 78 2d 69 33 38 36 2d 2a 29 0a 09 09  linux-i386-*)...
13e0: 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f 62  .kitcreator="./b
13f0: 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 6c 69  uild/make-kit-li
1400: 6e 75 78 2d 69 33 38 36 22 0a 09 09 09 78 63 6f  nux-i386"....xco
1410: 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 3b 3b 0a  mpile="1"....;;.
1420: 09 09 61 6e 64 72 6f 69 64 2d 61 72 6d 7c 61 6e  ..android-arm|an
1430: 64 72 6f 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09 09  droid-arm-*|\...
1440: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 7c 6c 69 6e  linux-mipsel|lin
1450: 75 78 2d 6d 69 70 73 65 6c 2d 2a 7c 5c 0a 09 09  ux-mipsel-*|\...
1460: 6c 69 6e 75 78 2d 61 6d 64 36 34 7c 6c 69 6e 75  linux-amd64|linu
1470: 78 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f  x-amd64-*|\...so
1480: 6c 61 72 69 73 2d 69 33 38 36 7c 73 6f 6c 61 72  laris-i386|solar
1490: 69 73 2d 69 33 38 36 2d 2a 7c 5c 0a 09 09 73 6f  is-i386-*|\...so
14a0: 6c 61 72 69 73 2d 61 6d 64 36 34 7c 73 6f 6c 61  laris-amd64|sola
14b0: 72 69 73 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09  ris-amd64-*|\...
14c0: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 7c 73 6f  solaris-sparc|so
14d0: 6c 61 72 69 73 2d 73 70 61 72 63 2d 2a 7c 5c 0a  laris-sparc-*|\.
14e0: 09 09 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36  ..solaris-sparc6
14f0: 34 7c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 36  4|solaris-sparc6
1500: 34 2d 2a 7c 5c 0a 09 09 66 72 65 65 62 73 64 2d  4-*|\...freebsd-
1510: 61 6d 64 36 34 7c 66 72 65 65 62 73 64 2d 61 6d  amd64|freebsd-am
1520: 64 36 34 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64  d64-*|\...netbsd
1530: 2d 69 33 38 36 7c 6e 65 74 62 73 64 2d 69 33 38  -i386|netbsd-i38
1540: 36 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 61  6-*|\...netbsd-a
1550: 6d 64 36 34 7c 6e 65 74 62 73 64 2d 61 6d 64 36  md64|netbsd-amd6
1560: 34 2d 2a 7c 5c 0a 09 09 68 70 75 78 2d 68 70 70  4-*|\...hpux-hpp
1570: 61 36 34 7c 68 70 75 78 2d 68 70 70 61 36 34 2d  a64|hpux-hppa64-
1580: 2a 29 0a 09 09 09 70 6c 61 74 66 6f 72 6d 3d 22  *)....platform="
1590: 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20  $(echo "${kit}" 
15a0: 7c 20 63 75 74 20 2d 66 20 31 2d 32 20 2d 64 20  | cut -f 1-2 -d 
15b0: 27 2d 27 29 22 0a 09 09 09 6b 69 74 63 72 65 61  '-')"....kitcrea
15c0: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
15d0: 65 2d 6b 69 74 2d 24 7b 70 6c 61 74 66 6f 72 6d  e-kit-${platform
15e0: 7d 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d 22  }"....runnable="
15f0: 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d 22  0"....xcompile="
1600: 31 22 0a 09 09 09 69 73 7a 69 70 3d 22 30 22 0a  1"....iszip="0".
1610: 0a 09 09 09 69 66 20 65 63 68 6f 20 22 24 7b 6b  ....if echo "${k
1620: 69 74 7d 22 20 7c 20 65 67 72 65 70 20 2d 2d 20  it}" | egrep -- 
1630: 27 2d 28 68 70 70 61 36 34 7c 61 6d 64 36 34 7c  '-(hppa64|amd64|
1640: 73 70 61 72 63 36 34 29 2d 27 20 3e 2f 64 65 76  sparc64)-' >/dev
1650: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
1660: 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d  args="${args} --
1670: 65 6e 61 62 6c 65 2d 36 34 62 69 74 22 0a 09 09  enable-64bit"...
1680: 09 66 69 0a 09 09 09 3b 3b 0a 09 65 73 61 63 0a  .fi....;;..esac.
1690: 0a 09 69 66 20 5b 20 22 24 7b 78 63 6f 6d 70 69  ..if [ "${xcompi
16a0: 6c 65 7d 22 20 21 3d 20 22 30 22 20 5d 3b 20 74  le}" != "0" ]; t
16b0: 68 65 6e 0a 09 09 6b 69 74 3d 22 24 7b 6b 69 74  hen...kit="${kit
16c0: 7d 2d 78 63 6f 6d 70 69 6c 65 22 0a 09 66 69 0a  }-xcompile"..fi.
16d0: 0a 09 23 20 48 61 6e 64 6c 65 20 61 64 64 69 74  ..# Handle addit
16e0: 69 6f 6e 61 6c 20 63 6f 6e 66 69 67 75 72 61 74  ional configurat
16f0: 69 6f 6e 0a 09 74 65 6d 70 6b 69 74 3d 22 2d 24  ion..tempkit="-$
1700: 7b 6b 69 74 7d 2d 22 0a 09 66 6f 72 20 74 72 79  {kit}-"..for try
1710: 20 69 6e 20 31 20 32 20 33 20 34 20 35 20 36 20   in 1 2 3 4 5 6 
1720: 37 20 38 20 39 3b 20 64 6f 0a 09 09 63 61 73 65  7 8 9; do...case
1730: 20 22 2d 24 7b 74 65 6d 70 6b 69 74 7d 2d 22 20   "-${tempkit}-" 
1740: 69 6e 0a 09 09 09 2a 2d 74 68 72 65 61 64 65 64  in....*-threaded
1750: 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d  -*).....tempkit=
1760: 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b  "$(echo "${tempk
1770: 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d 74  it}" | sed 's@-t
1780: 68 72 65 61 64 65 64 2d 40 2d 40 27 29 22 0a 09  hreaded-@-@')"..
1790: 09 09 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d  ...args="${args}
17a0: 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64   --enable-thread
17b0: 73 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 7a  s".....;;....*-z
17c0: 69 70 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69  ip-*).....tempki
17d0: 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d  t="$(echo "${tem
17e0: 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40  pkit}" | sed 's@
17f0: 2d 7a 69 70 2d 40 2d 40 27 29 22 0a 09 09 09 09  -zip-@-@')".....
1800: 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d  args="${args} --
1810: 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72 61  enable-kit-stora
1820: 67 65 3d 7a 69 70 22 0a 09 09 09 09 69 73 7a 69  ge=zip".....iszi
1830: 70 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09 09  p="1".....;;....
1840: 2a 2d 73 74 61 74 69 63 74 6b 2d 2a 29 0a 09 09  *-statictk-*)...
1850: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
1860: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1870: 20 73 65 64 20 27 73 40 2d 73 74 61 74 69 63 74   sed 's@-statict
1880: 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09 69 66 20  k-@-@')".....if 
1890: 5b 20 22 24 7b 6e 6f 74 6b 7d 22 20 3d 20 22 30  [ "${notk}" = "0
18a0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 73  " ]; then......s
18b0: 74 61 74 69 63 74 6b 3d 22 31 22 0a 09 09 09 09  tatictk="1".....
18c0: 65 6c 73 65 0a 09 09 09 09 09 65 63 68 6f 20 22  else......echo "
18d0: 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c 65 20 74  ${kit}: Unable t
18e0: 6f 20 63 72 65 61 74 65 20 53 74 61 74 69 63 54  o create StaticT
18f0: 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f  k and NoTk, igno
1900: 72 69 6e 67 20 53 74 61 74 69 63 54 6b 22 20 3e  ring StaticTk" >
1910: 26 32 0a 09 09 09 09 66 69 0a 09 09 09 09 3b 3b  &2.....fi.....;;
1920: 0a 09 09 09 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09  ....*-notk-*)...
1930: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
1940: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1950: 20 73 65 64 20 27 73 40 2d 6e 6f 74 6b 2d 40 2d   sed 's@-notk-@-
1960: 40 27 29 22 0a 09 09 09 09 69 66 20 5b 20 22 24  @')".....if [ "$
1970: 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d 20 22 30  {statictk}" = "0
1980: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 6e  " ]; then......n
1990: 6f 74 6b 3d 22 31 22 0a 09 09 09 09 65 6c 73 65  otk="1".....else
19a0: 0a 09 09 09 09 09 65 63 68 6f 20 22 24 7b 6b 69  ......echo "${ki
19b0: 74 7d 3a 20 55 6e 61 62 6c 65 20 74 6f 20 63 72  t}: Unable to cr
19c0: 65 61 74 65 20 53 74 61 74 69 63 54 6b 20 61 6e  eate StaticTk an
19d0: 64 20 4e 6f 54 6b 2c 20 69 67 6e 6f 72 69 6e 67  d NoTk, ignoring
19e0: 20 4e 6f 54 6b 22 20 3e 26 32 0a 09 09 09 09 66   NoTk" >&2.....f
19f0: 69 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f  i.....;;....*-no
1a00: 6d 6b 34 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b  mk4-*).....tempk
1a10: 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65  it="$(echo "${te
1a20: 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73  mpkit}" | sed 's
1a30: 40 2d 6e 6f 6d 6b 34 2d 40 2d 40 27 29 22 0a 09  @-nomk4-@-@')"..
1a40: 09 09 09 6e 6f 6d 6b 34 3d 22 31 22 0a 09 09 09  ...nomk4="1"....
1a50: 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09 09 3b  .iszip="1".....;
1a60: 3b 0a 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29  ;....*-kitdll-*)
1a70: 0a 09 09 09 09 74 65 6d 70 6b 69 74 3d 22 24 28  .....tempkit="$(
1a80: 65 63 68 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d  echo "${tempkit}
1a90: 22 20 7c 20 73 65 64 20 27 73 40 2d 6b 69 74 64  " | sed 's@-kitd
1aa0: 6c 6c 2d 40 2d 40 27 29 22 0a 09 09 09 09 6b 69  ll-@-@')".....ki
1ab0: 74 64 6c 6c 3d 22 31 22 0a 09 09 09 09 3b 3b 0a  tdll="1".....;;.
1ac0: 09 09 09 2a 2d 64 65 62 75 67 2d 2a 29 0a 09 09  ...*-debug-*)...
1ad0: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
1ae0: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1af0: 20 73 65 64 20 27 73 40 2d 64 65 62 75 67 2d 40   sed 's@-debug-@
1b00: 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d 22  -@')".....args="
1b10: 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65  ${args} --enable
1b20: 2d 73 79 6d 62 6f 6c 73 22 0a 09 09 09 09 3b 3b  -symbols".....;;
1b30: 0a 09 09 65 73 61 63 0a 09 64 6f 6e 65 0a 0a 09  ...esac..done...
1b40: 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22  if [ "${kitdll}"
1b50: 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09   = "1" ]; then..
1b60: 09 23 20 43 75 72 72 65 6e 74 6c 79 20 6e 6f 20  .# Currently no 
1b70: 4b 69 74 44 4c 4c 20 75 73 65 73 20 5a 69 70 0a  KitDLL uses Zip.
1b80: 09 09 69 73 7a 69 70 3d 22 30 22 0a 09 66 69 0a  ..iszip="0"..fi.
1b90: 0a 09 66 6f 72 20 76 65 72 73 69 6f 6e 20 69 6e  ..for version in
1ba0: 20 24 7b 56 45 52 53 49 4f 4e 53 7d 3b 20 64 6f   ${VERSIONS}; do
1bb0: 0a 09 09 23 20 57 6f 72 6b 20 61 72 6f 75 6e 64  ...# Work around
1bc0: 20 63 68 61 6e 67 65 73 20 69 6e 20 64 65 66 61   changes in defa
1bd0: 75 6c 74 20 62 65 68 61 76 69 6f 75 72 0a 09 09  ult behaviour...
1be0: 69 66 20 5b 20 22 24 7b 76 65 72 73 69 6f 6e 7d  if [ "${version}
1bf0: 22 20 3d 20 22 63 76 73 5f 48 45 41 44 22 20 5d  " = "cvs_HEAD" ]
1c00: 3b 20 74 68 65 6e 0a 09 09 09 6b 69 74 3d 22 24  ; then....kit="$
1c10: 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c  (echo "${kit}" |
1c20: 20 73 65 64 20 27 73 40 2d 74 68 72 65 61 64 65   sed 's@-threade
1c30: 64 40 2d 75 6e 74 68 72 65 61 64 65 64 40 27 29  d@-unthreaded@')
1c40: 22 0a 09 09 09 61 72 67 73 3d 22 24 28 65 63 68  "....args="$(ech
1c50: 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20 73 65  o "${args}" | se
1c60: 64 20 27 73 40 20 2d 2d 65 6e 61 62 6c 65 2d 74  d 's@ --enable-t
1c70: 68 72 65 61 64 73 40 20 2d 2d 64 69 73 61 62 6c  hreads@ --disabl
1c80: 65 2d 74 68 72 65 61 64 73 40 27 29 22 0a 09 09  e-threads@')"...
1c90: 66 69 0a 0a 09 09 23 20 43 72 65 61 74 65 20 54  fi....# Create T
1ca0: 63 6c 6b 69 74 0a 09 09 69 66 20 5b 20 22 24 7b  clkit...if [ "${
1cb0: 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d  kitdll}" = "1" ]
1cc0: 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61 74 65  ; then....create
1cd0: 64 6b 69 74 3d 22 6c 69 62 74 63 6c 6b 69 74 2a  dkit="libtclkit*
1ce0: 2e 64 6c 6c 20 6c 69 62 74 63 6c 6b 69 74 2a 2e  .dll libtclkit*.
1cf0: 2a 22 0a 09 09 09 6f 75 74 70 75 74 6e 61 6d 65  *"....outputname
1d00: 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74  ="${TESTDIR}/kit
1d10: 73 2f 6c 69 62 74 63 6c 6b 69 74 2d 24 7b 76 65  s/libtclkit-${ve
1d20: 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09  rsion}-${kit}"..
1d30: 09 09 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65  ..failoutputname
1d40: 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74  ="${TESTDIR}/kit
1d50: 73 2f 66 61 69 6c 65 64 2f 6c 69 62 74 63 6c 6b  s/failed/libtclk
1d60: 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b  it-${version}-${
1d70: 6b 69 74 7d 22 0a 09 09 09 73 64 6b 3d 22 6c 69  kit}"....sdk="li
1d80: 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 24 7b 76 65  btclkit-sdk-${ve
1d90: 72 73 69 6f 6e 7d 2e 74 61 72 2e 67 7a 22 0a 09  rsion}.tar.gz"..
1da0: 09 65 6c 73 65 0a 09 09 09 63 72 65 61 74 65 64  .else....created
1db0: 6b 69 74 3d 22 74 63 6c 6b 69 74 2d 24 7b 76 65  kit="tclkit-${ve
1dc0: 72 73 69 6f 6e 7d 22 0a 09 09 09 6f 75 74 70 75  rsion}"....outpu
1dd0: 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52  tname="${TESTDIR
1de0: 7d 2f 6b 69 74 73 2f 74 63 6c 6b 69 74 2d 24 7b  }/kits/tclkit-${
1df0: 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d 22  version}-${kit}"
1e00: 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e 61  ....failoutputna
1e10: 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f 6b  me="${TESTDIR}/k
1e20: 69 74 73 2f 66 61 69 6c 65 64 2f 74 63 6c 6b 69  its/failed/tclki
1e30: 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b  t-${version}-${k
1e40: 69 74 7d 22 0a 09 09 09 73 64 6b 3d 27 27 0a 09  it}"....sdk=''..
1e50: 09 66 69 0a 09 09 62 75 69 6c 64 6c 6f 67 3d 22  .fi...buildlog="
1e60: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75  ${outputname}-bu
1e70: 69 6c 64 2e 6c 6f 67 22 0a 09 09 66 61 69 6c 62  ild.log"...failb
1e80: 75 69 6c 64 6c 6f 67 3d 22 24 7b 66 61 69 6c 6f  uildlog="${failo
1e90: 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64  utputname}-build
1ea0: 2e 6c 6f 67 22 0a 09 09 74 65 73 74 72 65 73 75  .log"...testresu
1eb0: 6c 74 73 6c 6f 67 3d 22 24 7b 6f 75 74 70 75 74  ltslog="${output
1ec0: 6e 61 6d 65 7d 2d 74 65 73 74 73 2e 6c 6f 67 22  name}-tests.log"
1ed0: 0a 0a 09 09 69 66 20 5b 20 21 20 2d 66 20 22 24  ....if [ ! -f "$
1ee0: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b  {outputname}" ];
1ef0: 20 74 68 65 6e 0a 09 09 09 75 6e 73 65 74 20 4b   then....unset K
1f00: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20 53  ITCREATOR_PKGS S
1f10: 54 41 54 49 43 54 4b 20 53 54 52 49 50 0a 0a 09  TATICTK STRIP...
1f20: 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 66 61 69  ..if [ -f "${fai
1f30: 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 5d 3b  loutputname}" ];
1f40: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
1f50: 53 6b 69 70 70 69 6e 67 20 72 65 62 75 69 6c 64  Skipping rebuild
1f60: 69 6e 67 20 66 61 69 6c 65 64 20 6b 69 74 20 24  ing failed kit $
1f70: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
1f80: 20 2e 2e 2e 22 0a 0a 09 09 09 09 66 61 69 6c 65   ..."......faile
1f90: 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76  d="${failed} ${v
1fa0: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62  ersion}/${kit}-b
1fb0: 75 69 6c 64 22 0a 0a 09 09 09 09 63 6f 6e 74 69  uild"......conti
1fc0: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 72 6d  nue....fi.....rm
1fd0: 20 2d 66 20 74 63 6c 73 68 0a 09 09 09 2e 2f 6b   -f tclsh...../k
1fe0: 69 74 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 20  itcreator clean 
1ff0: 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65  >/dev/null 2>/de
2000: 76 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63 68 6f 20  v/null.....echo 
2010: 22 43 72 65 61 74 69 6e 67 20 54 63 6c 6b 69 74  "Creating Tclkit
2020: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
2030: 74 7d 2e 2e 2e 22 0a 09 09 09 65 63 68 6f 20 22  t}..."....echo "
2040: 20 2a 2a 2a 20 42 75 69 6c 64 20 73 74 61 72 74   *** Build start
2050: 65 64 20 24 28 77 68 6f 61 6d 69 29 40 24 28 68  ed $(whoami)@$(h
2060: 6f 73 74 6e 61 6d 65 29 20 6f 6e 20 24 28 64 61  ostname) on $(da
2070: 74 65 29 22 20 3e 20 22 24 7b 62 75 69 6c 64 6c  te)" > "${buildl
2080: 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20  og}"....echo '' 
2090: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
20a0: 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42  ....echo " *** B
20b0: 75 69 6c 64 20 53 63 72 69 70 74 22 20 3e 3e 20  uild Script" >> 
20c0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09  "${buildlog}"...
20d0: 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b 7d 22  ..if [ "${notk}"
20e0: 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09   = "1" ]; then..
20f0: 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  ...KITCREATOR_PK
2100: 47 53 3d 27 69 74 63 6c 20 6d 6b 34 74 63 6c 27  GS='itcl mk4tcl'
2110: 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20  ....fi.....if [ 
2120: 22 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20 22 31 22  "${nomk4}" = "1"
2130: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 69 66 20   ]; then.....if 
2140: 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52 45 41 54  [ -z "${KITCREAT
2150: 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65  OR_PKGS}" ]; the
2160: 6e 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f  n......KITCREATO
2170: 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20 74 6b 27  R_PKGS='itcl tk'
2180: 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09 09 4b  .....else......K
2190: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 22  ITCREATOR_PKGS="
21a0: 24 28 65 63 68 6f 20 22 24 7b 4b 49 54 43 52 45  $(echo "${KITCRE
21b0: 41 54 4f 52 5f 50 4b 47 53 7d 22 20 7c 20 73 65  ATOR_PKGS}" | se
21c0: 64 20 27 73 40 6d 6b 34 74 63 6c 40 40 27 29 22  d 's@mk4tcl@@')"
21d0: 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09  .....fi....fi...
21e0: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
21f0: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
2200: 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20 22 24 7b  .....if [ -z "${
2210: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d  KITCREATOR_PKGS}
2220: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09 4b  " ]; then......K
2230: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27  ITCREATOR_PKGS='
2240: 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 20 6b  tk itcl mk4tcl k
2250: 69 74 64 6c 6c 27 0a 09 09 09 09 65 6c 73 65 0a  itdll'.....else.
2260: 09 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f  .....KITCREATOR_
2270: 50 4b 47 53 3d 22 24 7b 4b 49 54 43 52 45 41 54  PKGS="${KITCREAT
2280: 4f 52 5f 50 4b 47 53 7d 20 6b 69 74 64 6c 6c 22  OR_PKGS} kitdll"
2290: 0a 09 09 09 09 66 69 0a 09 09 09 66 69 0a 0a 09  .....fi....fi...
22a0: 09 09 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41  ..export KITCREA
22b0: 54 4f 52 5f 50 4b 47 53 0a 0a 09 09 09 69 66 20  TOR_PKGS.....if 
22c0: 5b 20 2d 6e 20 22 24 7b 4b 49 54 43 52 45 41 54  [ -n "${KITCREAT
22d0: 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20 74 68 65  OR_PKGS}" ]; the
22e0: 6e 0a 09 09 09 09 65 63 68 6f 20 22 20 20 4b 49  n.....echo "  KI
22f0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 5c 22  TCREATOR_PKGS=\"
2300: 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ${KITCREATOR_PKG
2310: 53 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c  S}\"" >> "${buil
2320: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
2330: 22 20 20 65 78 70 6f 72 74 20 4b 49 54 43 52 45  "  export KITCRE
2340: 41 54 4f 52 5f 50 4b 47 53 22 20 3e 3e 20 22 24  ATOR_PKGS" >> "$
2350: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66  {buildlog}"....f
2360: 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 73 74  i.....if [ "${st
2370: 61 74 69 63 74 6b 7d 22 20 3d 20 22 31 22 20 5d  atictk}" = "1" ]
2380: 3b 20 74 68 65 6e 0a 09 09 09 09 53 54 41 54 49  ; then.....STATI
2390: 43 54 4b 3d 22 31 22 0a 09 09 09 09 65 78 70 6f  CTK="1".....expo
23a0: 72 74 20 53 54 41 54 49 43 54 4b 0a 0a 09 09 09  rt STATICTK.....
23b0: 09 65 63 68 6f 20 22 20 20 53 54 41 54 49 43 54  .echo "  STATICT
23c0: 4b 3d 5c 22 24 7b 53 54 41 54 49 43 54 4b 7d 5c  K=\"${STATICTK}\
23d0: 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  "" >> "${buildlo
23e0: 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22 20 20  g}".....echo "  
23f0: 65 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 22  export STATICTK"
2400: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2410: 22 0a 09 09 09 66 69 0a 0a 09 09 09 69 66 20 65  "....fi.....if e
2420: 63 68 6f 20 22 24 7b 61 72 67 73 7d 22 20 7c 20  cho "${args}" | 
2430: 67 72 65 70 20 2d 2d 20 27 2d 2d 65 6e 61 62 6c  grep -- '--enabl
2440: 65 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f 64 65 76  e-symbols' >/dev
2450: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2460: 53 54 52 49 50 3d 27 74 72 75 65 27 0a 09 09 09  STRIP='true'....
2470: 09 65 78 70 6f 72 74 20 53 54 52 49 50 0a 0a 09  .export STRIP...
2480: 09 09 09 65 63 68 6f 20 22 20 20 53 54 52 49 50  ...echo "  STRIP
2490: 3d 27 74 72 75 65 27 22 20 3e 3e 20 22 24 7b 62  ='true'" >> "${b
24a0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63  uildlog}".....ec
24b0: 68 6f 20 22 20 20 65 78 70 6f 72 74 20 53 54 52  ho "  export STR
24c0: 49 50 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  IP" >> "${buildl
24d0: 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69  og}"....fi.....i
24e0: 66 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74 6f  f [ "${kitcreato
24f0: 72 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72 65  r}" != "./kitcre
2500: 61 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09  ator" ]; then...
2510: 09 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72 20  ..echo "  mkdir 
2520: 62 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75 69  build" >> "${bui
2530: 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20 53  ldlog}"......# S
2540: 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72  everal build scr
2550: 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69 6e  ipts rely on min
2560: 6b 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09  kit to work.....
2570: 69 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64  if grep './build
2580: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22 24  /make-minkit' "$
2590: 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e 2f  {kitcreator}" >/
25a0: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
25b0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
25c0: 65 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20 5c  echo "  cat << \
25d0: 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69 6c  __EOF__ > ./buil
25e0: 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20 3e  d/make-minkit" >
25f0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2600: 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20 20  .....sed 's@^@  
2610: 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61 6b  @'  './build/mak
2620: 65 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24 7b  e-minkit' >> "${
2630: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09  buildlog}"......
2640: 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22  echo "  __EOF__"
2650: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2660: 22 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20 3e  "......echo '' >
2670: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2680: 09 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53 65  ....fi......# Se
2690: 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72 69  veral build scri
26a0: 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b 65  pts rely on make
26b0: 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c  -kit-crosscompil
26c0: 65 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69 66  e to work.....if
26d0: 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f 6d   grep './build/m
26e0: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
26f0: 70 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65 61  pile' "${kitcrea
2700: 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c  tor}" >/dev/null
2710: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68   2>/dev/null; th
2720: 65 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20 20  en......echo "  
2730: 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20  cat << \__EOF__ 
2740: 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b  > ./build/make-k
2750: 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65 22  it-crosscompile"
2760: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2770: 22 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40  "......sed 's@^@
2780: 20 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d    @'  './build/m
2790: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
27a0: 70 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69 6c  pile' >> "${buil
27b0: 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f  dlog}"......echo
27c0: 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20   "  __EOF__" >> 
27d0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
27e0: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
27f0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
2800: 66 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20  fi......echo "  
2810: 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f 20  cat << \__EOF__ 
2820: 3e 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22  > ${kitcreator}"
2830: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
2840: 22 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ".....sed 's@^@ 
2850: 20 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61 74   @'  "${kitcreat
2860: 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  or}" >> "${build
2870: 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20 22  log}".....echo "
2880: 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22 24    __EOF__" >> "$
2890: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
28a0: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
28b0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 09  ildlog}"....fi..
28c0: 09 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b 69  ..echo "  \"${ki
28d0: 74 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24 7b  tcreator}\" \"${
28e0: 76 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72 67  version}\" ${arg
28f0: 73 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  s}" >> "${buildl
2900: 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20  og}"....echo '' 
2910: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2920: 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
2930: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2940: 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75  echo '' >> "${bu
2950: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f  ildlog}"....echo
2960: 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65 73   " *** Build Res
2970: 75 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69 6c  ults" >> "${buil
2980: 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27  dlog}"....echo '
2990: 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ' >> "${buildlog
29a0: 7d 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69 6c  }".....buildfail
29b0: 65 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69 74  ed="0"...."${kit
29c0: 63 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65 72  creator}" "${ver
29d0: 73 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20 3e  sion}" ${args} >
29e0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20  > "${buildlog}" 
29f0: 32 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61 69  2>&1 || buildfai
2a00: 6c 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70 20  led="1"....grep 
2a10: 2d 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e 6c  -n '^' */build.l
2a20: 6f 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  og >> "${buildlo
2a30: 67 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66 20  g}" 2>&1.....if 
2a40: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
2a50: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
2a60: 23 20 43 72 65 61 74 65 20 74 65 73 74 20 64 72  # Create test dr
2a70: 69 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c 4c  ivers for KitDLL
2a80: 0a 09 09 09 09 28 0a 09 09 09 09 09 65 63 68 6f  .....(......echo
2a90: 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22   ""......echo ""
2aa0: 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09 09  ......echo ""...
2ab0: 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42 75  ...echo " *** Bu
2ac0: 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74 65  ilding KitDLL te
2ad0: 73 74 20 64 72 69 76 65 72 20 28 74 63 6c 73 68  st driver (tclsh
2ae0: 29 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a  )"......echo "".
2af0: 0a 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f 62  ......cd kitsh/b
2b00: 75 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c 7c  uild/kitsh-*/ ||
2b10: 20 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61 6b   exit 1......mak
2b20: 65 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70 20  e tclsh......cp 
2b30: 74 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f 0a  tclsh ../../../.
2b40: 09 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69 6c  ....) >> "${buil
2b50: 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09 66  dlog}" 2>&1....f
2b60: 69 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d 20  i.....# Perform 
2b70: 77 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73 69  wildcard expansi
2b80: 6f 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69 74  on....createdkit
2b90: 3d 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72 65  ="$(ls -f1 ${cre
2ba0: 61 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76 2f  atedkit} 2>/dev/
2bb0: 6e 75 6c 6c 20 7c 20 67 72 65 70 20 2d 76 20 27  null | grep -v '
2bc0: 5c 2e 74 61 72 5c 2e 67 7a 24 27 20 7c 20 68 65  \.tar\.gz$' | he
2bd0: 61 64 20 2d 6e 20 31 29 22 0a 0a 09 09 09 69 66  ad -n 1)".....if
2be0: 20 5b 20 21 20 2d 66 20 22 24 7b 63 72 65 61 74   [ ! -f "${creat
2bf0: 65 64 6b 69 74 7d 22 20 5d 3b 20 74 68 65 6e 0a  edkit}" ]; then.
2c00: 09 09 09 09 65 63 68 6f 20 22 46 61 69 6c 65 64  ....echo "Failed
2c10: 20 74 6f 20 63 72 65 61 74 65 20 6b 69 74 20 24   to create kit $
2c20: 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d  {version}/${kit}
2c30: 22 20 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c 65  " >&2......faile
2c40: 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76  d="${failed} ${v
2c50: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 62  ersion}/${kit}-b
2c60: 75 69 6c 64 22 0a 0a 09 09 09 09 74 6f 75 63 68  uild"......touch
2c70: 20 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61   "${failoutputna
2c80: 6d 65 7d 22 0a 09 09 09 09 6d 76 20 22 24 7b 62  me}".....mv "${b
2c90: 75 69 6c 64 6c 6f 67 7d 22 20 22 24 7b 66 61 69  uildlog}" "${fai
2ca0: 6c 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09  lbuildlog}".....
2cb0: 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 0a 09 09  .rm -f tclsh....
2cc0: 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69  ..continue....fi
2cd0: 0a 0a 09 09 09 23 20 56 65 72 69 66 79 20 73 61  .....# Verify sa
2ce0: 6e 69 74 79 20 6f 66 20 63 72 65 61 74 65 64 20  nity of created 
2cf0: 6b 69 74 0a 09 09 09 69 73 73 61 6e 65 3d 31 0a  kit....issane=1.
2d00: 0a 09 09 09 23 23 20 56 65 72 69 66 79 20 74 68  ....## Verify th
2d10: 61 74 20 57 69 6e 33 32 20 62 75 69 6c 64 73 20  at Win32 builds 
2d20: 61 72 65 20 6f 66 20 63 6f 72 72 65 63 74 20 74  are of correct t
2d30: 79 70 65 0a 09 09 09 23 23 20 56 65 72 69 66 79  ype....## Verify
2d40: 20 74 68 61 74 20 44 4c 4c 20 62 75 69 6c 64 73   that DLL builds
2d50: 20 61 72 65 20 6f 66 20 63 6f 72 72 65 63 74 20   are of correct 
2d60: 74 79 70 65 0a 09 09 09 63 61 73 65 20 22 2d 24  type....case "-$
2d70: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
2d80: 2d 22 20 69 6e 0a 09 09 09 09 2a 2d 77 69 6e 5b  -" in.....*-win[
2d90: 33 36 5d 5b 32 34 5d 2d 6b 69 74 64 6c 6c 2d 2a  36][24]-kitdll-*
2da0: 7c 2a 2d 77 69 6e 5b 33 36 5d 5b 32 34 5d 2d 2a  |*-win[36][24]-*
2db0: 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09  -kitdll-*)......
2dc0: 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65  if ! file "${cre
2dd0: 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70  atedkit}" | grep
2de0: 20 27 4d 53 20 57 69 6e 64 6f 77 73 27 20 7c 20   'MS Windows' | 
2df0: 67 72 65 70 20 27 28 44 4c 4c 29 27 20 3e 2f 64  grep '(DLL)' >/d
2e00: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2e10: 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09 09 09  ....issane=0....
2e20: 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09 09 09  ..fi......;;....
2e30: 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09 09  .*-kitdll-*)....
2e40: 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63  ..if ! file "${c
2e50: 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72  reatedkit}" | gr
2e60: 65 70 20 27 73 68 61 72 65 64 20 6f 62 6a 65 63  ep 'shared objec
2e70: 74 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  t' >/dev/null; t
2e80: 68 65 6e 0a 09 09 09 09 09 09 69 73 73 61 6e 65  hen.......issane
2e90: 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09  =0......fi......
2ea0: 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 5b 33 36 5d  ;;.....*-win[36]
2eb0: 5b 32 34 5d 2d 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69  [24]-notk-*|*-wi
2ec0: 6e 5b 33 36 5d 5b 32 34 5d 2d 2a 2d 6e 6f 74 6b  n[36][24]-*-notk
2ed0: 2d 2a 29 0a 09 09 09 09 09 69 66 20 21 20 66 69  -*)......if ! fi
2ee0: 6c 65 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  le "${createdkit
2ef0: 7d 22 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69  }" | grep 'MS Wi
2f00: 6e 64 6f 77 73 27 20 7c 20 67 72 65 70 20 27 28  ndows' | grep '(
2f10: 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64 65 76 2f  console)' >/dev/
2f20: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
2f30: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
2f40: 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66  d sanity check f
2f50: 6f 72 20 62 65 69 6e 67 20 61 20 63 6f 6e 73 6f  or being a conso
2f60: 6c 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20  le application" 
2f70: 3e 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65  >&2.......issane
2f80: 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09  =0......fi......
2f90: 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 5b 33 36 5d  ;;.....*-win[36]
2fa0: 5b 32 34 5d 2d 2a 29 0a 09 09 09 09 09 69 66 20  [24]-*)......if 
2fb0: 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65  ! file "${create
2fc0: 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d  dkit}" | grep 'M
2fd0: 53 20 57 69 6e 64 6f 77 73 27 20 7c 20 67 72 65  S Windows' | gre
2fe0: 70 20 27 28 47 55 49 29 27 20 3e 2f 64 65 76 2f  p '(GUI)' >/dev/
2ff0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
3000: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
3010: 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66  d sanity check f
3020: 6f 72 20 62 65 69 6e 67 20 61 20 47 55 49 20 61  or being a GUI a
3030: 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32 0a  pplication" >&2.
3040: 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a 09  ......issane=0..
3050: 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a 09  ....fi......;;..
3060: 09 09 65 73 61 63 0a 0a 09 09 09 23 23 20 56 65  ..esac.....## Ve
3070: 72 69 66 79 20 74 68 65 20 62 75 69 6c 64 20 63  rify the build c
3080: 6f 6d 70 6c 65 74 65 64 20 77 69 74 68 6f 75 74  ompleted without
3090: 20 77 61 72 6e 69 6e 67 73 0a 09 09 09 69 66 20   warnings....if 
30a0: 5b 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65 64  [ "${buildfailed
30b0: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
30c0: 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66  .....echo "Kit f
30d0: 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65  ailed sanity che
30e0: 63 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e 67 22  ck for Building"
30f0: 20 3e 26 32 0a 0a 09 09 09 09 69 73 73 61 6e 65   >&2......issane
3100: 3d 30 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4d  =0....fi.....# M
3110: 61 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61 6e 69  ake note of sani
3120: 74 79 20 66 61 69 6c 75 72 65 0a 09 09 09 69 66  ty failure....if
3130: 20 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22 20 21   [ "${issane}" !
3140: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
3150: 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c  ..echo "Kit fail
3160: 65 64 20 73 61 6e 69 74 79 20 24 7b 76 65 72 73  ed sanity ${vers
3170: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32  ion}/${kit}" >&2
3180: 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b  ......failed="${
3190: 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f  failed} ${versio
31a0: 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69 74 79  n}/${kit}-sanity
31b0: 22 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63 72 65  "......mv "${cre
31c0: 61 74 65 64 6b 69 74 7d 22 20 22 24 7b 66 61 69  atedkit}" "${fai
31d0: 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09  loutputname}"...
31e0: 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ..mv "${buildlog
31f0: 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64 6c  }" "${failbuildl
3200: 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66 20  og}"......rm -f 
3210: 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74 69  tclsh......conti
3220: 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  nue....fi.....# 
3230: 52 65 6e 61 6d 65 20 63 72 65 61 74 65 64 20 6b  Rename created k
3240: 69 74 20 74 6f 20 66 69 6e 61 6c 20 64 65 73 74  it to final dest
3250: 69 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20 22 24  ination....mv "$
3260: 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24  {createdkit}" "$
3270: 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09 09  {outputname}"...
3280: 09 69 66 20 5b 20 2d 66 20 22 74 63 6c 73 68 22  .if [ -f "tclsh"
3290: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d 76 20   ]; then.....mv 
32a0: 22 74 63 6c 73 68 22 20 22 24 7b 6f 75 74 70 75  "tclsh" "${outpu
32b0: 74 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a 09 09  tname}-tclsh"...
32c0: 09 66 69 0a 0a 09 09 09 23 20 46 6f 72 20 4b 69  .fi.....# For Ki
32d0: 74 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f 74  tDLL, make a not
32e0: 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61  e of the origina
32f0: 6c 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b 20 22  l name....if [ "
3300: 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22  ${kitdll}" = "1"
3310: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
3320: 6f 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  o "${createdkit}
3330: 22 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  " > "${outputnam
3340: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 0a 09 09  e}-origname"....
3350: 09 09 69 66 20 5b 20 2d 66 20 22 24 7b 73 64 6b  ..if [ -f "${sdk
3360: 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 09  }" ]; then......
3370: 6d 76 20 22 24 7b 73 64 6b 7d 22 20 22 24 7b 6f  mv "${sdk}" "${o
3380: 75 74 70 75 74 6e 61 6d 65 7d 2d 73 64 6b 2e 74  utputname}-sdk.t
3390: 61 72 2e 67 7a 22 0a 09 09 09 09 66 69 0a 09 09  ar.gz".....fi...
33a0: 09 66 69 0a 09 09 66 69 0a 0a 09 09 23 20 54 65  .fi...fi....# Te
33b0: 73 74 20 7a 69 70 20 73 74 61 74 75 73 0a 09 09  st zip status...
33c0: 69 66 20 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f  if unzip -l "${o
33d0: 75 74 70 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31  utputname}" 2>&1
33e0: 20 7c 20 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74   | grep 'boot\.t
33f0: 63 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20  cl' >/dev/null; 
3400: 74 68 65 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70  then....canunzip
3410: 3d 22 31 22 0a 09 09 65 6c 73 65 0a 09 09 09 63  ="1"...else....c
3420: 61 6e 75 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69  anunzip="0"...fi
3430: 0a 0a 09 09 69 66 20 5b 20 22 24 7b 69 73 7a 69  ....if [ "${iszi
3440: 70 7d 22 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a  p}" != "${canunz
3450: 69 70 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  ip}" ]; then....
3460: 65 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20  echo "Failed to 
3470: 75 6e 7a 69 70 20 7a 69 70 6b 69 74 20 6f 72 20  unzip zipkit or 
3480: 77 61 73 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69  was able to unzi
3490: 70 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76  p non-zipkit ${v
34a0: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20  ersion}/${kit}" 
34b0: 3e 26 32 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22  >&2.....failed="
34c0: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
34d0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22  ion}/${kit}-zip"
34e0: 0a 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  .....continue...
34f0: 66 69 0a 0a 09 09 23 20 44 6f 20 6e 6f 74 20 63  fi....# Do not c
3500: 6f 6e 74 69 6e 75 65 20 70 61 73 74 20 68 65 72  ontinue past her
3510: 65 20 66 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c  e for un-runnabl
3520: 65 20 6b 69 74 73 0a 09 09 69 66 20 5b 20 22 24  e kits...if [ "$
3530: 7b 72 75 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22  {runnable}" != "
3540: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f  1" ]; then....co
3550: 6e 74 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23  ntinue...fi....#
3560: 20 49 66 20 74 68 65 20 6e 61 6d 65 20 6f 66 20   If the name of 
3570: 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 62 75 69  the original bui
3580: 6c 64 20 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c  ld matters, syml
3590: 69 6e 6b 20 69 74 20 75 70 0a 09 09 69 66 20 5b  ink it up...if [
35a0: 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d   -f "${outputnam
35b0: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20  e}-origname" ]; 
35c0: 74 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b  then....createdk
35d0: 69 74 3d 22 24 28 63 61 74 20 22 24 7b 6f 75 74  it="$(cat "${out
35e0: 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d  putname}-orignam
35f0: 65 22 29 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22  e")".....ln -s "
3600: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22  ${outputname}" "
3610: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09  ${createdkit}"..
3620: 09 66 69 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d  .fi....# Perform
3630: 20 62 61 74 74 65 72 79 20 6f 66 20 74 65 73 74   battery of test
3640: 73 0a 09 09 23 23 20 43 6c 65 61 6e 20 74 65 73  s...## Clean tes
3650: 74 73 20 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22  ts log...rm -f "
3660: 24 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67  ${testresultslog
3670: 7d 22 0a 09 09 66 6f 72 20 74 65 73 74 73 63 70  }"...for testscp
3680: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
3690: 2f 74 65 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f  /tests/*.tcl; do
36a0: 0a 09 09 09 74 65 73 74 73 63 70 5f 74 61 67 3d  ....testscp_tag=
36b0: 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 74  "$(basename "${t
36c0: 65 73 74 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a  estscp}" .tcl)".
36d0: 09 09 09 74 65 73 74 73 63 70 70 72 65 3d 22 24  ...testscppre="$
36e0: 28 64 69 72 6e 61 6d 65 20 22 24 7b 74 65 73 74  (dirname "${test
36f0: 73 63 70 7d 22 29 2f 24 7b 74 65 73 74 73 63 70  scp}")/${testscp
3700: 5f 74 61 67 7d 2e 73 68 22 0a 09 09 09 73 63 70  _tag}.sh"....scp
3710: 6c 6f 67 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75  logfile="${outpu
3720: 74 6e 61 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70  tname}-${testscp
3730: 5f 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23  _tag}.log".....#
3740: 20 49 66 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73   If a command is
3750: 20 72 65 71 75 69 72 65 64 20 74 6f 20 73 74 61   required to sta
3760: 72 74 20 74 68 65 20 6b 69 74 2c 20 70 72 65 70  rt the kit, prep
3770: 61 72 65 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09  are to kill it..
3780: 09 09 23 20 69 6e 20 63 61 73 65 20 6f 66 20 74  ..# in case of t
3790: 69 6d 65 6f 75 74 2e 0a 09 09 09 23 23 20 54 65  imeout.....## Te
37a0: 6d 70 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c  mporarily disabl
37b0: 65 64 20 73 69 6e 63 65 20 63 75 72 72 65 6e 74  ed since current
37c0: 6c 79 20 69 74 20 69 73 20 63 61 75 73 69 6e 67  ly it is causing
37d0: 0a 09 09 09 23 23 20 6d 6f 72 65 20 70 72 6f 62  ....## more prob
37e0: 6c 65 6d 73 20 69 6e 20 74 68 65 20 66 6f 72 6d  lems in the form
37f0: 20 6f 66 20 74 65 73 74 73 20 62 65 69 6e 67 20   of tests being 
3800: 6b 69 6c 6c 65 64 0a 09 09 09 23 23 20 70 72 65  killed....## pre
3810: 6d 61 74 75 72 65 6c 79 20 74 68 61 6e 20 77 65  maturely than we
3820: 20 61 72 65 20 68 61 76 69 6e 67 20 69 73 73 75   are having issu
3830: 65 73 20 77 69 74 68 20 74 65 73 74 73 0a 09 09  es with tests...
3840: 09 23 23 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b  .## hanging....k
3850: 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a  itrunkillpid="".
3860: 09 09 09 69 66 20 5b 20 22 31 22 20 3d 20 22 30  ...if [ "1" = "0
3870: 22 20 2d 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75  " -a -n "${kitru
3880: 6e 63 6d 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  ncmd}" ]; then..
3890: 09 09 09 28 0a 09 09 09 09 09 73 6c 65 65 70 20  ...(......sleep 
38a0: 31 32 30 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c  120......killall
38b0: 20 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b   "$(basename "${
38c0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e  outputname}")" >
38d0: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
38e0: 2f 6e 75 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65  /null.....) >/de
38f0: 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75  v/null 2>/dev/nu
3900: 6c 6c 20 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b  ll &.....kitrunk
3910: 69 6c 6c 70 69 64 3d 22 24 21 22 0a 09 09 09 66  illpid="$!"....f
3920: 69 0a 0a 09 09 09 28 0a 09 09 09 09 69 66 20 5b  i.....(.....if [
3930: 20 2d 66 20 22 24 7b 74 65 73 74 73 63 70 70 72   -f "${testscppr
3940: 65 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  e}" ]; then.....
3950: 09 2e 20 22 24 7b 74 65 73 74 73 63 70 70 72 65  .. "${testscppre
3960: 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 69  }".....fi......i
3970: 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20  f [ "${kitdll}" 
3980: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
3990: 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20  ...${kitruncmd} 
39a0: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74  "${outputname}-t
39b0: 63 6c 73 68 22 20 22 24 7b 74 65 73 74 73 63 70  clsh" "${testscp
39c0: 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  }" "${outputname
39d0: 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76  }" "${kit}" "${v
39e0: 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73  ersion}".....els
39f0: 65 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63  e......${kitrunc
3a00: 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  md} "${outputnam
3a10: 65 7d 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22  e}" "${testscp}"
3a20: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3a30: 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72   "${kit}" "${ver
3a40: 73 69 6f 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09  sion}".....fi...
3a50: 09 29 20 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69  .) > "${scplogfi
3a60: 6c 65 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66  le}" 2>&1.....if
3a70: 20 5b 20 22 24 3f 22 20 21 3d 20 22 30 22 20 5d   [ "$?" != "0" ]
3a80: 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20  ; then.....echo 
3a90: 22 53 63 72 69 70 74 20 66 61 69 6c 65 64 3a 20  "Script failed: 
3aa0: 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 20 6f  ${testscp_tag} o
3ab0: 6e 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  n ${version}/${k
3ac0: 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61  it}" >&2......fa
3ad0: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
3ae0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
3af0: 7d 2d 74 65 73 74 2d 24 7b 74 65 73 74 73 63 70  }-test-${testscp
3b00: 5f 74 61 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f  _tag}"......echo
3b10: 20 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d   "${testscp_tag}
3b20: 3a 20 46 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74  : FAIL" >>  "${t
3b30: 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a  estresultslog}".
3b40: 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  .....continue...
3b50: 09 66 69 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74  .fi.....# Kill t
3b60: 68 65 20 77 61 74 63 68 64 6f 67 20 66 6f 72 20  he watchdog for 
3b70: 74 68 69 73 20 69 74 65 72 61 74 69 6f 6e 0a 09  this iteration..
3b80: 09 09 69 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74  ..if [ -n "${kit
3b90: 72 75 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20  runkillpid}" ]; 
3ba0: 74 68 65 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39  then.....kill -9
3bb0: 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69   "${kitrunkillpi
3bc0: 64 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32  d}" >/dev/null 2
3bd0: 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69  >/dev/null....fi
3be0: 0a 0a 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73  .....echo "${tes
3bf0: 74 73 63 70 5f 74 61 67 7d 3a 20 50 41 53 53 22  tscp_tag}: PASS"
3c00: 20 3e 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75   >>  "${testresu
3c10: 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20  ltslog}".....rm 
3c20: 2d 66 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65  -f "${scplogfile
3c30: 7d 22 0a 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20  }"...done....if 
3c40: 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61  [ -f "${outputna
3c50: 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b  me}-origname" ];
3c60: 20 74 68 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22   then....rm -f "
3c70: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09  ${createdkit}"..
3c80: 09 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a  .fi..done.done..
3c90: 69 66 20 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65  if [ -n "${faile
3ca0: 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68  d}" ]; then..ech
3cb0: 6f 20 22 46 61 69 6c 65 64 3a 20 24 7b 66 61 69  o "Failed: ${fai
3cc0: 6c 65 64 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61  led}".fi..# Clea
3cd0: 6e 75 70 0a 23 23 20 54 65 72 6d 69 6e 61 74 65  nup.## Terminate
3ce0: 20 58 76 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24   Xvfb.kill -9 "$
3cf0: 7b 58 56 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20  {XVFB_PID}"..## 
3d00: 52 65 6d 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d  Remove wine.rm -
3d10: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
3d20: 7d 22 0a 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72  }".../kitcreator
3d30: 20 63 6c 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c   clean.rm -f tcl
3d40: 73 68 0a                                         sh.