Hex Artifact Content

Artifact ac8cb7fd325f647133454eacf9e1825ce96754c6:


0000: 54 68 69 73 20 77 69 6c 6c 20 62 75 69 6c 64 20  This will build 
0010: 61 20 54 63 6c 6b 69 74 20 6e 61 6d 65 64 20 22  a Tclkit named "
0020: 74 63 6c 6b 69 74 2d 3c 76 65 72 73 69 6f 6e 3e  tclkit-<version>
0030: 22 20 6f 72 20 61 20 4b 69 74 44 4c 4c 20 6e 61  " or a KitDLL na
0040: 6d 65 64 0a 22 6c 69 62 74 63 6c 6b 69 74 3c 76  med."libtclkit<v
0050: 65 72 73 69 6f 6e 3e 2e 73 6f 22 2e 0a 0a 2d 2d  ersion>.so"...--
0060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 55 73  -------------.Us
0070: 69 6e 67 20 54 68 69 73 20 54 6f 6f 6c 0a 2d 2d  ing This Tool.--
0080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 55 73  -------------.Us
0090: 61 67 65 3a 0a 09 6b 69 74 63 72 65 61 74 6f 72  age:..kitcreator
00a0: 20 5b 7b 62 75 69 6c 64 20 7c 20 72 65 74 72 79   [{build | retry
00b0: 20 7c 20 63 6c 65 61 6e 20 7c 20 64 69 73 74 63   | clean | distc
00c0: 6c 65 61 6e 7d 5d 0a 09 20 20 20 20 20 20 20 20  lean}]..        
00d0: 20 20 20 5b 7b 3c 76 65 72 73 69 6f 6e 3e 20 7c     [{<version> |
00e0: 20 63 76 73 5f 3c 74 61 67 3e 20 7c 20 66 6f 73   cvs_<tag> | fos
00f0: 73 69 6c 5f 3c 74 61 67 3e 7d 5d 0a 09 20 20 20  sil_<tag>}]..   
0100: 20 20 20 20 20 20 20 20 5b 3c 63 6f 6e 66 69 67          [<config
0110: 75 72 65 5f 6f 70 74 69 6f 6e 3e 20 2e 2e 2e 5d  ure_option> ...]
0120: 0a 0a 09 57 68 65 72 65 3a 0a 09 09 76 65 72 73  ...Where:...vers
0130: 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20 69  ion            i
0140: 73 20 61 20 54 63 6c 20 76 65 72 73 69 6f 6e 20  s a Tcl version 
0150: 6e 75 6d 62 65 72 20 28 65 2e 67 2e 2c 20 38 2e  number (e.g., 8.
0160: 36 2e 31 29 0a 09 09 74 61 67 20 20 20 20 20 20  6.1)...tag      
0170: 20 20 20 20 20 20 20 20 20 20 69 73 20 61 20 43            is a C
0180: 56 53 20 6f 72 20 66 6f 73 73 69 6c 20 72 65 6c  VS or fossil rel
0190: 65 61 73 65 20 74 61 67 20 28 65 2e 67 2e 2c 20  ease tag (e.g., 
01a0: 48 45 41 44 29 0a 09 09 63 6f 6e 66 69 67 75 72  HEAD)...configur
01b0: 65 5f 6f 70 74 69 6f 6e 20 20 20 6f 70 74 69 6f  e_option   optio
01c0: 6e 20 74 6f 20 70 61 73 73 20 74 6f 20 73 75 62  n to pass to sub
01d0: 6f 72 64 69 6e 61 74 65 20 63 6f 6e 66 69 67 75  ordinate configu
01e0: 72 65 0a 09 09 20 20 20 20 20 20 20 20 20 20 20  re...           
01f0: 20 20 20 20 20 20 20 20 73 63 72 69 70 74 73 20          scripts 
0200: 28 65 2e 67 2e 2c 20 2d 2d 65 6e 61 62 6c 65 2d  (e.g., --enable-
0210: 36 34 62 69 74 29 0a 0a 09 44 65 66 61 75 6c 74  64bit)...Default
0220: 20 69 73 20 74 6f 20 63 72 65 61 74 65 20 61 20   is to create a 
0230: 54 63 6c 6b 69 74 20 66 72 6f 6d 20 54 63 6c 20  Tclkit from Tcl 
0240: 76 65 72 73 69 6f 6e 20 38 2e 36 2e 31 0a 0a 45  version 8.6.1..E
0250: 78 61 6d 70 6c 65 73 3a 0a 09 31 2e 20 43 72 65  xamples:..1. Cre
0260: 61 74 65 20 61 20 54 63 6c 6b 69 74 3a 0a 09 09  ate a Tclkit:...
0270: 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f  a. $ ./kitcreato
0280: 72 0a 0a 09 32 2e 20 43 72 65 61 74 65 20 61 20  r...2. Create a 
0290: 54 63 6c 6b 69 74 20 66 6f 72 20 54 63 6c 20 38  Tclkit for Tcl 8
02a0: 2e 35 2e 31 35 3a 0a 09 09 61 2e 20 24 20 2e 2f  .5.15:...a. $ ./
02b0: 6b 69 74 63 72 65 61 74 6f 72 20 38 2e 35 2e 31  kitcreator 8.5.1
02c0: 35 0a 0a 09 33 2e 20 43 72 65 61 74 65 20 61 20  5...3. Create a 
02d0: 54 63 6c 6b 69 74 20 66 6f 72 20 54 63 6c 20 66  Tclkit for Tcl f
02e0: 72 6f 6d 20 43 56 53 20 48 45 41 44 3a 0a 09 09  rom CVS HEAD:...
02f0: 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f  a. $ ./kitcreato
0300: 72 20 63 76 73 5f 48 45 41 44 0a 0a 09 34 2e 20  r cvs_HEAD...4. 
0310: 43 6f 6d 70 69 6c 65 20 61 20 36 34 2d 62 69 74  Compile a 64-bit
0320: 20 54 63 6c 6b 69 74 3a 0a 09 09 61 2e 20 24 20   Tclkit:...a. $ 
0330: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d 2d 65  ./kitcreator --e
0340: 6e 61 62 6c 65 2d 36 34 62 69 74 0a 0a 09 35 2e  nable-64bit...5.
0350: 20 43 72 6f 73 73 2d 63 6f 6d 70 69 6c 65 20 61   Cross-compile a
0360: 20 54 63 6c 6b 69 74 3a 0a 09 09 61 2e 20 42 6f   Tclkit:...a. Bo
0370: 6f 74 73 74 72 61 70 20 28 6f 70 74 69 6f 6e 61  otstrap (optiona
0380: 6c 2c 20 79 6f 75 20 63 61 6e 20 75 73 65 20 61  l, you can use a
0390: 6e 20 65 78 69 73 74 69 6e 67 20 54 63 6c 6b 69  n existing Tclki
03a0: 74 29 3a 0a 09 09 09 69 2e 20 20 20 24 20 2e 2f  t):....i.   $ ./
03b0: 6b 69 74 63 72 65 61 74 6f 72 0a 09 09 09 69 69  kitcreator....ii
03c0: 2e 20 20 24 20 6d 76 20 74 63 6c 6b 69 74 2d 38  .  $ mv tclkit-8
03d0: 2e 34 2e 31 39 20 74 63 6c 6b 69 74 2d 6c 6f 63  .4.19 tclkit-loc
03e0: 61 6c 0a 09 09 09 69 69 69 2e 20 24 20 54 43 4c  al....iii. $ TCL
03f0: 4b 49 54 3d 22 60 70 77 64 60 2f 74 63 6c 6b 69  KIT="`pwd`/tclki
0400: 74 2d 6c 6f 63 61 6c 22 0a 09 09 09 69 76 2e 20  t-local"....iv. 
0410: 20 24 20 65 78 70 6f 72 74 20 54 43 4c 4b 49 54   $ export TCLKIT
0420: 0a 09 09 62 2e 20 43 72 6f 73 73 2d 63 6f 6d 70  ...b. Cross-comp
0430: 69 6c 65 3a 0a 09 09 09 69 2e 20 20 20 24 20 43  ile:....i.   $ C
0440: 43 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78 2d 75  C=mipsel-linux-u
0450: 63 6c 69 62 63 2d 67 63 63 0a 09 09 09 69 69 2e  clibc-gcc....ii.
0460: 20 20 24 20 43 58 58 3d 66 61 6c 73 65 0a 09 09    $ CXX=false...
0470: 09 69 69 69 2e 20 24 20 41 52 3d 6d 69 70 73 65  .iii. $ AR=mipse
0480: 6c 2d 6c 69 6e 75 78 2d 75 63 6c 69 62 63 2d 61  l-linux-uclibc-a
0490: 72 0a 09 09 09 69 76 2e 20 20 24 20 52 41 4e 4c  r....iv.  $ RANL
04a0: 49 42 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78 2d  IB=mipsel-linux-
04b0: 75 63 6c 69 62 63 2d 72 61 6e 6c 69 62 0a 09 09  uclibc-ranlib...
04c0: 09 76 2e 20 20 20 24 20 65 78 70 6f 72 74 20 43  .v.   $ export C
04d0: 43 20 43 58 58 20 41 52 20 52 41 4e 4c 49 42 0a  C CXX AR RANLIB.
04e0: 09 09 09 76 69 2e 20 20 24 20 2e 2f 6b 69 74 63  ...vi.  $ ./kitc
04f0: 72 65 61 74 6f 72 20 2d 2d 68 6f 73 74 3d 6d 69  reator --host=mi
0500: 70 73 65 6c 2d 6c 69 6e 75 78 2d 75 63 6c 69 62  psel-linux-uclib
0510: 63 0a 09 20 20 20 4e 6f 74 65 3a 20 57 68 65 6e  c..   Note: When
0520: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67   cross-compiling
0530: 2c 20 74 68 65 20 54 63 6c 20 63 6f 6e 66 69 67  , the Tcl config
0540: 75 72 65 20 73 63 72 69 70 74 20 6d 61 79 20 62  ure script may b
0550: 65 20 75 6e 61 62 6c 65 0a 09 20 20 20 74 6f 20  e unable..   to 
0560: 64 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20  determine which 
0570: 73 65 72 69 61 6c 20 73 75 70 70 6f 72 74 20 6d  serial support m
0580: 65 74 68 6f 64 20 74 6f 20 75 73 65 2e 20 49 66  ethod to use. If
0590: 20 79 6f 75 20 77 61 6e 74 20 73 65 72 69 61 6c   you want serial
05a0: 0a 09 20 20 20 73 75 70 70 6f 72 74 20 69 6e 20  ..   support in 
05b0: 61 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 65 64  a cross-compiled
05c0: 20 74 63 6c 6b 69 74 2c 20 73 70 65 63 69 66 79   tclkit, specify
05d0: 20 69 74 20 6d 61 6e 75 61 6c 6c 79 2c 20 65 2e   it manually, e.
05e0: 67 2e 3a 0a 09 09 24 20 2e 2f 6b 69 74 63 72 65  g.:...$ ./kitcre
05f0: 61 74 6f 72 20 43 46 4c 41 47 53 3d 2d 44 55 53  ator CFLAGS=-DUS
0600: 45 5f 54 45 52 4d 49 4f 53 3d 31 20 2d 68 6f 73  E_TERMIOS=1 -hos
0610: 74 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78 2d 75  t=mipsel-linux-u
0620: 63 6c 69 62 63 0a 0a 09 36 2e 20 43 6f 6d 70 69  clibc...6. Compi
0630: 6c 65 20 61 20 36 34 2d 62 69 74 20 54 63 6c 6b  le a 64-bit Tclk
0640: 69 74 20 38 2e 35 2e 31 35 20 75 73 69 6e 67 20  it 8.5.15 using 
0650: 53 75 6e 53 74 75 64 69 6f 20 31 32 2e 31 20 6f  SunStudio 12.1 o
0660: 6e 20 53 6f 6c 61 72 69 73 2f 78 38 36 3a 0a 09  n Solaris/x86:..
0670: 09 61 2e 20 24 20 43 43 3d 27 2f 6f 70 74 2f 73  .a. $ CC='/opt/s
0680: 75 6e 73 74 75 64 69 6f 31 32 2e 31 2f 62 69 6e  unstudio12.1/bin
0690: 2f 63 63 20 2d 6d 36 34 27 0a 09 09 62 2e 20 24  /cc -m64'...b. $
06a0: 20 43 58 58 3d 27 2f 6f 70 74 2f 73 75 6e 73 74   CXX='/opt/sunst
06b0: 75 64 69 6f 31 32 2e 31 2f 62 69 6e 2f 43 43 20  udio12.1/bin/CC 
06c0: 2d 6d 36 34 27 0a 09 09 63 2e 20 24 20 50 41 54  -m64'...c. $ PAT
06d0: 43 48 3d 27 67 70 61 74 63 68 27 0a 09 09 63 2e  CH='gpatch'...c.
06e0: 20 24 20 65 78 70 6f 72 74 20 43 43 20 43 58 58   $ export CC CXX
06f0: 20 50 41 54 43 48 0a 09 09 64 2e 20 24 20 2e 2f   PATCH...d. $ ./
0700: 6b 69 74 63 72 65 61 74 6f 72 20 38 2e 35 2e 31  kitcreator 8.5.1
0710: 35 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74  5 --enable-64bit
0720: 0a 0a 09 37 2e 20 54 6f 20 63 6c 65 61 6e 20 75  ...7. To clean u
0730: 70 20 70 6f 73 74 2d 62 75 69 6c 64 3a 0a 09 09  p post-build:...
0740: 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f  a. $ ./kitcreato
0750: 72 20 63 6c 65 61 6e 0a 0a 09 38 2e 20 43 72 65  r clean...8. Cre
0760: 61 74 65 20 61 20 54 63 6c 6b 69 74 20 77 69 74  ate a Tclkit wit
0770: 68 6f 75 74 20 4d 65 74 61 6b 69 74 34 20 73 75  hout Metakit4 su
0780: 70 70 6f 72 74 20 28 66 61 6c 6c 73 20 62 61 63  pport (falls bac
0790: 6b 20 74 6f 20 5a 69 70 20 66 6f 72 20 73 74 6f  k to Zip for sto
07a0: 72 61 67 65 29 3a 0a 09 09 61 2e 20 4b 49 54 43  rage):...a. KITC
07b0: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20  REATOR_PKGS='tk 
07c0: 69 74 63 6c 27 0a 09 09 62 2e 20 65 78 70 6f 72  itcl'...b. expor
07d0: 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  t KITCREATOR_PKG
07e0: 53 0a 09 09 63 2e 20 2e 2f 6b 69 74 63 72 65 61  S...c. ./kitcrea
07f0: 74 6f 72 0a 0a 09 39 2e 20 43 72 65 61 74 65 20  tor...9. Create 
0800: 61 20 54 63 6c 6b 69 74 20 77 69 74 68 20 4d 65  a Tclkit with Me
0810: 74 61 6b 69 74 34 20 73 75 70 70 6f 72 74 2c 20  takit4 support, 
0820: 62 75 74 20 75 73 69 6e 67 20 5a 69 70 20 66 6f  but using Zip fo
0830: 72 20 73 74 6f 72 61 67 65 3a 0a 09 09 61 2e 20  r storage:...a. 
0840: 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d  $ ./kitcreator -
0850: 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72  -enable-kit-stor
0860: 61 67 65 3d 7a 69 70 0a 0a 09 31 30 2e 20 43 72  age=zip...10. Cr
0870: 65 61 74 65 20 61 20 54 63 6c 6b 69 74 20 77 69  eate a Tclkit wi
0880: 74 68 20 4d 65 74 61 6b 69 74 34 20 73 75 70 70  th Metakit4 supp
0890: 6f 72 74 2c 20 62 75 74 20 75 73 69 6e 67 20 43  ort, but using C
08a0: 2d 56 46 53 20 66 6f 72 20 73 74 6f 72 61 67 65  -VFS for storage
08b0: 0a 09 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65  ...a. $ ./kitcre
08c0: 61 74 6f 72 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69  ator --enable-ki
08d0: 74 2d 73 74 6f 72 61 67 65 3d 63 76 66 73 0a 0a  t-storage=cvfs..
08e0: 09 31 31 2e 20 43 72 65 61 74 65 20 61 20 4b 69  .11. Create a Ki
08f0: 74 44 4c 4c 20 77 69 74 68 6f 75 74 20 4d 65 74  tDLL without Met
0900: 61 6b 69 74 20 73 75 70 70 6f 72 74 20 28 77 69  akit support (wi
0910: 6c 6c 20 6e 6f 74 20 63 72 65 61 74 65 20 61 20  ll not create a 
0920: 54 63 6c 6b 69 74 0a 09 20 20 20 20 62 69 6e 61  Tclkit..    bina
0930: 72 79 2c 20 6a 75 73 74 20 74 68 65 20 6c 69 62  ry, just the lib
0940: 72 61 72 79 29 3a 0a 09 09 61 2e 20 24 20 4b 49  rary):...a. $ KI
0950: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74  TCREATOR_PKGS='t
0960: 6b 20 69 74 63 6c 20 6b 69 74 64 6c 6c 27 0a 09  k itcl kitdll'..
0970: 09 62 2e 20 24 20 65 78 70 6f 72 74 20 4b 49 54  .b. $ export KIT
0980: 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a 09 09 63  CREATOR_PKGS...c
0990: 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72  . $ ./kitcreator
09a0: 0a 0a 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  ..Environment va
09b0: 72 69 61 62 6c 65 73 3a 0a 09 31 2e 20 4d 41 4b  riables:..1. MAK
09c0: 45 0a 09 09 53 70 65 63 69 66 69 65 73 20 74 68  E...Specifies th
09d0: 65 20 74 6f 6f 6c 20 79 6f 75 20 77 69 73 68 20  e tool you wish 
09e0: 74 6f 20 62 65 20 63 61 6c 6c 65 64 20 74 6f 20  to be called to 
09f0: 62 75 69 6c 64 20 74 61 72 67 65 74 73 0a 09 09  build targets...
0a00: 66 72 6f 6d 20 61 20 4d 61 6b 65 66 69 6c 65 2e  from a Makefile.
0a10: 20 20 54 68 69 73 20 73 63 72 69 70 74 20 69 73    This script is
0a20: 20 67 65 6e 65 72 61 6c 6c 79 20 6d 6f 72 65 20   generally more 
0a30: 77 65 6c 6c 20 74 65 73 74 65 64 0a 09 09 77 69  well tested...wi
0a40: 74 68 20 47 4e 55 20 4d 61 6b 65 2e 0a 0a 09 32  th GNU Make....2
0a50: 2e 20 50 41 54 43 48 0a 09 09 53 70 65 63 69 66  . PATCH...Specif
0a60: 69 65 73 20 74 68 65 20 74 6f 6f 6c 20 79 6f 75  ies the tool you
0a70: 20 77 69 73 68 20 74 6f 20 62 65 20 63 61 6c 6c   wish to be call
0a80: 65 64 20 74 6f 20 61 70 70 6c 79 20 75 6e 69 66  ed to apply unif
0a90: 69 65 64 0a 09 09 64 69 66 66 20 70 61 74 63 68  ied...diff patch
0aa0: 65 73 2e 20 20 54 68 69 73 20 73 63 72 69 70 74  es.  This script
0ab0: 20 69 73 20 67 65 6e 65 72 61 6c 6c 79 20 6d 6f   is generally mo
0ac0: 72 65 20 77 65 6c 6c 20 74 65 73 74 65 64 20 77  re well tested w
0ad0: 69 74 68 0a 09 09 47 4e 55 20 50 61 74 63 68 2e  ith...GNU Patch.
0ae0: 20 0a 0a 09 33 2e 20 54 43 4c 4b 49 54 0a 09 09   ...3. TCLKIT...
0af0: 53 70 65 63 69 66 79 20 74 68 65 20 70 61 74 68  Specify the path
0b00: 20 74 6f 20 61 20 54 63 6c 6b 69 74 20 74 68 61   to a Tclkit tha
0b10: 74 20 69 73 20 72 75 6e 6e 61 62 6c 65 20 6f 6e  t is runnable on
0b20: 20 74 68 65 20 63 75 72 72 65 6e 74 0a 09 09 73   the current...s
0b30: 79 73 74 65 6d 2e 20 20 54 68 65 20 64 65 66 61  ystem.  The defa
0b40: 75 6c 74 20 69 73 20 22 74 63 6c 6b 69 74 22 2e  ult is "tclkit".
0b50: 20 20 41 20 77 6f 72 6b 69 6e 67 20 74 63 6c 6b    A working tclk
0b60: 69 74 20 69 73 20 72 65 71 75 69 72 65 64 0a 09  it is required..
0b70: 09 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69  .for cross-compi
0b80: 6c 69 6e 67 20 54 63 6c 6b 69 74 73 2e 0a 0a 09  ling Tclkits....
0b90: 34 2e 20 53 54 41 54 49 43 54 4b 0a 09 09 53 70  4. STATICTK...Sp
0ba0: 65 63 69 66 79 20 74 68 69 73 20 61 73 20 22 31  ecify this as "1
0bb0: 22 20 74 6f 20 73 74 61 74 69 63 61 6c 6c 79 20  " to statically 
0bc0: 6c 69 6e 6b 20 74 6f 20 54 6b 2e 20 20 54 68 65  link to Tk.  The
0bd0: 20 64 65 66 61 75 6c 74 0a 09 09 61 63 74 69 6f   default...actio
0be0: 6e 20 6f 6e 20 6d 6f 73 74 20 70 6c 61 74 66 6f  n on most platfo
0bf0: 72 6d 73 20 69 73 20 74 6f 20 64 79 6e 61 6d 69  rms is to dynami
0c00: 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 6f 20 54 6b  cally link to Tk
0c10: 2e 20 20 57 68 65 6e 0a 09 09 62 75 69 6c 64 69  .  When...buildi
0c20: 6e 67 20 4b 69 74 44 4c 4c 2c 20 53 54 41 54 49  ng KitDLL, STATI
0c30: 43 54 4b 20 69 73 20 22 31 22 20 62 79 20 64 65  CTK is "1" by de
0c40: 66 61 75 6c 74 2e 20 20 49 66 20 79 6f 75 20 77  fault.  If you w
0c50: 61 6e 74 20 74 6f 0a 09 09 65 6e 61 62 6c 65 20  ant to...enable 
0c60: 64 79 6e 61 6d 69 63 20 6c 69 6e 6b 69 6e 67 20  dynamic linking 
0c70: 6f 66 20 54 6b 20 77 69 74 68 20 4b 69 74 44 4c  of Tk with KitDL
0c80: 4c 20 79 6f 75 20 77 69 6c 6c 20 68 61 76 65 20  L you will have 
0c90: 74 6f 0a 09 09 73 70 65 63 69 66 79 20 74 68 69  to...specify thi
0ca0: 73 20 61 73 20 22 2d 31 22 2e 0a 0a 09 35 2e 20  s as "-1"....5. 
0cb0: 53 54 41 54 49 43 4d 4b 34 0a 09 09 53 70 65 63  STATICMK4...Spec
0cc0: 69 66 79 20 74 68 69 73 20 61 73 20 22 30 22 20  ify this as "0" 
0cd0: 74 6f 20 61 74 74 65 6d 70 74 20 74 6f 20 63 72  to attempt to cr
0ce0: 65 61 74 65 20 63 72 65 61 74 65 20 74 68 65 20  eate create the 
0cf0: 22 6d 6b 34 74 63 6c 22 0a 09 09 70 72 6f 6a 65  "mk4tcl"...proje
0d00: 63 74 20 61 73 20 61 20 73 68 61 72 65 64 20 6f  ct as a shared o
0d10: 62 6a 65 63 74 2e 20 20 49 66 20 74 68 69 73 20  bject.  If this 
0d20: 66 61 69 6c 73 2c 20 69 74 20 77 69 6c 6c 20 66  fails, it will f
0d30: 61 6c 6c 20 62 61 63 6b 0a 09 09 74 6f 20 62 75  all back...to bu
0d40: 69 6c 64 69 6e 67 20 73 74 61 74 69 63 61 6c 6c  ilding staticall
0d50: 79 2e 20 20 53 70 65 63 69 66 79 20 69 74 20 61  y.  Specify it a
0d60: 73 20 22 2d 31 22 20 74 6f 20 66 6f 72 63 65 20  s "-1" to force 
0d70: 62 75 69 6c 64 69 6e 67 0a 09 09 69 74 20 61 73  building...it as
0d80: 20 61 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74   a shared object
0d90: 2e 20 20 41 6e 79 20 6f 74 68 65 72 20 76 61 6c  .  Any other val
0da0: 75 65 2c 20 69 6e 63 6c 75 64 69 6e 67 20 62 65  ue, including be
0db0: 69 6e 67 20 75 6e 73 65 74 0a 09 09 72 65 73 75  ing unset...resu
0dc0: 6c 74 73 20 69 6e 20 22 6d 6b 34 74 63 6c 22 20  lts in "mk4tcl" 
0dd0: 62 65 69 6e 67 20 62 75 69 6c 74 20 61 6e 64 20  being built and 
0de0: 6c 69 6e 6b 65 64 20 73 74 61 74 69 63 61 6c 6c  linked staticall
0df0: 79 2e 20 20 4b 69 74 44 49 4c 4c 0a 09 09 73 65  y.  KitDILL...se
0e00: 74 73 20 74 68 69 73 20 74 6f 20 76 61 72 69 61  ts this to varia
0e10: 62 6c 65 20 74 6f 20 22 30 22 2e 20 20 49 66 20  ble to "0".  If 
0e20: 4d 65 74 61 6b 69 74 34 20 69 73 20 62 75 69 6c  Metakit4 is buil
0e30: 74 20 73 68 61 72 65 64 2c 20 69 74 0a 09 09 63  t shared, it...c
0e40: 61 6e 6e 6f 74 20 62 65 20 75 73 65 64 20 66 6f  annot be used fo
0e50: 72 20 74 68 65 20 6b 69 74 20 73 74 6f 72 61 67  r the kit storag
0e60: 65 20 66 6f 72 20 54 63 6c 6b 69 74 2e 0a 0a 09  e for Tclkit....
0e70: 36 2e 20 53 54 52 49 50 0a 09 09 53 70 65 63 69  6. STRIP...Speci
0e80: 66 69 65 73 20 74 68 65 20 74 6f 6f 6c 20 79 6f  fies the tool yo
0e90: 75 20 77 69 73 68 20 74 6f 20 62 65 20 63 61 6c  u wish to be cal
0ea0: 6c 65 64 20 74 6f 20 73 74 72 69 70 20 6f 62 6a  led to strip obj
0eb0: 65 63 74 20 66 69 6c 65 73 2c 0a 09 09 61 72 63  ect files,...arc
0ec0: 68 69 76 65 73 2c 20 61 6e 64 20 73 68 61 72 65  hives, and share
0ed0: 64 20 6f 62 6a 65 63 74 73 2e 20 20 54 68 65 20  d objects.  The 
0ee0: 64 65 66 61 75 6c 74 20 69 73 20 22 73 74 72 69  default is "stri
0ef0: 70 22 2e 20 20 59 6f 75 0a 09 09 73 68 6f 75 6c  p".  You...shoul
0f00: 64 20 70 72 6f 62 61 62 6c 79 20 73 65 74 20 74  d probably set t
0f10: 68 69 73 20 69 66 20 79 6f 75 20 61 72 65 20 63  his if you are c
0f20: 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 2e 0a  ross-compiling..
0f30: 0a 09 37 2e 20 4b 49 54 43 52 45 41 54 4f 52 5f  ..7. KITCREATOR_
0f40: 50 4b 47 53 0a 09 09 53 70 65 63 69 66 79 20 77  PKGS...Specify w
0f50: 68 69 63 68 20 6e 6f 6e 2d 72 65 71 75 69 72 65  hich non-require
0f60: 64 20 70 61 63 6b 61 67 65 73 20 74 6f 20 62 75  d packages to bu
0f70: 69 6c 64 2e 20 20 54 68 65 20 64 65 66 61 75 6c  ild.  The defaul
0f80: 74 20 6c 69 73 74 0a 09 09 69 73 3a 0a 09 09 09  t list...is:....
0f90: 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63 6c 0a 0a  tk itcl mk4tcl..
0fa0: 09 09 49 66 20 6d 6b 34 74 63 6c 20 69 73 20 6e  ..If mk4tcl is n
0fb0: 6f 74 20 70 72 65 73 65 6e 74 20 61 20 5a 69 70  ot present a Zip
0fc0: 2d 62 61 73 65 64 20 73 74 6f 72 61 67 65 20 6d  -based storage m
0fd0: 65 63 68 61 6e 69 73 6d 20 77 69 6c 6c 20 62 65  echanism will be
0fe0: 0a 09 09 75 73 65 64 20 69 6e 73 74 65 61 64 2e  ...used instead.
0ff0: 20 20 54 6f 20 73 70 65 63 69 66 79 20 74 68 61    To specify tha
1000: 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 62 65  t the default be
1010: 20 75 73 65 64 2c 20 64 6f 20 6e 6f 74 20 73 65   used, do not se
1020: 74 0a 09 09 74 68 69 73 20 6f 72 20 73 65 74 20  t...this or set 
1030: 69 74 20 74 6f 20 74 68 65 20 65 6d 70 74 79 20  it to the empty 
1040: 73 74 72 69 6e 67 2e 20 20 54 6f 20 73 70 65 63  string.  To spec
1050: 69 66 79 20 74 68 61 74 20 6e 6f 0a 09 09 6e 6f  ify that no...no
1060: 6e 2d 72 65 71 75 69 72 65 64 20 70 61 63 6b 61  n-required packa
1070: 67 65 73 20 62 65 20 62 75 69 6c 74 2c 20 73 65  ges be built, se
1080: 74 20 69 74 20 74 6f 20 61 20 73 74 72 69 6e 67  t it to a string
1090: 20 74 68 61 74 0a 09 09 63 6f 6e 74 61 69 6e 73   that...contains
10a0: 20 6f 6e 6c 79 20 77 68 69 74 65 20 73 70 61 63   only white spac
10b0: 65 2e 0a 0a 09 09 49 66 20 22 6b 69 74 64 6c 6c  e.....If "kitdll
10c0: 22 20 69 73 20 73 70 65 63 69 66 69 65 64 20 69  " is specified i
10d0: 6e 20 74 68 65 20 6c 69 73 74 20 74 68 65 20 74  n the list the t
10e0: 61 72 67 65 74 20 62 65 63 6f 6d 65 73 20 4b 69  arget becomes Ki
10f0: 74 44 4c 4c 0a 09 09 61 6e 64 20 6e 6f 20 54 63  tDLL...and no Tc
1100: 6c 6b 69 74 20 77 69 6c 6c 20 62 75 69 6c 74 2c  lkit will built,
1110: 20 62 75 74 20 69 6e 73 74 65 61 64 20 6c 69 62   but instead lib
1120: 74 63 6c 6b 69 74 2e 0a 0a 09 38 2e 20 4b 49 54  tclkit....8. KIT
1130: 43 52 45 41 54 4f 52 5f 4d 49 4e 45 4e 43 4f 44  CREATOR_MINENCOD
1140: 49 4e 47 53 0a 09 09 53 65 74 20 74 68 69 73 20  INGS...Set this 
1150: 76 61 72 69 61 62 6c 65 20 74 6f 20 61 20 6e 6f  variable to a no
1160: 6e 2d 65 6d 70 74 79 20 73 74 72 69 6e 67 20 74  n-empty string t
1170: 6f 20 67 65 6e 65 72 61 74 65 20 61 20 54 63 6c  o generate a Tcl
1180: 6b 69 74 0a 09 09 77 69 74 68 6f 75 74 20 61 6c  kit...without al
1190: 6c 20 65 6e 63 6f 64 69 6e 67 73 2c 20 6f 6e 6c  l encodings, onl
11a0: 79 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 20  y including the 
11b0: 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 09 09 09 61 73  following:....as
11c0: 63 69 69 2e 65 6e 63 20 63 70 31 32 35 32 2e 65  cii.enc cp1252.e
11d0: 6e 63 20 69 73 6f 38 38 35 39 2d 31 2e 65 6e 63  nc iso8859-1.enc
11e0: 20 69 73 6f 38 38 35 39 2d 31 35 2e 65 6e 63 0a   iso8859-15.enc.
11f0: 09 09 09 69 73 6f 38 38 35 39 2d 32 2e 65 6e 63  ...iso8859-2.enc
1200: 20 6b 6f 69 38 2d 72 2e 65 6e 63 20 6d 61 63 52   koi8-r.enc macR
1210: 6f 6d 61 6e 2e 65 6e 63 0a 0a 09 39 2e 20 4b 49  oman.enc...9. KI
1220: 54 43 52 45 41 54 4f 52 5f 4d 49 4e 42 55 49 4c  TCREATOR_MINBUIL
1230: 44 0a 09 09 53 65 74 20 74 68 69 73 20 76 61 72  D...Set this var
1240: 69 61 62 6c 65 20 74 6f 20 61 20 6e 6f 6e 2d 65  iable to a non-e
1250: 6d 70 74 79 20 73 74 72 69 6e 67 20 74 6f 20 65  mpty string to e
1260: 78 63 6c 75 64 65 20 75 6e 6e 65 63 65 73 73 61  xclude unnecessa
1270: 72 79 0a 09 09 70 61 63 6b 61 67 65 73 20 66 72  ry...packages fr
1280: 6f 6d 20 54 63 6c 20 62 75 69 6c 64 2e 20 20 54  om Tcl build.  T
1290: 68 69 73 20 65 78 63 6c 75 64 65 73 20 74 68 65  his excludes the
12a0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 63 6b 61   following packa
12b0: 67 65 73 3a 0a 09 09 09 74 63 6c 74 65 73 74 0a  ges:....tcltest.
12c0: 0a 09 09 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c  ...Additionally,
12d0: 20 61 6e 79 20 62 75 6e 64 6c 65 64 20 70 61 63   any bundled pac
12e0: 6b 61 67 65 73 20 28 69 6e 20 74 68 65 20 22 70  kages (in the "p
12f0: 6b 67 73 22 20 64 69 72 65 63 74 6f 72 79 29 0a  kgs" directory).
1300: 09 09 61 72 65 20 65 78 63 6c 75 64 65 64 2e 20  ..are excluded. 
1310: 20 54 68 69 73 20 74 79 70 69 63 61 6c 6c 79 20   This typically 
1320: 69 6e 63 6c 75 64 65 73 20 28 61 73 20 6f 66 20  includes (as of 
1330: 54 63 6c 20 38 2e 36 29 3a 0a 09 09 09 69 74 63  Tcl 8.6):....itc
1340: 6c 20 74 68 72 65 61 64 0a 0a 09 31 30 2e 20 4b  l thread...10. K
1350: 43 5f 54 43 4c 5f 53 54 41 54 49 43 50 4b 47 53  C_TCL_STATICPKGS
1360: 0a 09 09 53 65 74 20 74 68 69 73 20 76 61 72 69  ...Set this vari
1370: 61 62 6c 65 20 74 6f 20 74 68 65 20 76 61 6c 75  able to the valu
1380: 65 20 22 31 22 20 74 6f 20 61 74 74 65 6d 70 74  e "1" to attempt
1390: 20 74 6f 20 66 6f 72 63 65 20 74 68 65 0a 09 09   to force the...
13a0: 70 61 63 6b 61 67 65 73 20 69 6e 63 6c 75 64 65  packages include
13b0: 64 20 69 6e 20 74 68 65 20 22 70 6b 67 73 22 20  d in the "pkgs" 
13c0: 64 69 72 65 63 74 6f 72 79 20 6f 66 20 54 63 6c  directory of Tcl
13d0: 20 38 2e 36 2b 0a 09 09 74 6f 20 62 65 20 63 6f   8.6+...to be co
13e0: 6d 70 69 6c 65 64 20 73 74 61 74 69 63 61 6c 6c  mpiled staticall
13f0: 79 0a 0a 43 72 6f 73 73 20 63 6f 6d 70 69 6c 69  y..Cross compili
1400: 6e 67 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 56  ng Environment V
1410: 61 72 69 61 62 6c 65 73 3a 0a 0a 09 31 2e 20 43  ariables:...1. C
1420: 43 20 20 0a 09 09 43 20 63 6f 6d 70 69 6c 65 72  C  ...C compiler
1430: 20 20 20 65 2e 67 2e 20 69 36 38 36 2d 70 63 2d     e.g. i686-pc-
1440: 6d 69 6e 67 77 33 32 2d 67 63 63 0a 0a 09 32 2e  mingw32-gcc...2.
1450: 20 43 58 58 0a 09 09 43 2b 2b 20 63 6f 6d 70 69   CXX...C++ compi
1460: 6c 65 72 2e 20 20 52 65 71 75 69 72 65 64 20 69  ler.  Required i
1470: 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 75 73  f you want to us
1480: 65 20 6d 6b 34 74 63 6c 2e 20 65 2e 67 2e 20 69  e mk4tcl. e.g. i
1490: 36 38 36 2d 70 63 2d 6d 69 6e 67 77 33 32 2d 67  686-pc-mingw32-g
14a0: 2b 2b 0a 09 09 49 66 20 6e 6f 74 20 72 65 71 75  ++...If not requ
14b0: 69 72 65 64 2c 20 79 6f 75 20 63 61 6e 20 73 65  ired, you can se
14c0: 74 20 69 74 20 74 6f 20 74 68 65 20 73 74 72 69  t it to the stri
14d0: 6e 67 20 22 66 61 6c 73 65 22 0a 0a 09 33 2e 20  ng "false"...3. 
14e0: 41 52 0a 09 09 4c 69 62 72 61 72 79 20 63 72 65  AR...Library cre
14f0: 61 74 6f 72 20 65 2e 67 2e 20 69 36 38 36 2d 70  ator e.g. i686-p
1500: 63 2d 6d 69 6e 67 77 33 32 2d 61 72 0a 0a 09 34  c-mingw32-ar...4
1510: 2e 20 52 41 4e 4c 49 42 0a 09 09 4c 69 62 72 61  . RANLIB...Libra
1520: 72 79 20 70 6f 73 74 20 70 72 6f 63 65 73 73 69  ry post processi
1530: 6e 67 20 65 78 65 63 75 74 61 62 6c 65 20 65 2e  ng executable e.
1540: 67 2e 20 69 36 38 36 2d 70 63 2d 6d 69 6e 67 77  g. i686-pc-mingw
1550: 33 32 2d 72 61 6e 6c 69 62 0a 0a 09 35 2e 20 53  32-ranlib...5. S
1560: 54 52 49 50 0a 09 09 45 78 65 63 75 74 61 62 6c  TRIP...Executabl
1570: 65 20 6e 61 6d 65 20 74 6f 20 73 74 72 69 70 20  e name to strip 
1580: 62 69 6e 61 72 69 65 73 20 65 2e 67 2e 20 69 36  binaries e.g. i6
1590: 38 36 2d 70 63 2d 6d 69 6e 67 77 33 32 2d 73 74  86-pc-mingw32-st
15a0: 72 69 70 0a 0a 09 36 2e 20 4e 4d 0a 09 09 45 78  rip...6. NM...Ex
15b0: 65 63 75 74 61 62 6c 65 20 75 73 65 64 20 74 6f  ecutable used to
15c0: 20 64 75 6d 70 20 6e 61 6d 65 73 20 66 72 6f 6d   dump names from
15d0: 20 74 68 65 20 6f 62 6a 65 63 74 73 20 20 65 2e   the objects  e.
15e0: 67 2e 20 69 36 38 36 2d 70 63 2d 6d 69 6e 67 77  g. i686-pc-mingw
15f0: 33 32 2d 6e 6d 0a 0a 09 37 2e 20 43 43 5f 46 4f  32-nm...7. CC_FO
1600: 52 5f 42 55 49 4c 44 2c 20 48 4f 53 54 5f 43 43  R_BUILD, HOST_CC
1610: 20 0a 09 09 53 65 74 20 74 68 69 73 20 74 6f 20   ...Set this to 
1620: 74 68 65 20 6e 61 6d 65 20 6f 66 20 63 6f 6d 70  the name of comp
1630: 69 6c 65 72 20 6f 6e 20 74 68 65 20 68 6f 73 74  iler on the host
1640: 20 6f 6e 20 77 68 69 63 68 0a 09 09 74 68 65 20   on which...the 
1650: 63 72 6f 73 73 20 63 6f 6d 70 69 6c 61 74 69 6f  cross compilatio
1660: 6e 20 69 73 20 62 65 69 6e 67 20 72 75 6e 2e 0a  n is being run..
1670: 0a 4f 6e 20 57 69 6e 64 6f 77 73 20 77 65 20 61  .On Windows we a
1680: 6c 73 6f 20 6e 65 65 64 20 74 68 69 73 3a 0a 0a  lso need this:..
1690: 09 31 2e 20 52 43 0a 09 09 52 65 73 6f 75 72 63  .1. RC...Resourc
16a0: 65 20 63 6f 6d 70 69 6c 65 72 20 3a 20 65 2e 67  e compiler : e.g
16b0: 2e 20 69 36 38 36 2d 70 63 2d 6d 69 6e 67 77 33  . i686-pc-mingw3
16c0: 32 2d 77 69 6e 64 72 65 73 0a 0a 0a 4b 69 74 73  2-windres...Kits
16d0: 68 20 43 6f 6e 66 69 67 75 72 65 20 4f 70 74 69  h Configure Opti
16e0: 6f 6e 73 3a 0a 09 31 2e 20 2d 2d 65 6e 61 62 6c  ons:..1. --enabl
16f0: 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7b 7a  e-kit-storage={z
1700: 69 70 7c 6d 6b 34 7c 63 76 66 73 7c 61 75 74 6f  ip|mk4|cvfs|auto
1710: 7d 0a 09 09 53 70 65 63 69 66 79 20 77 68 69 63  }...Specify whic
1720: 68 20 74 79 70 65 20 6f 66 20 73 74 6f 72 61 67  h type of storag
1730: 65 20 74 6f 20 75 73 65 20 77 69 74 68 20 74 68  e to use with th
1740: 65 20 54 63 6c 6b 69 74 2e 20 20 54 68 65 0a 09  e Tclkit.  The..
1750: 09 64 65 66 61 75 6c 74 20 69 73 20 74 6f 20 61  .default is to a
1760: 75 74 6f 2d 64 65 74 65 63 74 2e 20 20 41 75 74  uto-detect.  Aut
1770: 6f 2d 64 65 74 65 63 74 69 6f 6e 20 75 73 65 73  o-detection uses
1780: 20 4d 6b 34 20 69 66 0a 09 09 61 76 61 69 6c 61   Mk4 if...availa
1790: 62 6c 65 20 61 6e 64 20 62 75 69 6c 74 20 73 74  ble and built st
17a0: 61 74 69 63 61 6c 6c 79 2c 20 6f 74 68 65 72 77  atically, otherw
17b0: 69 73 65 20 69 74 20 66 61 6c 6c 73 20 62 61 63  ise it falls bac
17c0: 6b 20 74 6f 20 5a 69 70 2e 0a 09 32 2e 20 2d 2d  k to Zip...2. --
17d0: 77 69 74 68 2d 6f 62 73 66 75 63 61 74 65 64 2d  with-obsfucated-
17e0: 63 76 66 73 0a 09 09 53 70 65 63 69 66 79 20 74  cvfs...Specify t
17f0: 68 61 74 20 43 56 46 53 20 73 68 6f 75 6c 64 20  hat CVFS should 
1800: 62 65 20 6f 62 73 66 75 63 61 74 65 64 2e 20 20  be obsfucated.  
1810: 54 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20  The contents of 
1820: 74 68 65 0a 09 09 43 56 46 53 20 61 72 65 20 65  the...CVFS are e
1830: 6e 63 72 79 70 74 65 64 20 6f 6e 20 64 69 73 6b  ncrypted on disk
1840: 20 61 6e 64 20 74 68 65 20 65 6e 63 72 79 70 74   and the encrypt
1850: 69 6f 6e 20 6b 65 79 20 69 73 20 69 6e 63 6c 75  ion key is inclu
1860: 64 65 64 0a 09 09 69 6e 20 74 68 65 20 65 78 65  ded...in the exe
1870: 63 75 74 61 62 6c 65 2e 20 20 46 69 6c 65 73 20  cutable.  Files 
1880: 61 72 65 20 74 68 65 6e 20 74 72 61 6e 73 70 61  are then transpa
1890: 72 65 6e 74 6c 79 20 64 65 63 72 79 70 74 65 64  rently decrypted
18a0: 20 6f 6e 0a 09 09 61 63 63 65 73 73 2e 0a 0a 2d   on...access...-
18b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18c0: 2d 2d 2d 0a 55 73 69 6e 67 20 74 68 65 20 4b 69  ---.Using the Ki
18d0: 74 44 4c 4c 20 53 44 4b 0a 2d 2d 2d 2d 2d 2d 2d  tDLL SDK.-------
18e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 57 68  -------------.Wh
18f0: 65 6e 20 79 6f 75 20 62 75 69 6c 64 20 61 20 4b  en you build a K
1900: 69 74 44 4c 4c 2c 20 61 20 22 6c 69 62 74 63 6c  itDLL, a "libtcl
1910: 6b 69 74 2d 73 64 6b 2d 3c 74 63 6c 76 65 72 73  kit-sdk-<tclvers
1920: 3e 2e 74 61 72 2e 67 7a 22 20 74 61 72 62 61 6c  >.tar.gz" tarbal
1930: 6c 20 69 73 20 61 6c 73 6f 0a 70 72 6f 64 75 63  l is also.produc
1940: 65 64 2e 20 20 54 68 69 73 20 74 61 72 62 61 6c  ed.  This tarbal
1950: 6c 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 54  l contains the T
1960: 63 6c 20 28 61 6e 64 20 54 6b 2c 20 69 66 20 63  cl (and Tk, if c
1970: 6f 6d 70 69 6c 65 64 29 20 73 74 75 62 73 20 6c  ompiled) stubs l
1980: 69 62 72 61 72 69 65 73 2c 0a 61 6e 64 20 54 63  ibraries,.and Tc
1990: 6c 20 28 61 6e 64 20 54 6b 2c 20 69 66 20 63 6f  l (and Tk, if co
19a0: 6d 70 69 6c 65 64 29 20 68 65 61 64 65 72 20 66  mpiled) header f
19b0: 69 6c 65 73 20 6e 65 65 64 65 64 20 74 6f 20 63  iles needed to c
19c0: 6f 6d 70 69 6c 65 20 61 6e 64 20 6c 69 6e 6b 20  ompile and link 
19d0: 74 68 69 6e 67 73 0a 61 67 61 69 6e 73 74 20 54  things.against T
19e0: 63 6c 20 28 61 6e 64 20 54 6b 29 2e 20 20 49 74  cl (and Tk).  It
19f0: 20 61 6c 73 6f 20 69 6e 63 6c 75 64 65 73 20 22   also includes "
1a00: 74 63 6c 43 6f 6e 66 69 67 2e 73 68 22 20 28 61  tclConfig.sh" (a
1a10: 6e 64 20 22 74 6b 43 6f 6e 66 69 67 2e 73 68 22  nd "tkConfig.sh"
1a20: 2c 20 69 66 0a 54 6b 20 77 61 73 20 63 6f 6d 70  , if.Tk was comp
1a30: 69 6c 65 64 29 2e 0a 0a 54 68 65 20 70 75 72 70  iled)...The purp
1a40: 6f 73 65 20 66 6f 72 20 74 68 69 73 20 74 61 72  ose for this tar
1a50: 62 61 6c 6c 20 69 73 20 74 6f 20 62 65 20 75 73  ball is to be us
1a60: 65 64 20 74 6f 20 62 75 69 6c 64 20 54 63 6c 20  ed to build Tcl 
1a70: 65 78 74 65 6e 73 69 6f 6e 73 20 6f 72 0a 61 70  extensions or.ap
1a80: 70 6c 69 63 61 74 69 6f 6e 73 20 74 68 61 74 20  plications that 
1a90: 72 65 6c 79 20 6f 6e 20 54 63 6c 2f 54 6b 20 75  rely on Tcl/Tk u
1aa0: 73 69 6e 67 20 74 68 65 20 4b 69 74 44 4c 4c 2e  sing the KitDLL.
1ab0: 0a 0a 54 6f 20 75 73 65 20 69 74 2c 20 6f 6e 65  ..To use it, one
1ac0: 20 66 69 72 73 74 20 6d 75 73 74 20 65 78 74 72   first must extr
1ad0: 61 63 74 20 74 68 65 20 74 61 72 62 61 6c 6c 2e  act the tarball.
1ae0: 20 20 41 66 74 65 72 20 74 68 61 74 20 74 68 65    After that the
1af0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72   environment.var
1b00: 69 61 62 6c 65 20 22 54 43 4c 4b 49 54 5f 53 44  iable "TCLKIT_SD
1b10: 4b 5f 44 49 52 22 20 6d 75 73 74 20 62 65 20 73  K_DIR" must be s
1b20: 65 74 20 74 6f 20 74 68 65 20 64 69 72 65 63 74  et to the direct
1b30: 6f 72 79 20 74 68 61 74 20 77 61 73 20 63 72 65  ory that was cre
1b40: 61 74 65 64 20 69 6e 0a 6f 72 64 65 72 20 74 6f  ated in.order to
1b50: 20 6d 61 6b 65 20 6d 6f 73 74 20 6f 66 20 74 68   make most of th
1b60: 65 20 76 61 72 69 61 62 6c 65 73 20 63 6f 6e 74  e variables cont
1b70: 61 69 6e 20 75 73 65 66 75 6c 20 76 61 6c 75 65  ain useful value
1b80: 73 2e 0a 0a 46 6f 72 20 65 78 61 6d 70 6c 65 2c  s...For example,
1b90: 20 74 6f 20 62 75 69 6c 64 20 61 6e 20 65 78 74   to build an ext
1ba0: 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 74 68 65  ension using the
1bb0: 20 4b 69 74 44 4c 4c 20 53 44 4b 20 6f 6e 65 20   KitDLL SDK one 
1bc0: 77 6f 75 6c 64 20 74 79 70 69 63 61 6c 6c 79 20  would typically 
1bd0: 64 6f 0a 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b  do.something lik
1be0: 65 3a 0a 09 31 2e 20 43 6f 6d 70 69 6c 65 20 4b  e:..1. Compile K
1bf0: 69 74 44 4c 4c 20 28 6d 61 79 20 62 65 20 6f 6d  itDLL (may be om
1c00: 69 74 74 65 64 20 69 66 20 74 68 65 20 4b 69 74  itted if the Kit
1c10: 44 4c 4c 20 53 44 4b 20 69 73 20 61 6c 72 65 61  DLL SDK is alrea
1c20: 64 79 0a 09 20 20 20 61 76 61 69 6c 61 62 6c 65  dy..   available
1c30: 29 0a 09 09 61 2e 20 24 20 4b 49 54 43 52 45 41  )...a. $ KITCREA
1c40: 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74 63  TOR_PKGS='tk itc
1c50: 6c 20 6b 69 74 64 6c 6c 27 0a 09 09 62 2e 20 24  l kitdll'...b. $
1c60: 20 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54   export KITCREAT
1c70: 4f 52 5f 50 4b 47 53 0a 09 09 63 2e 20 24 20 2e  OR_PKGS...c. $ .
1c80: 2f 6b 69 74 63 72 65 61 74 6f 72 0a 09 32 2e 20  /kitcreator..2. 
1c90: 43 6f 6d 70 69 6c 65 20 74 68 65 20 45 78 74 65  Compile the Exte
1ca0: 6e 73 69 6f 6e 0a 09 09 61 2e 20 24 20 74 61 72  nsion...a. $ tar
1cb0: 20 2d 78 66 20 2f 70 61 74 68 2f 74 6f 2f 6c 69   -xf /path/to/li
1cc0: 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 38 2e 34 2e  btclkit-sdk-8.4.
1cd0: 31 39 2e 74 61 72 2e 67 7a 0a 09 09 62 2e 20 24  19.tar.gz...b. $
1ce0: 20 54 43 4c 4b 49 54 5f 53 44 4b 5f 44 49 52 3d   TCLKIT_SDK_DIR=
1cf0: 22 24 28 70 77 64 29 2f 6c 69 62 74 63 6c 6b 69  "$(pwd)/libtclki
1d00: 74 2d 73 64 6b 2d 38 2e 34 2e 31 39 22 0a 09 09  t-sdk-8.4.19"...
1d10: 63 2e 20 24 20 65 78 70 6f 72 74 20 54 43 4c 4b  c. $ export TCLK
1d20: 49 54 5f 53 44 4b 5f 44 49 52 0a 09 09 64 2e 20  IT_SDK_DIR...d. 
1d30: 24 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d  $ ./configure --
1d40: 77 69 74 68 2d 74 63 6c 3d 22 24 7b 54 43 4c 4b  with-tcl="${TCLK
1d50: 49 54 5f 53 44 4b 5f 44 49 52 7d 2f 6c 69 62 22  IT_SDK_DIR}/lib"
1d60: 0a 09 09 65 2e 20 24 20 6d 61 6b 65 0a 0a 2d 2d  ...e. $ make..--
1d70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d80: 2d 0a 4d 65 74 68 6f 64 20 6f 66 20 4f 70 65 72  -.Method of Oper
1d90: 61 74 69 6f 6e 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ation.----------
1da0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 53 75 6d 6d 61 72  ---------.Summar
1db0: 79 3a 0a 09 31 2e 20 22 6b 69 74 63 72 65 61 74  y:..1. "kitcreat
1dc0: 6f 72 22 20 63 61 6c 6c 73 20 2a 2f 62 75 69 6c  or" calls */buil
1dd0: 64 2e 73 68 0a 09 32 2e 20 2a 2f 62 75 69 6c 64  d.sh..2. */build
1de0: 2e 73 68 20 64 6f 77 6e 6c 6f 61 64 73 20 61 6e  .sh downloads an
1df0: 64 20 63 6f 6d 70 69 6c 65 73 20 61 70 70 72 6f  d compiles appro
1e00: 70 72 69 61 74 65 20 73 6f 66 74 77 61 72 65 0a  priate software.
1e10: 09 33 2e 20 2a 2f 62 75 69 6c 64 2e 73 68 20 69  .3. */build.sh i
1e20: 6e 73 74 61 6c 6c 73 20 73 6f 66 74 77 61 72 65  nstalls software
1e30: 20 69 6e 74 6f 20 22 69 6e 73 74 22 20 28 72 75   into "inst" (ru
1e40: 6e 2d 74 69 6d 65 20 2b 20 63 6f 6d 70 69 6c 65  n-time + compile
1e50: 2d 74 69 6d 65 29 0a 09 34 2e 20 2a 2f 62 75 69  -time)..4. */bui
1e60: 6c 64 2e 73 68 20 69 6e 73 74 61 6c 6c 73 20 72  ld.sh installs r
1e70: 75 6e 2d 74 69 6d 65 20 73 6f 66 74 77 61 72 65  un-time software
1e80: 20 69 6e 74 6f 20 22 6f 75 74 22 2c 20 74 68 69   into "out", thi
1e90: 73 20 77 69 6c 6c 20 62 65 0a 09 20 20 20 69 6e  s will be..   in
1ea0: 63 6c 75 64 65 64 20 69 6e 20 74 68 65 20 54 63  cluded in the Tc
1eb0: 6c 6b 69 74 20 61 73 20 69 66 20 69 74 20 77 65  lkit as if it we
1ec0: 72 65 20 74 68 65 20 72 6f 6f 74 20 64 69 72 65  re the root dire
1ed0: 63 74 6f 72 79 20 6f 66 20 74 68 65 0a 09 20 20  ctory of the..  
1ee0: 20 54 63 6c 6b 69 74 20 28 63 6f 6d 62 69 6e 65   Tclkit (combine
1ef0: 64 20 77 69 74 68 20 6f 74 68 65 72 20 22 6f 75  d with other "ou
1f00: 74 22 20 64 69 72 65 63 74 6f 72 69 65 73 29 0a  t" directories).
1f10: 09 35 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e  .5. kitsh/build.
1f20: 73 68 20 63 6f 6d 70 69 6c 65 73 20 61 20 22 6d  sh compiles a "m
1f30: 61 69 6e 22 20 66 75 6e 63 74 69 6f 6e 20 61 6e  ain" function an
1f40: 64 20 6c 69 6e 6b 73 20 61 6c 6c 20 74 68 65 20  d links all the 
1f50: 62 75 69 6c 74 0a 09 20 20 20 6c 69 62 72 61 72  built..   librar
1f60: 69 65 73 20 74 6f 67 65 74 68 65 72 20 69 6e 74  ies together int
1f70: 6f 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 0a  o an executable.
1f80: 09 36 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e  .6. kitsh/build.
1f90: 73 68 20 63 6f 6d 62 69 6e 65 73 20 61 6c 6c 20  sh combines all 
1fa0: 74 68 65 20 22 6f 75 74 22 20 64 69 72 65 63 74  the "out" direct
1fb0: 6f 72 69 65 73 20 69 6e 74 6f 20 6f 6e 65 0a 09  ories into one..
1fc0: 37 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e 73  7. kitsh/build.s
1fd0: 68 20 63 72 65 61 74 65 73 20 61 20 4d 65 74 61  h creates a Meta
1fe0: 6b 69 74 20 6f 72 20 5a 69 70 20 64 61 74 61 62  kit or Zip datab
1ff0: 61 73 65 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d  ase from the com
2000: 62 69 6e 65 64 0a 09 20 20 20 64 69 72 65 63 74  bined..   direct
2010: 6f 72 69 65 73 20 61 6e 64 20 61 70 70 65 6e 64  ories and append
2020: 73 20 74 68 61 74 20 74 6f 20 74 68 65 20 63 6f  s that to the co
2030: 6d 70 69 6c 65 64 20 65 78 65 63 75 74 61 62 6c  mpiled executabl
2040: 65 20 75 73 69 6e 67 3a 0a 09 09 61 2e 20 41 20  e using:...a. A 
2050: 54 63 6c 6b 69 74 20 66 6f 75 6e 64 20 69 6e 20  Tclkit found in 
2060: 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  the environment 
2070: 76 61 72 69 61 62 6c 65 20 22 54 43 4c 4b 49 54  variable "TCLKIT
2080: 22 20 28 74 63 6c 6b 69 74 0a 09 09 20 20 20 69  " (tclkit...   i
2090: 66 20 75 6e 73 65 74 29 20 69 66 20 69 74 20 69  f unset) if it i
20a0: 73 20 66 75 6e 63 74 69 6f 6e 61 6c 3b 20 6f 72  s functional; or
20b0: 0a 09 09 62 2e 20 54 68 65 20 62 75 69 6c 74 20  ...b. The built 
20c0: 6b 69 74 20 69 74 73 65 6c 66 20 28 64 6f 65 73  kit itself (does
20d0: 20 6e 6f 74 20 77 6f 72 6b 20 66 6f 72 20 63 72   not work for cr
20e0: 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 29 0a 0a  oss-compiling)..
20f0: 44 65 74 61 69 6c 73 3a 0a 09 54 68 65 20 67 65  Details:..The ge
2100: 6e 65 72 61 6c 20 6d 65 63 68 61 6e 69 73 6d 20  neral mechanism 
2110: 74 68 61 74 20 65 6e 61 62 6c 65 73 20 61 20 54  that enables a T
2120: 63 6c 6b 69 74 20 74 6f 20 6f 70 65 72 61 74 65  clkit to operate
2130: 20 69 73 20 61 20 73 6d 61 6c 6c 20 54 63 6c 0a   is a small Tcl.
2140: 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 72  initialization r
2150: 6f 75 74 69 6e 65 20 6c 69 6e 6b 65 64 20 73 74  outine linked st
2160: 61 74 69 63 61 6c 6c 79 20 74 6f 20 74 68 65 20  atically to the 
2170: 63 6f 72 65 20 6c 69 62 72 61 72 69 65 73 20 6e  core libraries n
2180: 65 65 64 65 64 20 74 6f 0a 6f 70 65 72 61 74 65  eeded to.operate
2190: 20 61 20 54 63 6c 20 69 6e 74 65 72 70 72 65 74   a Tcl interpret
21a0: 65 72 2c 20 74 68 65 20 54 63 6c 20 56 46 53 20  er, the Tcl VFS 
21b0: 4c 61 79 65 72 2c 20 61 6e 64 20 61 20 64 61 74  Layer, and a dat
21c0: 61 62 61 73 65 2d 62 61 63 6b 65 64 20 28 4d 65  abase-backed (Me
21d0: 74 61 6b 69 74 29 0a 56 69 72 74 75 61 6c 20 46  takit).Virtual F
21e0: 69 6c 65 20 53 79 73 74 65 6d 20 74 68 61 74 20  ile System that 
21f0: 69 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74  is appended to t
2200: 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 65 78  he end of the ex
2210: 65 63 75 74 61 62 6c 65 2e 0a 0a 54 68 69 73 20  ecutable...This 
2220: 70 72 6f 6a 65 63 74 20 62 72 69 6e 67 73 20 74  project brings t
2230: 6f 67 65 74 68 65 72 20 61 6c 6c 20 6f 66 20 74  ogether all of t
2240: 68 65 20 72 65 71 75 69 72 65 64 20 70 69 65 63  he required piec
2250: 65 73 2c 20 70 6c 75 73 20 73 6f 6d 65 20 61 64  es, plus some ad
2260: 64 69 74 69 6f 6e 61 6c 0a 70 69 65 63 65 73 20  ditional.pieces 
2270: 74 68 61 74 20 77 65 72 65 20 66 6f 75 6e 64 20  that were found 
2280: 69 6e 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20  in the original 
2290: 54 63 6c 6b 69 74 3a 0a 09 31 2e 20 54 6b 20 28  Tclkit:..1. Tk (
22a0: 64 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b  dynamically link
22b0: 65 64 29 0a 09 32 2e 20 49 74 63 6c 20 28 64 79  ed)..2. Itcl (dy
22c0: 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64  namically linked
22d0: 29 0a 0a 54 68 65 20 73 6f 75 72 63 65 20 63 6f  )..The source co
22e0: 64 65 20 66 6f 72 20 74 68 65 73 65 20 70 69 65  de for these pie
22f0: 63 65 73 20 61 72 65 20 64 6f 77 6e 6c 6f 61 64  ces are download
2300: 65 64 2c 20 63 6f 6d 70 69 6c 65 64 2c 20 61 6e  ed, compiled, an
2310: 64 20 6c 69 6e 6b 65 64 2c 20 61 6e 64 20 74 68  d linked, and th
2320: 65 0a 64 61 74 61 62 61 73 65 20 63 6f 6e 74 61  e.database conta
2330: 69 6e 69 6e 67 20 74 68 65 20 61 70 70 72 6f 70  ining the approp
2340: 72 69 61 74 65 20 66 69 6c 65 73 79 73 74 65 6d  riate filesystem
2350: 20 64 61 74 61 20 69 73 20 63 72 65 61 74 65 64   data is created
2360: 2e 20 20 57 68 61 74 20 73 65 74 73 0a 74 68 69  .  What sets.thi
2370: 73 20 70 72 6f 6a 65 63 74 20 61 70 61 72 74 20  s project apart 
2380: 66 72 6f 6d 20 6f 74 68 65 72 20 73 69 6d 69 6c  from other simil
2390: 61 72 20 70 72 6f 6a 65 63 74 73 20 69 73 20 74  ar projects is t
23a0: 68 61 74 3a 0a 09 31 2e 20 49 74 20 61 74 74 65  hat:..1. It atte
23b0: 6d 70 74 73 20 74 6f 20 62 65 20 6d 6f 64 75 6c  mpts to be modul
23c0: 61 72 3b 0a 09 32 2e 20 49 74 20 73 75 70 70 6f  ar;..2. It suppo
23d0: 72 74 73 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c  rts cross-compil
23e0: 69 6e 67 3b 0a 09 33 2e 20 49 74 20 64 6f 77 6e  ing;..3. It down
23f0: 6c 6f 61 64 73 20 74 68 65 20 73 6f 75 72 63 65  loads the source
2400: 20 66 72 6f 6d 20 74 68 65 69 72 20 6f 72 69 67   from their orig
2410: 69 6e 61 6c 20 72 65 70 6f 73 69 74 6f 72 69 65  inal repositorie
2420: 73 3b 0a 09 34 2e 20 49 74 20 61 6c 6c 6f 77 73  s;..4. It allows
2430: 20 79 6f 75 20 74 6f 20 73 70 65 63 69 66 79 20   you to specify 
2440: 61 6e 20 61 72 62 69 74 72 61 72 79 20 76 65 72  an arbitrary ver
2450: 73 69 6f 6e 20 6f 66 20 54 63 6c 20 28 69 6e 63  sion of Tcl (inc
2460: 6c 75 64 69 6e 67 0a 09 20 20 20 43 56 53 29 3b  luding..   CVS);
2470: 20 61 6e 64 0a 09 35 2e 20 49 74 20 75 73 65 73   and..5. It uses
2480: 20 47 4e 55 20 41 75 74 6f 63 6f 6e 66 20 73 63   GNU Autoconf sc
2490: 72 69 70 74 73 20 66 6f 72 20 63 6f 6d 70 69 6c  ripts for compil
24a0: 69 6e 67 20 74 68 65 20 70 61 72 74 20 6f 66 20  ing the part of 
24b0: 74 68 65 20 54 63 6c 6b 69 74 0a 09 20 20 20 74  the Tclkit..   t
24c0: 68 61 74 20 62 72 69 6e 67 73 20 74 68 65 20 77  hat brings the w
24d0: 68 6f 6c 65 20 74 68 69 6e 67 20 74 6f 67 65 74  hole thing toget
24e0: 68 65 72 20 28 74 68 65 20 4b 69 74 73 68 29 0a  her (the Kitsh).
24f0: 0a 54 6f 20 61 63 63 6f 6d 70 6c 69 73 68 20 74  .To accomplish t
2500: 68 65 73 65 20 67 6f 61 6c 73 20 74 68 65 20 66  hese goals the f
2510: 6f 6c 6c 6f 77 69 6e 67 20 6d 65 63 68 61 6e 69  ollowing mechani
2520: 73 6d 73 20 61 72 65 20 69 6e 20 70 6c 61 63 65  sms are in place
2530: 3a 0a 09 31 2e 20 54 68 65 20 74 6f 70 2d 6c 65  :..1. The top-le
2540: 76 65 6c 20 22 6b 69 74 63 72 65 61 74 6f 72 22  vel "kitcreator"
2550: 20 73 63 72 69 70 74 3b 20 61 6e 64 0a 09 32 2e   script; and..2.
2560: 20 50 65 72 2d 70 72 6f 6a 65 63 74 20 73 75 62   Per-project sub
2570: 64 69 72 65 63 74 6f 72 69 65 73 2c 20 65 61 63  directories, eac
2580: 68 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 20 22  h containing a "
2590: 62 75 69 6c 64 2e 73 68 22 20 73 63 72 69 70 74  build.sh" script
25a0: 0a 0a 54 68 65 20 74 6f 70 2d 6c 65 76 65 6c 20  ..The top-level 
25b0: 22 6b 69 74 63 72 65 61 74 6f 72 22 20 73 63 72  "kitcreator" scr
25c0: 69 70 74 20 69 73 20 76 65 72 79 20 73 69 6d 70  ipt is very simp
25d0: 6c 65 2e 20 20 49 74 73 20 6f 6e 6c 79 20 6a 6f  le.  Its only jo
25e0: 62 20 69 73 20 74 6f 0a 69 6e 74 65 72 70 72 65  b is to.interpre
25f0: 74 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 61  t command line a
2600: 72 67 75 6d 65 6e 74 73 2c 20 61 6e 64 20 63 61  rguments, and ca
2610: 6c 6c 20 74 68 65 20 70 65 72 2d 70 72 6f 6a 65  ll the per-proje
2620: 63 74 20 22 62 75 69 6c 64 2e 73 68 22 20 73 63  ct "build.sh" sc
2630: 72 69 70 74 73 2e 0a 46 6f 72 20 74 68 65 20 22  ripts..For the "
2640: 74 63 6c 22 20 70 72 6f 6a 65 63 74 20 69 74 20  tcl" project it 
2650: 61 6c 73 6f 20 66 69 6e 64 73 20 74 68 65 20 61  also finds the a
2660: 70 70 72 6f 70 72 69 61 74 65 20 22 74 63 6c 43  ppropriate "tclC
2670: 6f 6e 66 69 67 2e 73 68 22 20 28 61 6e 64 20 73  onfig.sh" (and s
2680: 74 6f 72 65 73 0a 74 68 69 73 20 70 61 74 68 20  tores.this path 
2690: 69 6e 20 54 43 4c 43 4f 4e 46 49 47 44 49 52 29  in TCLCONFIGDIR)
26a0: 20 74 6f 20 65 6e 61 62 6c 65 20 73 75 62 73 65   to enable subse
26b0: 71 75 65 6e 74 20 62 75 69 6c 64 20 73 63 72 69  quent build scri
26c0: 70 74 73 20 74 6f 20 66 69 6e 64 20 74 68 65 0a  pts to find the.
26d0: 61 70 70 72 6f 70 72 69 61 74 65 20 54 63 6c 20  appropriate Tcl 
26e0: 74 6f 20 6c 69 6e 6b 20 61 67 61 69 6e 73 74 2e  to link against.
26f0: 0a 0a 54 68 65 20 70 65 72 2d 70 72 6f 6a 65 63  ..The per-projec
2700: 74 20 22 62 75 69 6c 64 2e 73 68 22 20 73 63 72  t "build.sh" scr
2710: 69 70 74 73 20 61 72 65 20 65 6e 74 69 72 65 6c  ipts are entirel
2720: 79 20 61 75 74 6f 6e 6f 6d 6f 75 73 2e 20 20 54  y autonomous.  T
2730: 68 65 79 20 61 72 65 0a 72 65 73 70 6f 6e 73 69  hey are.responsi
2740: 62 6c 65 20 66 6f 72 20 64 6f 77 6e 6c 6f 61 64  ble for download
2750: 69 6e 67 20 74 68 65 20 73 6f 75 72 63 65 20 63  ing the source c
2760: 6f 64 65 20 66 6f 72 20 74 68 65 20 61 70 70 72  ode for the appr
2770: 6f 70 72 69 61 74 65 20 76 65 72 73 69 6f 6e 20  opriate version 
2780: 74 68 61 74 0a 77 69 6c 6c 20 63 6f 6d 70 69 6c  that.will compil
2790: 65 20 61 6e 64 20 6c 69 6e 6b 20 61 67 61 69 6e  e and link again
27a0: 73 74 20 74 68 65 20 63 75 72 72 65 6e 74 20 76  st the current v
27b0: 65 72 73 69 6f 6e 20 6f 66 20 54 63 6c 20 28 75  ersion of Tcl (u
27c0: 73 65 72 20 72 65 71 75 65 73 74 65 64 0a 76 65  ser requested.ve
27d0: 72 73 69 6f 6e 20 63 61 6e 20 62 65 20 66 6f 75  rsion can be fou
27e0: 6e 64 20 69 6e 20 22 54 43 4c 56 45 52 53 22 2c  nd in "TCLVERS",
27f0: 20 77 68 69 6c 65 20 74 68 65 20 61 63 74 75 61   while the actua
2800: 6c 20 76 65 72 73 69 6f 6e 20 6d 75 73 74 20 62  l version must b
2810: 65 20 72 65 71 75 65 73 74 65 64 0a 66 72 6f 6d  e requested.from
2820: 20 74 68 65 20 22 74 63 6c 43 6f 6e 66 69 67 2e   the "tclConfig.
2830: 73 68 22 20 73 63 72 69 70 74 29 2c 20 63 6f 6d  sh" script), com
2840: 70 69 6c 69 6e 67 20 69 74 2c 20 69 6e 73 74 61  piling it, insta
2850: 6c 6c 69 6e 67 20 61 20 66 75 6e 63 74 69 6f 6e  lling a function
2860: 61 6c 20 63 6f 70 79 0a 69 6e 74 6f 20 74 68 65  al copy.into the
2870: 20 70 65 72 2d 70 72 6f 6a 65 63 74 20 22 69 6e   per-project "in
2880: 73 74 22 20 64 69 72 65 63 74 6f 72 79 2c 20 61  st" directory, a
2890: 6e 64 20 69 6e 73 74 61 6c 6c 69 6e 67 20 61 6e  nd installing an
28a0: 79 74 68 69 6e 67 20 74 68 61 74 20 6e 65 65 64  ything that need
28b0: 73 20 74 6f 0a 62 65 20 69 6e 20 74 68 65 20 54  s to.be in the T
28c0: 63 6c 6b 69 74 27 73 20 56 46 53 20 72 6f 6f 74  clkit's VFS root
28d0: 20 69 6e 74 6f 20 74 68 65 20 70 65 72 2d 70 72   into the per-pr
28e0: 6f 6a 65 63 74 20 22 6f 75 74 22 20 64 69 72 65  oject "out" dire
28f0: 63 74 6f 72 79 2e 0a 0a 41 6e 79 20 61 64 64 69  ctory...Any addi
2900: 74 69 6f 6e 61 6c 20 70 72 6f 6a 65 63 74 73 20  tional projects 
2910: 63 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 64 20  can be included 
2920: 73 69 6d 70 6c 79 20 62 79 20 63 72 65 61 74 69  simply by creati
2930: 6e 67 20 74 68 65 20 61 70 70 72 6f 70 72 69 61  ng the appropria
2940: 74 65 0a 64 69 72 65 63 74 6f 72 79 20 69 6e 20  te.directory in 
2950: 74 68 65 20 73 61 6d 65 20 64 69 72 65 63 74 6f  the same directo
2960: 72 79 20 61 73 20 74 68 65 20 22 6b 69 74 63 72  ry as the "kitcr
2970: 65 61 74 6f 72 22 20 73 63 72 69 70 74 2c 20 63  eator" script, c
2980: 72 65 61 74 69 6e 67 20 61 0a 22 62 75 69 6c 64  reating a."build
2990: 2e 73 68 22 20 73 63 72 69 70 74 20 69 6e 20 74  .sh" script in t
29a0: 68 61 74 20 64 69 72 65 63 74 6f 72 79 20 74 68  hat directory th
29b0: 61 74 20 66 6f 6c 6c 6f 77 73 20 74 68 65 20 61  at follows the a
29c0: 62 6f 76 65 20 70 72 6f 63 65 64 75 72 65 2c 20  bove procedure, 
29d0: 61 6e 64 20 74 68 65 6e 0a 72 65 66 65 72 65 6e  and then.referen
29e0: 63 69 6e 67 20 74 68 61 74 20 64 69 72 65 63 74  cing that direct
29f0: 6f 72 79 20 69 6e 20 22 4b 49 54 43 52 45 41 54  ory in "KITCREAT
2a00: 4f 52 5f 50 4b 47 53 22 20 66 6f 72 20 74 68 65  OR_PKGS" for the
2a10: 20 22 6b 69 74 63 72 65 61 74 6f 72 22 20 69 6e   "kitcreator" in
2a20: 76 6f 63 61 74 69 6f 6e 2e 0a 49 6e 20 74 68 69  vocation..In thi
2a30: 73 20 77 61 79 20 4b 69 74 43 72 65 61 74 6f 72  s way KitCreator
2a40: 20 69 73 20 22 70 6c 75 67 67 61 62 6c 65 22 2e   is "pluggable".
2a50: 20 20 49 6e 63 6c 75 64 65 64 20 70 61 63 6b 61    Included packa
2a60: 67 65 73 20 6d 61 79 20 62 65 20 65 69 74 68 65  ges may be eithe
2a70: 72 0a 73 74 61 74 69 63 61 6c 6c 79 20 6f 72 20  r.statically or 
2a80: 64 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b  dynamically link
2a90: 65 64 2e 20 20 49 66 20 69 74 20 69 73 20 73 74  ed.  If it is st
2aa0: 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20  atically linked 
2ab0: 74 68 65 6e 20 74 68 65 20 6d 6f 64 75 6c 65 0a  then the module.
2ac0: 6e 61 6d 65 20 6d 75 73 74 20 62 65 20 74 68 65  name must be the
2ad0: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 64 69 72   name of the dir
2ae0: 65 63 74 6f 72 79 20 2d 2d 20 74 68 61 74 20 69  ectory -- that i
2af0: 73 2c 20 69 66 20 74 68 65 20 64 69 72 65 63 74  s, if the direct
2b00: 6f 72 79 20 77 65 72 65 20 22 66 6f 6f 22 2c 0a  ory were "foo",.
2b10: 4b 69 74 43 72 65 61 74 6f 72 20 77 69 6c 6c 20  KitCreator will 
2b20: 65 78 70 65 63 74 20 74 6f 20 69 6e 69 74 69 61  expect to initia
2b30: 6c 69 7a 65 20 74 68 65 20 6d 6f 64 75 6c 65 20  lize the module 
2b40: 73 74 61 74 69 63 61 6c 6c 79 20 75 73 69 6e 67  statically using
2b50: 20 46 6f 6f 5f 49 6e 69 74 28 29 2e 0a 0a 54 68   Foo_Init()...Th
2b60: 65 20 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74  e exception to t
2b70: 68 69 73 20 69 73 20 74 68 65 20 22 6b 69 74 73  his is the "kits
2b80: 68 22 20 70 72 6f 6a 65 63 74 2e 20 20 49 74 20  h" project.  It 
2b90: 69 73 20 74 68 65 20 67 6c 75 65 20 74 68 61 74  is the glue that
2ba0: 20 62 69 6e 64 73 20 61 6c 6c 0a 74 68 65 20 69   binds all.the i
2bb0: 6e 64 69 76 69 64 75 61 6c 20 70 72 6f 6a 65 63  ndividual projec
2bc0: 74 73 20 74 6f 67 65 74 68 65 72 20 69 6e 74 6f  ts together into
2bd0: 20 61 20 73 69 6e 67 6c 65 20 65 78 65 63 75 74   a single execut
2be0: 61 62 6c 65 2e 20 20 49 74 73 20 62 75 69 6c 64  able.  Its build
2bf0: 20 73 63 72 69 70 74 0a 64 6f 65 73 20 6e 6f 74   script.does not
2c00: 20 63 72 65 61 74 65 20 61 6e 20 22 69 6e 73 74   create an "inst
2c10: 22 20 6f 72 20 61 6e 20 22 6f 75 74 22 20 64 69  " or an "out" di
2c20: 72 65 63 74 6f 72 79 20 62 65 63 61 75 73 65 20  rectory because 
2c30: 69 74 20 69 73 20 6e 6f 74 20 61 20 6c 69 62 72  it is not a libr
2c40: 61 72 79 2e 0a 49 6e 73 74 65 61 64 2c 20 69 74  ary..Instead, it
2c50: 20 63 6f 6c 6c 65 63 74 73 20 61 6c 6c 20 74 68   collects all th
2c60: 65 20 6f 74 68 65 72 20 70 72 6f 6a 65 63 74 27  e other project'
2c70: 73 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f 72  s "out" director
2c80: 69 65 73 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c  ies into a singl
2c90: 65 0a 64 69 72 65 63 74 6f 72 79 20 28 73 74 61  e.directory (sta
2ca0: 72 70 61 63 6b 2e 76 66 73 29 2c 20 61 73 20 77  rpack.vfs), as w
2cb0: 65 6c 6c 20 61 20 73 74 61 74 69 63 20 66 69 6c  ell a static fil
2cc0: 65 20 28 62 6f 6f 74 2e 74 63 6c 29 2e 20 49 74  e (boot.tcl). It
2cd0: 20 74 68 65 6e 20 63 6f 6d 70 69 6c 65 73 0a 74   then compiles.t
2ce0: 68 65 20 73 6f 75 72 63 65 20 63 6f 64 65 2c 20  he source code, 
2cf0: 61 6e 64 20 74 68 65 6e 20 69 6e 73 74 61 6c 6c  and then install
2d00: 73 20 74 68 65 20 56 46 53 20 6f 6e 74 6f 20 74  s the VFS onto t
2d10: 68 65 20 72 65 73 75 6c 74 69 6e 67 20 65 78 65  he resulting exe
2d20: 63 75 74 61 62 6c 65 2e 0a 54 68 65 20 56 46 53  cutable..The VFS
2d30: 20 69 73 20 63 72 65 61 74 65 64 20 62 79 20 74   is created by t
2d40: 68 65 20 22 69 6e 73 74 61 6c 6c 76 66 73 2e 74  he "installvfs.t
2d50: 63 6c 22 20 73 63 72 69 70 74 20 66 6f 72 20 4b  cl" script for K
2d60: 69 74 73 68 2e 20 20 46 6f 72 20 4b 69 74 44 4c  itsh.  For KitDL
2d70: 4c 20 74 68 65 0a 56 46 53 20 69 73 20 63 72 65  L the.VFS is cre
2d80: 61 74 65 64 20 62 79 20 22 64 69 72 32 63 2e 74  ated by "dir2c.t
2d90: 63 6c 22 2e 0a 0a 49 66 20 74 68 65 20 22 6d 6b  cl"...If the "mk
2da0: 34 74 63 6c 22 20 70 72 6f 6a 65 63 74 20 66 61  4tcl" project fa
2db0: 69 6c 73 20 74 6f 20 62 75 69 6c 64 20 28 6f 72  ils to build (or
2dc0: 20 69 73 20 6e 6f 74 20 72 65 71 75 65 73 74 65   is not requeste
2dd0: 64 20 74 6f 20 62 65 20 62 75 69 6c 74 29 2c 0a  d to be built),.
2de0: 74 68 65 20 72 65 73 74 20 6f 66 20 74 68 65 20  the rest of the 
2df0: 70 72 6f 6a 65 63 74 20 77 69 6c 6c 20 62 65 20  project will be 
2e00: 62 75 69 6c 74 20 75 73 69 6e 67 20 7a 69 70 20  built using zip 
2e10: 66 69 6c 65 73 20 69 6e 73 74 65 61 64 20 6f 66  files instead of
2e20: 20 4d 65 74 61 6b 69 74 0a 64 61 74 61 62 61 73   Metakit.databas
2e30: 65 73 2e 0a 0a 54 6f 20 63 72 65 61 74 65 20 74  es...To create t
2e40: 68 65 20 73 74 6f 72 61 67 65 20 64 61 74 61 62  he storage datab
2e50: 61 73 65 2c 20 6f 6e 65 20 6f 66 20 74 77 6f 20  ase, one of two 
2e60: 54 63 6c 6b 69 74 73 20 69 73 20 75 73 65 64 20  Tclkits is used 
2e70: 28 74 72 69 65 64 20 69 6e 20 74 68 69 73 0a 6f  (tried in this.o
2e80: 72 64 65 72 29 3a 0a 09 31 2e 20 54 68 65 20 54  rder):..1. The T
2e90: 63 6c 6b 69 74 20 73 70 65 63 69 66 69 65 64 20  clkit specified 
2ea0: 62 79 20 74 68 65 20 54 43 4c 4b 49 54 20 65 6e  by the TCLKIT en
2eb0: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62  vironment variab
2ec0: 6c 65 20 28 6f 72 0a 09 20 20 20 22 74 63 6c 6b  le (or..   "tclk
2ed0: 69 74 22 20 69 66 20 74 68 61 74 20 76 61 72 69  it" if that vari
2ee0: 61 62 6c 65 20 69 73 20 6e 6f 74 20 73 65 74 29  able is not set)
2ef0: 20 69 66 20 69 74 20 69 73 20 66 75 6e 63 74 69   if it is functi
2f00: 6f 6e 61 6c 3b 20 6f 72 0a 09 32 2e 20 54 68 65  onal; or..2. The
2f10: 20 62 75 69 6c 74 20 54 63 6c 6b 69 74 20 69 74   built Tclkit it
2f20: 73 65 6c 66 0a 0a 54 68 65 20 73 65 63 6f 6e 64  self..The second
2f30: 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 6e 6f 74   method will not
2f40: 20 77 6f 72 6b 20 69 66 20 74 68 65 20 62 75 69   work if the bui
2f50: 6c 74 20 54 63 6c 6b 69 74 20 69 73 20 6e 6f 74  lt Tclkit is not
2f60: 20 65 78 65 63 75 74 61 62 6c 65 20 6f 6e 20 74   executable on t
2f70: 68 65 0a 63 75 72 72 65 6e 74 20 70 6c 61 74 66  he.current platf
2f80: 6f 72 6d 20 28 69 2e 65 2e 2c 20 69 6e 20 74 68  orm (i.e., in th
2f90: 65 20 63 61 73 65 20 6f 66 20 63 72 6f 73 73 2d  e case of cross-
2fa0: 63 6f 6d 70 69 6c 61 74 69 6f 6e 29 20 61 6e 64  compilation) and
2fb0: 20 73 6f 20 69 74 20 6d 61 79 20 62 65 0a 6e 65   so it may be.ne
2fc0: 63 65 73 73 61 72 79 20 74 6f 20 62 6f 6f 74 73  cessary to boots
2fd0: 74 72 61 70 20 61 20 72 75 6e 6e 61 62 6c 65 20  trap a runnable 
2fe0: 54 63 6c 6b 69 74 20 66 69 72 73 74 2e 0a 0a 4b  Tclkit first...K
2ff0: 69 74 44 4c 4c 20 6d 6f 75 6e 74 73 20 74 68 65  itDLL mounts the
3000: 20 56 46 53 20 66 6f 72 20 65 76 65 72 79 20 69   VFS for every i
3010: 6e 74 65 72 70 72 65 74 65 72 20 74 68 61 74 20  nterpreter that 
3020: 63 61 6c 6c 73 20 54 63 6c 5f 49 6e 69 74 28 29  calls Tcl_Init()
3030: 2e 20 20 54 68 65 20 73 79 73 74 65 6d 0a 56 46  .  The system.VF
3040: 53 20 74 68 61 74 20 69 73 20 63 72 65 61 74 65  S that is create
3050: 64 20 61 74 20 62 75 69 6c 64 20 74 69 6d 65 20  d at build time 
3060: 69 73 20 6d 6f 75 6e 74 65 64 20 61 74 20 2f 2e  is mounted at /.
3070: 4b 49 54 44 4c 4c 5f 54 43 4c 2e 20 20 41 64 64  KITDLL_TCL.  Add
3080: 69 74 69 6f 6e 61 6c 6c 79 2c 0a 69 66 20 74 68  itionally,.if th
3090: 65 72 65 20 69 73 20 61 20 5a 49 50 20 66 69 6c  ere is a ZIP fil
30a0: 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68  e appended to th
30b0: 65 20 44 4c 4c 20 69 74 20 77 69 6c 6c 20 62 65  e DLL it will be
30c0: 20 6d 6f 75 6e 74 65 64 20 61 74 20 2f 2e 4b 49   mounted at /.KI
30d0: 54 44 4c 4c 5f 55 53 45 52 0a 61 6e 64 20 69 66  TDLL_USER.and if
30e0: 20 74 68 65 72 65 20 69 73 20 61 20 5a 49 50 20   there is a ZIP 
30f0: 66 69 6c 65 20 61 70 70 65 6e 64 65 64 20 74 6f  file appended to
3100: 20 74 68 65 20 65 78 65 63 75 74 61 62 6c 65 20   the executable 
3110: 69 74 20 77 69 6c 6c 20 62 65 20 6d 6f 75 6e 74  it will be mount
3120: 65 64 20 61 74 0a 2f 2e 4b 49 54 44 4c 4c 5f 41  ed at./.KITDLL_A
3130: 50 50 2e 20 20 41 6c 6c 20 56 46 53 65 73 20 74  PP.  All VFSes t
3140: 68 61 74 20 61 72 65 20 6d 6f 75 6e 74 65 64 20  hat are mounted 
3150: 68 61 76 65 20 74 68 65 20 22 6c 69 62 22 20 73  have the "lib" s
3160: 75 62 2d 64 69 72 65 63 74 6f 72 79 20 61 70 70  ub-directory app
3170: 65 6e 64 65 64 0a 74 6f 20 74 68 65 20 69 6e 74  ended.to the int
3180: 65 72 70 72 65 74 65 72 73 20 22 61 75 74 6f 5f  erpreters "auto_
3190: 70 61 74 68 22 20 76 61 72 69 61 62 6c 65 2e 0a  path" variable..