Hex Artifact Content

Artifact b457bfcb2779685ccf88dd314a5fe74e57fee787:


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 09 31 31 2e 20 4b 49 54 43 52 45 41 54  y...11. KITCREAT
1400: 4f 52 5f 53 54 41 54 49 43 5f 4b 49 54 44 4c 4c  OR_STATIC_KITDLL
1410: 0a 09 09 53 65 74 20 74 68 69 73 20 76 61 72 69  ...Set this vari
1420: 61 62 6c 65 20 74 6f 20 74 68 65 20 76 61 6c 75  able to the valu
1430: 65 20 22 31 22 20 74 6f 20 62 75 69 6c 64 20 61  e "1" to build a
1440: 20 73 74 61 74 69 63 20 4b 69 74 44 4c 4c 2e 0a   static KitDLL..
1450: 09 09 54 68 69 73 20 6f 6e 6c 79 20 68 61 73 20  ..This only has 
1460: 61 6e 20 61 66 66 65 63 74 20 77 68 65 6e 20 4b  an affect when K
1470: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 20 73  ITCREATOR_PKGS s
1480: 70 65 63 69 66 69 65 73 20 74 68 61 74 0a 09 09  pecifies that...
1490: 22 6b 69 74 64 6c 6c 22 20 69 73 20 74 6f 20 62  "kitdll" is to b
14a0: 65 20 62 75 69 6c 74 20 28 65 2e 67 2e 2c 20 4b  e built (e.g., K
14b0: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27  ITCREATOR_PKGS='
14c0: 6b 69 74 64 6c 6c 27 29 0a 0a 0a 43 72 6f 73 73  kitdll')...Cross
14d0: 20 63 6f 6d 70 69 6c 69 6e 67 20 45 6e 76 69 72   compiling Envir
14e0: 6f 6e 6d 65 6e 74 20 56 61 72 69 61 62 6c 65 73  onment Variables
14f0: 3a 0a 0a 09 31 2e 20 43 43 20 20 0a 09 09 43 20  :...1. CC  ...C 
1500: 63 6f 6d 70 69 6c 65 72 20 20 20 65 2e 67 2e 20  compiler   e.g. 
1510: 69 36 38 36 2d 70 63 2d 6d 69 6e 67 77 33 32 2d  i686-pc-mingw32-
1520: 67 63 63 0a 0a 09 32 2e 20 43 58 58 0a 09 09 43  gcc...2. CXX...C
1530: 2b 2b 20 63 6f 6d 70 69 6c 65 72 2e 20 20 52 65  ++ compiler.  Re
1540: 71 75 69 72 65 64 20 69 66 20 79 6f 75 20 77 61  quired if you wa
1550: 6e 74 20 74 6f 20 75 73 65 20 6d 6b 34 74 63 6c  nt to use mk4tcl
1560: 2e 20 65 2e 67 2e 20 69 36 38 36 2d 70 63 2d 6d  . e.g. i686-pc-m
1570: 69 6e 67 77 33 32 2d 67 2b 2b 0a 09 09 49 66 20  ingw32-g++...If 
1580: 6e 6f 74 20 72 65 71 75 69 72 65 64 2c 20 79 6f  not required, yo
1590: 75 20 63 61 6e 20 73 65 74 20 69 74 20 74 6f 20  u can set it to 
15a0: 74 68 65 20 73 74 72 69 6e 67 20 22 66 61 6c 73  the string "fals
15b0: 65 22 0a 0a 09 33 2e 20 41 52 0a 09 09 4c 69 62  e"...3. AR...Lib
15c0: 72 61 72 79 20 63 72 65 61 74 6f 72 20 65 2e 67  rary creator e.g
15d0: 2e 20 69 36 38 36 2d 70 63 2d 6d 69 6e 67 77 33  . i686-pc-mingw3
15e0: 32 2d 61 72 0a 0a 09 34 2e 20 52 41 4e 4c 49 42  2-ar...4. RANLIB
15f0: 0a 09 09 4c 69 62 72 61 72 79 20 70 6f 73 74 20  ...Library post 
1600: 70 72 6f 63 65 73 73 69 6e 67 20 65 78 65 63 75  processing execu
1610: 74 61 62 6c 65 20 65 2e 67 2e 20 69 36 38 36 2d  table e.g. i686-
1620: 70 63 2d 6d 69 6e 67 77 33 32 2d 72 61 6e 6c 69  pc-mingw32-ranli
1630: 62 0a 0a 09 35 2e 20 53 54 52 49 50 0a 09 09 45  b...5. STRIP...E
1640: 78 65 63 75 74 61 62 6c 65 20 6e 61 6d 65 20 74  xecutable name t
1650: 6f 20 73 74 72 69 70 20 62 69 6e 61 72 69 65 73  o strip binaries
1660: 20 65 2e 67 2e 20 69 36 38 36 2d 70 63 2d 6d 69   e.g. i686-pc-mi
1670: 6e 67 77 33 32 2d 73 74 72 69 70 0a 0a 09 36 2e  ngw32-strip...6.
1680: 20 4e 4d 0a 09 09 45 78 65 63 75 74 61 62 6c 65   NM...Executable
1690: 20 75 73 65 64 20 74 6f 20 64 75 6d 70 20 6e 61   used to dump na
16a0: 6d 65 73 20 66 72 6f 6d 20 74 68 65 20 6f 62 6a  mes from the obj
16b0: 65 63 74 73 20 20 65 2e 67 2e 20 69 36 38 36 2d  ects  e.g. i686-
16c0: 70 63 2d 6d 69 6e 67 77 33 32 2d 6e 6d 0a 0a 09  pc-mingw32-nm...
16d0: 37 2e 20 43 43 5f 46 4f 52 5f 42 55 49 4c 44 2c  7. CC_FOR_BUILD,
16e0: 20 48 4f 53 54 5f 43 43 20 0a 09 09 53 65 74 20   HOST_CC ...Set 
16f0: 74 68 69 73 20 74 6f 20 74 68 65 20 6e 61 6d 65  this to the name
1700: 20 6f 66 20 63 6f 6d 70 69 6c 65 72 20 6f 6e 20   of compiler on 
1710: 74 68 65 20 68 6f 73 74 20 6f 6e 20 77 68 69 63  the host on whic
1720: 68 0a 09 09 74 68 65 20 63 72 6f 73 73 20 63 6f  h...the cross co
1730: 6d 70 69 6c 61 74 69 6f 6e 20 69 73 20 62 65 69  mpilation is bei
1740: 6e 67 20 72 75 6e 2e 0a 0a 4f 6e 20 57 69 6e 64  ng run...On Wind
1750: 6f 77 73 20 77 65 20 61 6c 73 6f 20 6e 65 65 64  ows we also need
1760: 20 74 68 69 73 3a 0a 0a 09 31 2e 20 52 43 0a 09   this:...1. RC..
1770: 09 52 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 6c  .Resource compil
1780: 65 72 20 3a 20 65 2e 67 2e 20 69 36 38 36 2d 70  er : e.g. i686-p
1790: 63 2d 6d 69 6e 67 77 33 32 2d 77 69 6e 64 72 65  c-mingw32-windre
17a0: 73 0a 0a 0a 4b 69 74 73 68 20 43 6f 6e 66 69 67  s...Kitsh Config
17b0: 75 72 65 20 4f 70 74 69 6f 6e 73 3a 0a 09 31 2e  ure Options:..1.
17c0: 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74   --enable-kit-st
17d0: 6f 72 61 67 65 3d 7b 7a 69 70 7c 6d 6b 34 7c 63  orage={zip|mk4|c
17e0: 76 66 73 7c 61 75 74 6f 7d 0a 09 09 53 70 65 63  vfs|auto}...Spec
17f0: 69 66 79 20 77 68 69 63 68 20 74 79 70 65 20 6f  ify which type o
1800: 66 20 73 74 6f 72 61 67 65 20 74 6f 20 75 73 65  f storage to use
1810: 20 77 69 74 68 20 74 68 65 20 54 63 6c 6b 69 74   with the Tclkit
1820: 2e 20 20 54 68 65 0a 09 09 64 65 66 61 75 6c 74  .  The...default
1830: 20 69 73 20 74 6f 20 61 75 74 6f 2d 64 65 74 65   is to auto-dete
1840: 63 74 2e 20 20 41 75 74 6f 2d 64 65 74 65 63 74  ct.  Auto-detect
1850: 69 6f 6e 20 75 73 65 73 20 4d 6b 34 20 69 66 0a  ion uses Mk4 if.
1860: 09 09 61 76 61 69 6c 61 62 6c 65 20 61 6e 64 20  ..available and 
1870: 62 75 69 6c 74 20 73 74 61 74 69 63 61 6c 6c 79  built statically
1880: 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 66  , otherwise it f
1890: 61 6c 6c 73 20 62 61 63 6b 20 74 6f 20 5a 69 70  alls back to Zip
18a0: 2e 0a 09 32 2e 20 2d 2d 77 69 74 68 2d 6f 62 73  ...2. --with-obs
18b0: 66 75 63 61 74 65 64 2d 63 76 66 73 0a 09 09 53  fucated-cvfs...S
18c0: 70 65 63 69 66 79 20 74 68 61 74 20 43 56 46 53  pecify that CVFS
18d0: 20 73 68 6f 75 6c 64 20 62 65 20 6f 62 73 66 75   should be obsfu
18e0: 63 61 74 65 64 2e 20 20 54 68 65 20 63 6f 6e 74  cated.  The cont
18f0: 65 6e 74 73 20 6f 66 20 74 68 65 0a 09 09 43 56  ents of the...CV
1900: 46 53 20 61 72 65 20 65 6e 63 72 79 70 74 65 64  FS are encrypted
1910: 20 6f 6e 20 64 69 73 6b 20 61 6e 64 20 74 68 65   on disk and the
1920: 20 65 6e 63 72 79 70 74 69 6f 6e 20 6b 65 79 20   encryption key 
1930: 69 73 20 69 6e 63 6c 75 64 65 64 0a 09 09 69 6e  is included...in
1940: 20 74 68 65 20 65 78 65 63 75 74 61 62 6c 65 2e   the executable.
1950: 20 20 46 69 6c 65 73 20 61 72 65 20 74 68 65 6e    Files are then
1960: 20 74 72 61 6e 73 70 61 72 65 6e 74 6c 79 20 64   transparently d
1970: 65 63 72 79 70 74 65 64 20 6f 6e 0a 09 09 61 63  ecrypted on...ac
1980: 63 65 73 73 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d  cess...---------
1990: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 55 73 69 6e  -----------.Usin
19a0: 67 20 74 68 65 20 4b 69 74 44 4c 4c 20 53 44 4b  g the KitDLL SDK
19b0: 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .---------------
19c0: 2d 2d 2d 2d 2d 0a 57 68 65 6e 20 79 6f 75 20 62  -----.When you b
19d0: 75 69 6c 64 20 61 20 4b 69 74 44 4c 4c 2c 20 61  uild a KitDLL, a
19e0: 20 22 6c 69 62 74 63 6c 6b 69 74 2d 73 64 6b 2d   "libtclkit-sdk-
19f0: 3c 74 63 6c 76 65 72 73 3e 2e 74 61 72 2e 67 7a  <tclvers>.tar.gz
1a00: 22 20 74 61 72 62 61 6c 6c 20 69 73 20 61 6c 73  " tarball is als
1a10: 6f 0a 70 72 6f 64 75 63 65 64 2e 20 20 54 68 69  o.produced.  Thi
1a20: 73 20 74 61 72 62 61 6c 6c 20 63 6f 6e 74 61 69  s tarball contai
1a30: 6e 73 20 74 68 65 20 54 63 6c 20 28 61 6e 64 20  ns the Tcl (and 
1a40: 54 6b 2c 20 69 66 20 63 6f 6d 70 69 6c 65 64 29  Tk, if compiled)
1a50: 20 73 74 75 62 73 20 6c 69 62 72 61 72 69 65 73   stubs libraries
1a60: 2c 0a 61 6e 64 20 54 63 6c 20 28 61 6e 64 20 54  ,.and Tcl (and T
1a70: 6b 2c 20 69 66 20 63 6f 6d 70 69 6c 65 64 29 20  k, if compiled) 
1a80: 68 65 61 64 65 72 20 66 69 6c 65 73 20 6e 65 65  header files nee
1a90: 64 65 64 20 74 6f 20 63 6f 6d 70 69 6c 65 20 61  ded to compile a
1aa0: 6e 64 20 6c 69 6e 6b 20 74 68 69 6e 67 73 0a 61  nd link things.a
1ab0: 67 61 69 6e 73 74 20 54 63 6c 20 28 61 6e 64 20  gainst Tcl (and 
1ac0: 54 6b 29 2e 20 20 49 74 20 61 6c 73 6f 20 69 6e  Tk).  It also in
1ad0: 63 6c 75 64 65 73 20 22 74 63 6c 43 6f 6e 66 69  cludes "tclConfi
1ae0: 67 2e 73 68 22 20 28 61 6e 64 20 22 74 6b 43 6f  g.sh" (and "tkCo
1af0: 6e 66 69 67 2e 73 68 22 2c 20 69 66 0a 54 6b 20  nfig.sh", if.Tk 
1b00: 77 61 73 20 63 6f 6d 70 69 6c 65 64 29 2e 0a 0a  was compiled)...
1b10: 54 68 65 20 70 75 72 70 6f 73 65 20 66 6f 72 20  The purpose for 
1b20: 74 68 69 73 20 74 61 72 62 61 6c 6c 20 69 73 20  this tarball is 
1b30: 74 6f 20 62 65 20 75 73 65 64 20 74 6f 20 62 75  to be used to bu
1b40: 69 6c 64 20 54 63 6c 20 65 78 74 65 6e 73 69 6f  ild Tcl extensio
1b50: 6e 73 20 6f 72 0a 61 70 70 6c 69 63 61 74 69 6f  ns or.applicatio
1b60: 6e 73 20 74 68 61 74 20 72 65 6c 79 20 6f 6e 20  ns that rely on 
1b70: 54 63 6c 2f 54 6b 20 75 73 69 6e 67 20 74 68 65  Tcl/Tk using the
1b80: 20 4b 69 74 44 4c 4c 2e 0a 0a 54 6f 20 75 73 65   KitDLL...To use
1b90: 20 69 74 2c 20 6f 6e 65 20 66 69 72 73 74 20 6d   it, one first m
1ba0: 75 73 74 20 65 78 74 72 61 63 74 20 74 68 65 20  ust extract the 
1bb0: 74 61 72 62 61 6c 6c 2e 20 20 41 66 74 65 72 20  tarball.  After 
1bc0: 74 68 61 74 20 74 68 65 20 65 6e 76 69 72 6f 6e  that the environ
1bd0: 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 20 22 54  ment.variable "T
1be0: 43 4c 4b 49 54 5f 53 44 4b 5f 44 49 52 22 20 6d  CLKIT_SDK_DIR" m
1bf0: 75 73 74 20 62 65 20 73 65 74 20 74 6f 20 74 68  ust be set to th
1c00: 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 61 74  e directory that
1c10: 20 77 61 73 20 63 72 65 61 74 65 64 20 69 6e 0a   was created in.
1c20: 6f 72 64 65 72 20 74 6f 20 6d 61 6b 65 20 6d 6f  order to make mo
1c30: 73 74 20 6f 66 20 74 68 65 20 76 61 72 69 61 62  st of the variab
1c40: 6c 65 73 20 63 6f 6e 74 61 69 6e 20 75 73 65 66  les contain usef
1c50: 75 6c 20 76 61 6c 75 65 73 2e 0a 0a 46 6f 72 20  ul values...For 
1c60: 65 78 61 6d 70 6c 65 2c 20 74 6f 20 62 75 69 6c  example, to buil
1c70: 64 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 75  d an extension u
1c80: 73 69 6e 67 20 74 68 65 20 4b 69 74 44 4c 4c 20  sing the KitDLL 
1c90: 53 44 4b 20 6f 6e 65 20 77 6f 75 6c 64 20 74 79  SDK one would ty
1ca0: 70 69 63 61 6c 6c 79 20 64 6f 0a 73 6f 6d 65 74  pically do.somet
1cb0: 68 69 6e 67 20 6c 69 6b 65 3a 0a 09 31 2e 20 43  hing like:..1. C
1cc0: 6f 6d 70 69 6c 65 20 4b 69 74 44 4c 4c 20 28 6d  ompile KitDLL (m
1cd0: 61 79 20 62 65 20 6f 6d 69 74 74 65 64 20 69 66  ay be omitted if
1ce0: 20 74 68 65 20 4b 69 74 44 4c 4c 20 53 44 4b 20   the KitDLL SDK 
1cf0: 69 73 20 61 6c 72 65 61 64 79 0a 09 20 20 20 61  is already..   a
1d00: 76 61 69 6c 61 62 6c 65 29 0a 09 09 61 2e 20 24  vailable)...a. $
1d10: 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53   KITCREATOR_PKGS
1d20: 3d 27 74 6b 20 69 74 63 6c 20 6b 69 74 64 6c 6c  ='tk itcl kitdll
1d30: 27 0a 09 09 62 2e 20 24 20 65 78 70 6f 72 74 20  '...b. $ export 
1d40: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a  KITCREATOR_PKGS.
1d50: 09 09 63 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61  ..c. $ ./kitcrea
1d60: 74 6f 72 0a 09 32 2e 20 43 6f 6d 70 69 6c 65 20  tor..2. Compile 
1d70: 74 68 65 20 45 78 74 65 6e 73 69 6f 6e 0a 09 09  the Extension...
1d80: 61 2e 20 24 20 74 61 72 20 2d 78 66 20 2f 70 61  a. $ tar -xf /pa
1d90: 74 68 2f 74 6f 2f 6c 69 62 74 63 6c 6b 69 74 2d  th/to/libtclkit-
1da0: 73 64 6b 2d 38 2e 34 2e 31 39 2e 74 61 72 2e 67  sdk-8.4.19.tar.g
1db0: 7a 0a 09 09 62 2e 20 24 20 54 43 4c 4b 49 54 5f  z...b. $ TCLKIT_
1dc0: 53 44 4b 5f 44 49 52 3d 22 24 28 70 77 64 29 2f  SDK_DIR="$(pwd)/
1dd0: 6c 69 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 38 2e  libtclkit-sdk-8.
1de0: 34 2e 31 39 22 0a 09 09 63 2e 20 24 20 65 78 70  4.19"...c. $ exp
1df0: 6f 72 74 20 54 43 4c 4b 49 54 5f 53 44 4b 5f 44  ort TCLKIT_SDK_D
1e00: 49 52 0a 09 09 64 2e 20 24 20 2e 2f 63 6f 6e 66  IR...d. $ ./conf
1e10: 69 67 75 72 65 20 2d 2d 77 69 74 68 2d 74 63 6c  igure --with-tcl
1e20: 3d 22 24 7b 54 43 4c 4b 49 54 5f 53 44 4b 5f 44  ="${TCLKIT_SDK_D
1e30: 49 52 7d 2f 6c 69 62 22 0a 09 09 65 2e 20 24 20  IR}/lib"...e. $ 
1e40: 6d 61 6b 65 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  make..----------
1e50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 4d 65 74 68 6f 64  ---------.Method
1e60: 20 6f 66 20 4f 70 65 72 61 74 69 6f 6e 0a 2d 2d   of Operation.--
1e70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e80: 2d 0a 53 75 6d 6d 61 72 79 3a 0a 09 31 2e 20 22  -.Summary:..1. "
1e90: 6b 69 74 63 72 65 61 74 6f 72 22 20 63 61 6c 6c  kitcreator" call
1ea0: 73 20 2a 2f 62 75 69 6c 64 2e 73 68 0a 09 32 2e  s */build.sh..2.
1eb0: 20 2a 2f 62 75 69 6c 64 2e 73 68 20 64 6f 77 6e   */build.sh down
1ec0: 6c 6f 61 64 73 20 61 6e 64 20 63 6f 6d 70 69 6c  loads and compil
1ed0: 65 73 20 61 70 70 72 6f 70 72 69 61 74 65 20 73  es appropriate s
1ee0: 6f 66 74 77 61 72 65 0a 09 33 2e 20 2a 2f 62 75  oftware..3. */bu
1ef0: 69 6c 64 2e 73 68 20 69 6e 73 74 61 6c 6c 73 20  ild.sh installs 
1f00: 73 6f 66 74 77 61 72 65 20 69 6e 74 6f 20 22 69  software into "i
1f10: 6e 73 74 22 20 28 72 75 6e 2d 74 69 6d 65 20 2b  nst" (run-time +
1f20: 20 63 6f 6d 70 69 6c 65 2d 74 69 6d 65 29 0a 09   compile-time)..
1f30: 34 2e 20 2a 2f 62 75 69 6c 64 2e 73 68 20 69 6e  4. */build.sh in
1f40: 73 74 61 6c 6c 73 20 72 75 6e 2d 74 69 6d 65 20  stalls run-time 
1f50: 73 6f 66 74 77 61 72 65 20 69 6e 74 6f 20 22 6f  software into "o
1f60: 75 74 22 2c 20 74 68 69 73 20 77 69 6c 6c 20 62  ut", this will b
1f70: 65 0a 09 20 20 20 69 6e 63 6c 75 64 65 64 20 69  e..   included i
1f80: 6e 20 74 68 65 20 54 63 6c 6b 69 74 20 61 73 20  n the Tclkit as 
1f90: 69 66 20 69 74 20 77 65 72 65 20 74 68 65 20 72  if it were the r
1fa0: 6f 6f 74 20 64 69 72 65 63 74 6f 72 79 20 6f 66  oot directory of
1fb0: 20 74 68 65 0a 09 20 20 20 54 63 6c 6b 69 74 20   the..   Tclkit 
1fc0: 28 63 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 6f  (combined with o
1fd0: 74 68 65 72 20 22 6f 75 74 22 20 64 69 72 65 63  ther "out" direc
1fe0: 74 6f 72 69 65 73 29 0a 09 35 2e 20 6b 69 74 73  tories)..5. kits
1ff0: 68 2f 62 75 69 6c 64 2e 73 68 20 63 6f 6d 70 69  h/build.sh compi
2000: 6c 65 73 20 61 20 22 6d 61 69 6e 22 20 66 75 6e  les a "main" fun
2010: 63 74 69 6f 6e 20 61 6e 64 20 6c 69 6e 6b 73 20  ction and links 
2020: 61 6c 6c 20 74 68 65 20 62 75 69 6c 74 0a 09 20  all the built.. 
2030: 20 20 6c 69 62 72 61 72 69 65 73 20 74 6f 67 65    libraries toge
2040: 74 68 65 72 20 69 6e 74 6f 20 61 6e 20 65 78 65  ther into an exe
2050: 63 75 74 61 62 6c 65 0a 09 36 2e 20 6b 69 74 73  cutable..6. kits
2060: 68 2f 62 75 69 6c 64 2e 73 68 20 63 6f 6d 62 69  h/build.sh combi
2070: 6e 65 73 20 61 6c 6c 20 74 68 65 20 22 6f 75 74  nes all the "out
2080: 22 20 64 69 72 65 63 74 6f 72 69 65 73 20 69 6e  " directories in
2090: 74 6f 20 6f 6e 65 0a 09 37 2e 20 6b 69 74 73 68  to one..7. kitsh
20a0: 2f 62 75 69 6c 64 2e 73 68 20 63 72 65 61 74 65  /build.sh create
20b0: 73 20 61 20 4d 65 74 61 6b 69 74 20 6f 72 20 5a  s a Metakit or Z
20c0: 69 70 20 64 61 74 61 62 61 73 65 20 66 72 6f 6d  ip database from
20d0: 20 74 68 65 20 63 6f 6d 62 69 6e 65 64 0a 09 20   the combined.. 
20e0: 20 20 64 69 72 65 63 74 6f 72 69 65 73 20 61 6e    directories an
20f0: 64 20 61 70 70 65 6e 64 73 20 74 68 61 74 20 74  d appends that t
2100: 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65 64 20 65  o the compiled e
2110: 78 65 63 75 74 61 62 6c 65 20 75 73 69 6e 67 3a  xecutable using:
2120: 0a 09 09 61 2e 20 41 20 54 63 6c 6b 69 74 20 66  ...a. A Tclkit f
2130: 6f 75 6e 64 20 69 6e 20 74 68 65 20 65 6e 76 69  ound in the envi
2140: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
2150: 20 22 54 43 4c 4b 49 54 22 20 28 74 63 6c 6b 69   "TCLKIT" (tclki
2160: 74 0a 09 09 20 20 20 69 66 20 75 6e 73 65 74 29  t...   if unset)
2170: 20 69 66 20 69 74 20 69 73 20 66 75 6e 63 74 69   if it is functi
2180: 6f 6e 61 6c 3b 20 6f 72 0a 09 09 62 2e 20 54 68  onal; or...b. Th
2190: 65 20 62 75 69 6c 74 20 6b 69 74 20 69 74 73 65  e built kit itse
21a0: 6c 66 20 28 64 6f 65 73 20 6e 6f 74 20 77 6f 72  lf (does not wor
21b0: 6b 20 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70  k for cross-comp
21c0: 69 6c 69 6e 67 29 0a 0a 44 65 74 61 69 6c 73 3a  iling)..Details:
21d0: 0a 09 54 68 65 20 67 65 6e 65 72 61 6c 20 6d 65  ..The general me
21e0: 63 68 61 6e 69 73 6d 20 74 68 61 74 20 65 6e 61  chanism that ena
21f0: 62 6c 65 73 20 61 20 54 63 6c 6b 69 74 20 74 6f  bles a Tclkit to
2200: 20 6f 70 65 72 61 74 65 20 69 73 20 61 20 73 6d   operate is a sm
2210: 61 6c 6c 20 54 63 6c 0a 69 6e 69 74 69 61 6c 69  all Tcl.initiali
2220: 7a 61 74 69 6f 6e 20 72 6f 75 74 69 6e 65 20 6c  zation routine l
2230: 69 6e 6b 65 64 20 73 74 61 74 69 63 61 6c 6c 79  inked statically
2240: 20 74 6f 20 74 68 65 20 63 6f 72 65 20 6c 69 62   to the core lib
2250: 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 74 6f  raries needed to
2260: 0a 6f 70 65 72 61 74 65 20 61 20 54 63 6c 20 69  .operate a Tcl i
2270: 6e 74 65 72 70 72 65 74 65 72 2c 20 74 68 65 20  nterpreter, the 
2280: 54 63 6c 20 56 46 53 20 4c 61 79 65 72 2c 20 61  Tcl VFS Layer, a
2290: 6e 64 20 61 20 64 61 74 61 62 61 73 65 2d 62 61  nd a database-ba
22a0: 63 6b 65 64 20 28 4d 65 74 61 6b 69 74 29 0a 56  cked (Metakit).V
22b0: 69 72 74 75 61 6c 20 46 69 6c 65 20 53 79 73 74  irtual File Syst
22c0: 65 6d 20 74 68 61 74 20 69 73 20 61 70 70 65 6e  em that is appen
22d0: 64 65 64 20 74 6f 20 74 68 65 20 65 6e 64 20 6f  ded to the end o
22e0: 66 20 74 68 65 20 65 78 65 63 75 74 61 62 6c 65  f the executable
22f0: 2e 0a 0a 54 68 69 73 20 70 72 6f 6a 65 63 74 20  ...This project 
2300: 62 72 69 6e 67 73 20 74 6f 67 65 74 68 65 72 20  brings together 
2310: 61 6c 6c 20 6f 66 20 74 68 65 20 72 65 71 75 69  all of the requi
2320: 72 65 64 20 70 69 65 63 65 73 2c 20 70 6c 75 73  red pieces, plus
2330: 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c   some additional
2340: 0a 70 69 65 63 65 73 20 74 68 61 74 20 77 65 72  .pieces that wer
2350: 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 6f  e found in the o
2360: 72 69 67 69 6e 61 6c 20 54 63 6c 6b 69 74 3a 0a  riginal Tclkit:.
2370: 09 31 2e 20 54 6b 20 28 64 79 6e 61 6d 69 63 61  .1. Tk (dynamica
2380: 6c 6c 79 20 6c 69 6e 6b 65 64 29 0a 09 32 2e 20  lly linked)..2. 
2390: 49 74 63 6c 20 28 64 79 6e 61 6d 69 63 61 6c 6c  Itcl (dynamicall
23a0: 79 20 6c 69 6e 6b 65 64 29 0a 0a 54 68 65 20 73  y linked)..The s
23b0: 6f 75 72 63 65 20 63 6f 64 65 20 66 6f 72 20 74  ource code for t
23c0: 68 65 73 65 20 70 69 65 63 65 73 20 61 72 65 20  hese pieces are 
23d0: 64 6f 77 6e 6c 6f 61 64 65 64 2c 20 63 6f 6d 70  downloaded, comp
23e0: 69 6c 65 64 2c 20 61 6e 64 20 6c 69 6e 6b 65 64  iled, and linked
23f0: 2c 20 61 6e 64 20 74 68 65 0a 64 61 74 61 62 61  , and the.databa
2400: 73 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68  se containing th
2410: 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 66 69  e appropriate fi
2420: 6c 65 73 79 73 74 65 6d 20 64 61 74 61 20 69 73  lesystem data is
2430: 20 63 72 65 61 74 65 64 2e 20 20 57 68 61 74 20   created.  What 
2440: 73 65 74 73 0a 74 68 69 73 20 70 72 6f 6a 65 63  sets.this projec
2450: 74 20 61 70 61 72 74 20 66 72 6f 6d 20 6f 74 68  t apart from oth
2460: 65 72 20 73 69 6d 69 6c 61 72 20 70 72 6f 6a 65  er similar proje
2470: 63 74 73 20 69 73 20 74 68 61 74 3a 0a 09 31 2e  cts is that:..1.
2480: 20 49 74 20 61 74 74 65 6d 70 74 73 20 74 6f 20   It attempts to 
2490: 62 65 20 6d 6f 64 75 6c 61 72 3b 0a 09 32 2e 20  be modular;..2. 
24a0: 49 74 20 73 75 70 70 6f 72 74 73 20 63 72 6f 73  It supports cros
24b0: 73 2d 63 6f 6d 70 69 6c 69 6e 67 3b 0a 09 33 2e  s-compiling;..3.
24c0: 20 49 74 20 64 6f 77 6e 6c 6f 61 64 73 20 74 68   It downloads th
24d0: 65 20 73 6f 75 72 63 65 20 66 72 6f 6d 20 74 68  e source from th
24e0: 65 69 72 20 6f 72 69 67 69 6e 61 6c 20 72 65 70  eir original rep
24f0: 6f 73 69 74 6f 72 69 65 73 3b 0a 09 34 2e 20 49  ositories;..4. I
2500: 74 20 61 6c 6c 6f 77 73 20 79 6f 75 20 74 6f 20  t allows you to 
2510: 73 70 65 63 69 66 79 20 61 6e 20 61 72 62 69 74  specify an arbit
2520: 72 61 72 79 20 76 65 72 73 69 6f 6e 20 6f 66 20  rary version of 
2530: 54 63 6c 20 28 69 6e 63 6c 75 64 69 6e 67 0a 09  Tcl (including..
2540: 20 20 20 43 56 53 29 3b 20 61 6e 64 0a 09 35 2e     CVS); and..5.
2550: 20 49 74 20 75 73 65 73 20 47 4e 55 20 41 75 74   It uses GNU Aut
2560: 6f 63 6f 6e 66 20 73 63 72 69 70 74 73 20 66 6f  oconf scripts fo
2570: 72 20 63 6f 6d 70 69 6c 69 6e 67 20 74 68 65 20  r compiling the 
2580: 70 61 72 74 20 6f 66 20 74 68 65 20 54 63 6c 6b  part of the Tclk
2590: 69 74 0a 09 20 20 20 74 68 61 74 20 62 72 69 6e  it..   that brin
25a0: 67 73 20 74 68 65 20 77 68 6f 6c 65 20 74 68 69  gs the whole thi
25b0: 6e 67 20 74 6f 67 65 74 68 65 72 20 28 74 68 65  ng together (the
25c0: 20 4b 69 74 73 68 29 0a 0a 54 6f 20 61 63 63 6f   Kitsh)..To acco
25d0: 6d 70 6c 69 73 68 20 74 68 65 73 65 20 67 6f 61  mplish these goa
25e0: 6c 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  ls the following
25f0: 20 6d 65 63 68 61 6e 69 73 6d 73 20 61 72 65 20   mechanisms are 
2600: 69 6e 20 70 6c 61 63 65 3a 0a 09 31 2e 20 54 68  in place:..1. Th
2610: 65 20 74 6f 70 2d 6c 65 76 65 6c 20 22 6b 69 74  e top-level "kit
2620: 63 72 65 61 74 6f 72 22 20 73 63 72 69 70 74 3b  creator" script;
2630: 20 61 6e 64 0a 09 32 2e 20 50 65 72 2d 70 72 6f   and..2. Per-pro
2640: 6a 65 63 74 20 73 75 62 64 69 72 65 63 74 6f 72  ject subdirector
2650: 69 65 73 2c 20 65 61 63 68 20 63 6f 6e 74 61 69  ies, each contai
2660: 6e 69 6e 67 20 61 20 22 62 75 69 6c 64 2e 73 68  ning a "build.sh
2670: 22 20 73 63 72 69 70 74 0a 0a 54 68 65 20 74 6f  " script..The to
2680: 70 2d 6c 65 76 65 6c 20 22 6b 69 74 63 72 65 61  p-level "kitcrea
2690: 74 6f 72 22 20 73 63 72 69 70 74 20 69 73 20 76  tor" script is v
26a0: 65 72 79 20 73 69 6d 70 6c 65 2e 20 20 49 74 73  ery simple.  Its
26b0: 20 6f 6e 6c 79 20 6a 6f 62 20 69 73 20 74 6f 0a   only job is to.
26c0: 69 6e 74 65 72 70 72 65 74 20 63 6f 6d 6d 61 6e  interpret comman
26d0: 64 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73  d line arguments
26e0: 2c 20 61 6e 64 20 63 61 6c 6c 20 74 68 65 20 70  , and call the p
26f0: 65 72 2d 70 72 6f 6a 65 63 74 20 22 62 75 69 6c  er-project "buil
2700: 64 2e 73 68 22 20 73 63 72 69 70 74 73 2e 0a 46  d.sh" scripts..F
2710: 6f 72 20 74 68 65 20 22 74 63 6c 22 20 70 72 6f  or the "tcl" pro
2720: 6a 65 63 74 20 69 74 20 61 6c 73 6f 20 66 69 6e  ject it also fin
2730: 64 73 20 74 68 65 20 61 70 70 72 6f 70 72 69 61  ds the appropria
2740: 74 65 20 22 74 63 6c 43 6f 6e 66 69 67 2e 73 68  te "tclConfig.sh
2750: 22 20 28 61 6e 64 20 73 74 6f 72 65 73 0a 74 68  " (and stores.th
2760: 69 73 20 70 61 74 68 20 69 6e 20 54 43 4c 43 4f  is path in TCLCO
2770: 4e 46 49 47 44 49 52 29 20 74 6f 20 65 6e 61 62  NFIGDIR) to enab
2780: 6c 65 20 73 75 62 73 65 71 75 65 6e 74 20 62 75  le subsequent bu
2790: 69 6c 64 20 73 63 72 69 70 74 73 20 74 6f 20 66  ild scripts to f
27a0: 69 6e 64 20 74 68 65 0a 61 70 70 72 6f 70 72 69  ind the.appropri
27b0: 61 74 65 20 54 63 6c 20 74 6f 20 6c 69 6e 6b 20  ate Tcl to link 
27c0: 61 67 61 69 6e 73 74 2e 0a 0a 54 68 65 20 70 65  against...The pe
27d0: 72 2d 70 72 6f 6a 65 63 74 20 22 62 75 69 6c 64  r-project "build
27e0: 2e 73 68 22 20 73 63 72 69 70 74 73 20 61 72 65  .sh" scripts are
27f0: 20 65 6e 74 69 72 65 6c 79 20 61 75 74 6f 6e 6f   entirely autono
2800: 6d 6f 75 73 2e 20 20 54 68 65 79 20 61 72 65 0a  mous.  They are.
2810: 72 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20  responsible for 
2820: 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 74 68 65 20  downloading the 
2830: 73 6f 75 72 63 65 20 63 6f 64 65 20 66 6f 72 20  source code for 
2840: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20  the appropriate 
2850: 76 65 72 73 69 6f 6e 20 74 68 61 74 0a 77 69 6c  version that.wil
2860: 6c 20 63 6f 6d 70 69 6c 65 20 61 6e 64 20 6c 69  l compile and li
2870: 6e 6b 20 61 67 61 69 6e 73 74 20 74 68 65 20 63  nk against the c
2880: 75 72 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f  urrent version o
2890: 66 20 54 63 6c 20 28 75 73 65 72 20 72 65 71 75  f Tcl (user requ
28a0: 65 73 74 65 64 0a 76 65 72 73 69 6f 6e 20 63 61  ested.version ca
28b0: 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 22 54  n be found in "T
28c0: 43 4c 56 45 52 53 22 2c 20 77 68 69 6c 65 20 74  CLVERS", while t
28d0: 68 65 20 61 63 74 75 61 6c 20 76 65 72 73 69 6f  he actual versio
28e0: 6e 20 6d 75 73 74 20 62 65 20 72 65 71 75 65 73  n must be reques
28f0: 74 65 64 0a 66 72 6f 6d 20 74 68 65 20 22 74 63  ted.from the "tc
2900: 6c 43 6f 6e 66 69 67 2e 73 68 22 20 73 63 72 69  lConfig.sh" scri
2910: 70 74 29 2c 20 63 6f 6d 70 69 6c 69 6e 67 20 69  pt), compiling i
2920: 74 2c 20 69 6e 73 74 61 6c 6c 69 6e 67 20 61 20  t, installing a 
2930: 66 75 6e 63 74 69 6f 6e 61 6c 20 63 6f 70 79 0a  functional copy.
2940: 69 6e 74 6f 20 74 68 65 20 70 65 72 2d 70 72 6f  into the per-pro
2950: 6a 65 63 74 20 22 69 6e 73 74 22 20 64 69 72 65  ject "inst" dire
2960: 63 74 6f 72 79 2c 20 61 6e 64 20 69 6e 73 74 61  ctory, and insta
2970: 6c 6c 69 6e 67 20 61 6e 79 74 68 69 6e 67 20 74  lling anything t
2980: 68 61 74 20 6e 65 65 64 73 20 74 6f 0a 62 65 20  hat needs to.be 
2990: 69 6e 20 74 68 65 20 54 63 6c 6b 69 74 27 73 20  in the Tclkit's 
29a0: 56 46 53 20 72 6f 6f 74 20 69 6e 74 6f 20 74 68  VFS root into th
29b0: 65 20 70 65 72 2d 70 72 6f 6a 65 63 74 20 22 6f  e per-project "o
29c0: 75 74 22 20 64 69 72 65 63 74 6f 72 79 2e 0a 0a  ut" directory...
29d0: 41 6e 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 70  Any additional p
29e0: 72 6f 6a 65 63 74 73 20 63 61 6e 20 62 65 20 69  rojects can be i
29f0: 6e 63 6c 75 64 65 64 20 73 69 6d 70 6c 79 20 62  ncluded simply b
2a00: 79 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 61  y creating the a
2a10: 70 70 72 6f 70 72 69 61 74 65 0a 64 69 72 65 63  ppropriate.direc
2a20: 74 6f 72 79 20 69 6e 20 74 68 65 20 73 61 6d 65  tory in the same
2a30: 20 64 69 72 65 63 74 6f 72 79 20 61 73 20 74 68   directory as th
2a40: 65 20 22 6b 69 74 63 72 65 61 74 6f 72 22 20 73  e "kitcreator" s
2a50: 63 72 69 70 74 2c 20 63 72 65 61 74 69 6e 67 20  cript, creating 
2a60: 61 0a 22 62 75 69 6c 64 2e 73 68 22 20 73 63 72  a."build.sh" scr
2a70: 69 70 74 20 69 6e 20 74 68 61 74 20 64 69 72 65  ipt in that dire
2a80: 63 74 6f 72 79 20 74 68 61 74 20 66 6f 6c 6c 6f  ctory that follo
2a90: 77 73 20 74 68 65 20 61 62 6f 76 65 20 70 72 6f  ws the above pro
2aa0: 63 65 64 75 72 65 2c 20 61 6e 64 20 74 68 65 6e  cedure, and then
2ab0: 0a 72 65 66 65 72 65 6e 63 69 6e 67 20 74 68 61  .referencing tha
2ac0: 74 20 64 69 72 65 63 74 6f 72 79 20 69 6e 20 22  t directory in "
2ad0: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 22  KITCREATOR_PKGS"
2ae0: 20 66 6f 72 20 74 68 65 20 22 6b 69 74 63 72 65   for the "kitcre
2af0: 61 74 6f 72 22 20 69 6e 76 6f 63 61 74 69 6f 6e  ator" invocation
2b00: 2e 0a 49 6e 20 74 68 69 73 20 77 61 79 20 4b 69  ..In this way Ki
2b10: 74 43 72 65 61 74 6f 72 20 69 73 20 22 70 6c 75  tCreator is "plu
2b20: 67 67 61 62 6c 65 22 2e 20 20 49 6e 63 6c 75 64  ggable".  Includ
2b30: 65 64 20 70 61 63 6b 61 67 65 73 20 6d 61 79 20  ed packages may 
2b40: 62 65 20 65 69 74 68 65 72 0a 73 74 61 74 69 63  be either.static
2b50: 61 6c 6c 79 20 6f 72 20 64 79 6e 61 6d 69 63 61  ally or dynamica
2b60: 6c 6c 79 20 6c 69 6e 6b 65 64 2e 20 20 49 66 20  lly linked.  If 
2b70: 69 74 20 69 73 20 73 74 61 74 69 63 61 6c 6c 79  it is statically
2b80: 20 6c 69 6e 6b 65 64 20 74 68 65 6e 20 74 68 65   linked then the
2b90: 20 6d 6f 64 75 6c 65 0a 6e 61 6d 65 20 6d 75 73   module.name mus
2ba0: 74 20 62 65 20 74 68 65 20 6e 61 6d 65 20 6f 66  t be the name of
2bb0: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 2d   the directory -
2bc0: 2d 20 74 68 61 74 20 69 73 2c 20 69 66 20 74 68  - that is, if th
2bd0: 65 20 64 69 72 65 63 74 6f 72 79 20 77 65 72 65  e directory were
2be0: 20 22 66 6f 6f 22 2c 0a 4b 69 74 43 72 65 61 74   "foo",.KitCreat
2bf0: 6f 72 20 77 69 6c 6c 20 65 78 70 65 63 74 20 74  or will expect t
2c00: 6f 20 69 6e 69 74 69 61 6c 69 7a 65 20 74 68 65  o initialize the
2c10: 20 6d 6f 64 75 6c 65 20 73 74 61 74 69 63 61 6c   module statical
2c20: 6c 79 20 75 73 69 6e 67 20 46 6f 6f 5f 49 6e 69  ly using Foo_Ini
2c30: 74 28 29 2e 0a 0a 54 68 65 20 65 78 63 65 70 74  t()...The except
2c40: 69 6f 6e 20 74 6f 20 74 68 69 73 20 69 73 20 74  ion to this is t
2c50: 68 65 20 22 6b 69 74 73 68 22 20 70 72 6f 6a 65  he "kitsh" proje
2c60: 63 74 2e 20 20 49 74 20 69 73 20 74 68 65 20 67  ct.  It is the g
2c70: 6c 75 65 20 74 68 61 74 20 62 69 6e 64 73 20 61  lue that binds a
2c80: 6c 6c 0a 74 68 65 20 69 6e 64 69 76 69 64 75 61  ll.the individua
2c90: 6c 20 70 72 6f 6a 65 63 74 73 20 74 6f 67 65 74  l projects toget
2ca0: 68 65 72 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c  her into a singl
2cb0: 65 20 65 78 65 63 75 74 61 62 6c 65 2e 20 20 49  e executable.  I
2cc0: 74 73 20 62 75 69 6c 64 20 73 63 72 69 70 74 0a  ts build script.
2cd0: 64 6f 65 73 20 6e 6f 74 20 63 72 65 61 74 65 20  does not create 
2ce0: 61 6e 20 22 69 6e 73 74 22 20 6f 72 20 61 6e 20  an "inst" or an 
2cf0: 22 6f 75 74 22 20 64 69 72 65 63 74 6f 72 79 20  "out" directory 
2d00: 62 65 63 61 75 73 65 20 69 74 20 69 73 20 6e 6f  because it is no
2d10: 74 20 61 20 6c 69 62 72 61 72 79 2e 0a 49 6e 73  t a library..Ins
2d20: 74 65 61 64 2c 20 69 74 20 63 6f 6c 6c 65 63 74  tead, it collect
2d30: 73 20 61 6c 6c 20 74 68 65 20 6f 74 68 65 72 20  s all the other 
2d40: 70 72 6f 6a 65 63 74 27 73 20 22 6f 75 74 22 20  project's "out" 
2d50: 64 69 72 65 63 74 6f 72 69 65 73 20 69 6e 74 6f  directories into
2d60: 20 61 20 73 69 6e 67 6c 65 0a 64 69 72 65 63 74   a single.direct
2d70: 6f 72 79 20 28 73 74 61 72 70 61 63 6b 2e 76 66  ory (starpack.vf
2d80: 73 29 2c 20 61 73 20 77 65 6c 6c 20 61 20 73 74  s), as well a st
2d90: 61 74 69 63 20 66 69 6c 65 20 28 62 6f 6f 74 2e  atic file (boot.
2da0: 74 63 6c 29 2e 20 49 74 20 74 68 65 6e 20 63 6f  tcl). It then co
2db0: 6d 70 69 6c 65 73 0a 74 68 65 20 73 6f 75 72 63  mpiles.the sourc
2dc0: 65 20 63 6f 64 65 2c 20 61 6e 64 20 74 68 65 6e  e code, and then
2dd0: 20 69 6e 73 74 61 6c 6c 73 20 74 68 65 20 56 46   installs the VF
2de0: 53 20 6f 6e 74 6f 20 74 68 65 20 72 65 73 75 6c  S onto the resul
2df0: 74 69 6e 67 20 65 78 65 63 75 74 61 62 6c 65 2e  ting executable.
2e00: 0a 54 68 65 20 56 46 53 20 69 73 20 63 72 65 61  .The VFS is crea
2e10: 74 65 64 20 62 79 20 74 68 65 20 22 69 6e 73 74  ted by the "inst
2e20: 61 6c 6c 76 66 73 2e 74 63 6c 22 20 73 63 72 69  allvfs.tcl" scri
2e30: 70 74 20 66 6f 72 20 4b 69 74 73 68 2e 20 20 46  pt for Kitsh.  F
2e40: 6f 72 20 4b 69 74 44 4c 4c 20 74 68 65 0a 56 46  or KitDLL the.VF
2e50: 53 20 69 73 20 63 72 65 61 74 65 64 20 62 79 20  S is created by 
2e60: 22 64 69 72 32 63 2e 74 63 6c 22 2e 0a 0a 49 66  "dir2c.tcl"...If
2e70: 20 74 68 65 20 22 6d 6b 34 74 63 6c 22 20 70 72   the "mk4tcl" pr
2e80: 6f 6a 65 63 74 20 66 61 69 6c 73 20 74 6f 20 62  oject fails to b
2e90: 75 69 6c 64 20 28 6f 72 20 69 73 20 6e 6f 74 20  uild (or is not 
2ea0: 72 65 71 75 65 73 74 65 64 20 74 6f 20 62 65 20  requested to be 
2eb0: 62 75 69 6c 74 29 2c 0a 74 68 65 20 72 65 73 74  built),.the rest
2ec0: 20 6f 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20   of the project 
2ed0: 77 69 6c 6c 20 62 65 20 62 75 69 6c 74 20 75 73  will be built us
2ee0: 69 6e 67 20 7a 69 70 20 66 69 6c 65 73 20 69 6e  ing zip files in
2ef0: 73 74 65 61 64 20 6f 66 20 4d 65 74 61 6b 69 74  stead of Metakit
2f00: 0a 64 61 74 61 62 61 73 65 73 2e 0a 0a 54 6f 20  .databases...To 
2f10: 63 72 65 61 74 65 20 74 68 65 20 73 74 6f 72 61  create the stora
2f20: 67 65 20 64 61 74 61 62 61 73 65 2c 20 6f 6e 65  ge database, one
2f30: 20 6f 66 20 74 77 6f 20 54 63 6c 6b 69 74 73 20   of two Tclkits 
2f40: 69 73 20 75 73 65 64 20 28 74 72 69 65 64 20 69  is used (tried i
2f50: 6e 20 74 68 69 73 0a 6f 72 64 65 72 29 3a 0a 09  n this.order):..
2f60: 31 2e 20 54 68 65 20 54 63 6c 6b 69 74 20 73 70  1. The Tclkit sp
2f70: 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20 54  ecified by the T
2f80: 43 4c 4b 49 54 20 65 6e 76 69 72 6f 6e 6d 65 6e  CLKIT environmen
2f90: 74 20 76 61 72 69 61 62 6c 65 20 28 6f 72 0a 09  t variable (or..
2fa0: 20 20 20 22 74 63 6c 6b 69 74 22 20 69 66 20 74     "tclkit" if t
2fb0: 68 61 74 20 76 61 72 69 61 62 6c 65 20 69 73 20  hat variable is 
2fc0: 6e 6f 74 20 73 65 74 29 20 69 66 20 69 74 20 69  not set) if it i
2fd0: 73 20 66 75 6e 63 74 69 6f 6e 61 6c 3b 20 6f 72  s functional; or
2fe0: 0a 09 32 2e 20 54 68 65 20 62 75 69 6c 74 20 54  ..2. The built T
2ff0: 63 6c 6b 69 74 20 69 74 73 65 6c 66 0a 0a 54 68  clkit itself..Th
3000: 65 20 73 65 63 6f 6e 64 20 6d 65 74 68 6f 64 20  e second method 
3010: 77 69 6c 6c 20 6e 6f 74 20 77 6f 72 6b 20 69 66  will not work if
3020: 20 74 68 65 20 62 75 69 6c 74 20 54 63 6c 6b 69   the built Tclki
3030: 74 20 69 73 20 6e 6f 74 20 65 78 65 63 75 74 61  t is not executa
3040: 62 6c 65 20 6f 6e 20 74 68 65 0a 63 75 72 72 65  ble on the.curre
3050: 6e 74 20 70 6c 61 74 66 6f 72 6d 20 28 69 2e 65  nt platform (i.e
3060: 2e 2c 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f  ., in the case o
3070: 66 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74  f cross-compilat
3080: 69 6f 6e 29 20 61 6e 64 20 73 6f 20 69 74 20 6d  ion) and so it m
3090: 61 79 20 62 65 0a 6e 65 63 65 73 73 61 72 79 20  ay be.necessary 
30a0: 74 6f 20 62 6f 6f 74 73 74 72 61 70 20 61 20 72  to bootstrap a r
30b0: 75 6e 6e 61 62 6c 65 20 54 63 6c 6b 69 74 20 66  unnable Tclkit f
30c0: 69 72 73 74 2e 0a 0a 4b 69 74 44 4c 4c 20 6d 6f  irst...KitDLL mo
30d0: 75 6e 74 73 20 74 68 65 20 56 46 53 20 66 6f 72  unts the VFS for
30e0: 20 65 76 65 72 79 20 69 6e 74 65 72 70 72 65 74   every interpret
30f0: 65 72 20 74 68 61 74 20 63 61 6c 6c 73 20 54 63  er that calls Tc
3100: 6c 5f 49 6e 69 74 28 29 2e 20 20 54 68 65 20 73  l_Init().  The s
3110: 79 73 74 65 6d 0a 56 46 53 20 74 68 61 74 20 69  ystem.VFS that i
3120: 73 20 63 72 65 61 74 65 64 20 61 74 20 62 75 69  s created at bui
3130: 6c 64 20 74 69 6d 65 20 69 73 20 6d 6f 75 6e 74  ld time is mount
3140: 65 64 20 61 74 20 2f 2e 4b 49 54 44 4c 4c 5f 54  ed at /.KITDLL_T
3150: 43 4c 2e 20 20 41 64 64 69 74 69 6f 6e 61 6c 6c  CL.  Additionall
3160: 79 2c 0a 69 66 20 74 68 65 72 65 20 69 73 20 61  y,.if there is a
3170: 20 5a 49 50 20 66 69 6c 65 20 61 70 70 65 6e 64   ZIP file append
3180: 65 64 20 74 6f 20 74 68 65 20 44 4c 4c 20 69 74  ed to the DLL it
3190: 20 77 69 6c 6c 20 62 65 20 6d 6f 75 6e 74 65 64   will be mounted
31a0: 20 61 74 20 2f 2e 4b 49 54 44 4c 4c 5f 55 53 45   at /.KITDLL_USE
31b0: 52 0a 61 6e 64 20 69 66 20 74 68 65 72 65 20 69  R.and if there i
31c0: 73 20 61 20 5a 49 50 20 66 69 6c 65 20 61 70 70  s a ZIP file app
31d0: 65 6e 64 65 64 20 74 6f 20 74 68 65 20 65 78 65  ended to the exe
31e0: 63 75 74 61 62 6c 65 20 69 74 20 77 69 6c 6c 20  cutable it will 
31f0: 62 65 20 6d 6f 75 6e 74 65 64 20 61 74 0a 2f 2e  be mounted at./.
3200: 4b 49 54 44 4c 4c 5f 41 50 50 2e 20 20 41 6c 6c  KITDLL_APP.  All
3210: 20 56 46 53 65 73 20 74 68 61 74 20 61 72 65 20   VFSes that are 
3220: 6d 6f 75 6e 74 65 64 20 68 61 76 65 20 74 68 65  mounted have the
3230: 20 22 6c 69 62 22 20 73 75 62 2d 64 69 72 65 63   "lib" sub-direc
3240: 74 6f 72 79 20 61 70 70 65 6e 64 65 64 0a 74 6f  tory appended.to
3250: 20 74 68 65 20 69 6e 74 65 72 70 72 65 74 65 72   the interpreter
3260: 73 20 22 61 75 74 6f 5f 70 61 74 68 22 20 76 61  s "auto_path" va
3270: 72 69 61 62 6c 65 2e 0a                          riable..