Hex Artifact Content

Artifact 4cc6a27d0579ab2a55991ab0b3d7abaa51aa0b9a:


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 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  "...------------
0040: 2d 2d 2d 0a 55 73 69 6e 67 20 54 68 69 73 20 54  ---.Using This T
0050: 6f 6f 6c 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ool.------------
0060: 2d 2d 2d 0a 55 73 61 67 65 3a 0a 09 6b 69 74 63  ---.Usage:..kitc
0070: 72 65 61 74 6f 72 20 5b 7b 3c 76 65 72 73 69 6f  reator [{<versio
0080: 6e 3e 20 7c 20 63 76 73 5f 3c 63 76 73 54 61 67  n> | cvs_<cvsTag
0090: 3e 20 7c 20 63 6c 65 61 6e 20 7c 20 64 69 73 74  > | clean | dist
00a0: 63 6c 65 61 6e 7d 5d 0a 09 20 20 20 20 20 20 20  clean}]..       
00b0: 20 20 20 20 5b 3c 63 6f 6e 66 69 67 75 72 65 5f      [<configure_
00c0: 6f 70 74 69 6f 6e 73 2e 2e 2e 3e 5d 0a 0a 09 57  options...>]...W
00d0: 68 65 72 65 3a 0a 09 09 76 65 72 73 69 6f 6e 20  here:...version 
00e0: 20 20 20 20 20 20 20 20 20 20 20 69 73 20 61 20             is a 
00f0: 54 63 6c 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62  Tcl version numb
0100: 65 72 20 28 65 2e 67 2e 2c 20 38 2e 34 2e 31 39  er (e.g., 8.4.19
0110: 29 0a 09 09 63 76 73 54 61 67 20 20 20 20 20 20  )...cvsTag      
0120: 20 20 20 20 20 20 20 69 73 20 61 20 43 56 53 20         is a CVS 
0130: 72 65 6c 65 61 73 65 20 74 61 67 20 28 65 2e 67  release tag (e.g
0140: 2e 2c 20 48 45 41 44 29 0a 09 09 63 6f 6e 66 69  ., HEAD)...confi
0150: 67 75 72 65 5f 6f 70 74 69 6f 6e 73 20 20 61 72  gure_options  ar
0160: 65 20 6f 70 74 69 6f 6e 73 20 74 6f 20 70 61 73  e options to pas
0170: 73 20 74 6f 20 73 75 62 6f 72 64 69 6e 61 74 65  s to subordinate
0180: 20 63 6f 6e 66 69 67 75 72 65 0a 09 09 20 20 20   configure...   
0190: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01a0: 73 63 72 69 70 74 73 20 28 65 2e 67 2e 2c 20 2d  scripts (e.g., -
01b0: 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74 29 0a 0a  -enable-64bit)..
01c0: 09 44 65 66 61 75 6c 74 20 69 73 20 74 6f 20 63  .Default is to c
01d0: 72 65 61 74 65 20 61 20 54 63 6c 6b 69 74 20 66  reate a Tclkit f
01e0: 72 6f 6d 20 54 63 6c 20 76 65 72 73 69 6f 6e 20  rom Tcl version 
01f0: 38 2e 34 2e 31 39 0a 0a 45 78 61 6d 70 6c 65 73  8.4.19..Examples
0200: 3a 0a 09 31 2e 20 43 72 65 61 74 65 20 61 20 54  :..1. Create a T
0210: 63 6c 6b 69 74 3a 0a 09 09 61 2e 20 24 20 2e 2f  clkit:...a. $ ./
0220: 6b 69 74 63 72 65 61 74 6f 72 0a 0a 09 32 2e 20  kitcreator...2. 
0230: 43 72 65 61 74 65 20 61 20 54 63 6c 6b 69 74 20  Create a Tclkit 
0240: 66 6f 72 20 54 63 6c 20 38 2e 35 2e 38 3a 0a 09  for Tcl 8.5.8:..
0250: 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74  .a. $ ./kitcreat
0260: 6f 72 20 38 2e 35 2e 38 0a 0a 09 33 2e 20 43 72  or 8.5.8...3. Cr
0270: 65 61 74 65 20 61 20 54 63 6c 6b 69 74 20 66 6f  eate a Tclkit fo
0280: 72 20 54 63 6c 20 66 72 6f 6d 20 43 56 53 20 48  r Tcl from CVS H
0290: 45 41 44 3a 0a 09 09 61 2e 20 24 20 2e 2f 6b 69  EAD:...a. $ ./ki
02a0: 74 63 72 65 61 74 6f 72 20 63 76 73 5f 48 45 41  tcreator cvs_HEA
02b0: 44 0a 0a 09 34 2e 20 43 6f 6d 70 69 6c 65 20 61  D...4. Compile a
02c0: 20 36 34 2d 62 69 74 20 54 63 6c 6b 69 74 3a 0a   64-bit Tclkit:.
02d0: 09 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61  ..a. $ ./kitcrea
02e0: 74 6f 72 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62  tor --enable-64b
02f0: 69 74 0a 0a 09 35 2e 20 43 72 6f 73 73 2d 63 6f  it...5. Cross-co
0300: 6d 70 69 6c 65 20 61 20 54 63 6c 6b 69 74 3a 0a  mpile a Tclkit:.
0310: 09 09 61 2e 20 42 6f 6f 74 73 74 72 61 70 20 28  ..a. Bootstrap (
0320: 6f 70 74 69 6f 6e 61 6c 2c 20 79 6f 75 20 63 61  optional, you ca
0330: 6e 20 75 73 65 20 61 6e 20 65 78 69 73 74 69 6e  n use an existin
0340: 67 20 54 63 6c 6b 69 74 29 3a 0a 09 09 09 69 2e  g Tclkit):....i.
0350: 20 20 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f     $ ./kitcreato
0360: 72 0a 09 09 09 69 69 2e 20 20 24 20 6d 76 20 74  r....ii.  $ mv t
0370: 63 6c 6b 69 74 2d 38 2e 34 2e 31 39 20 74 63 6c  clkit-8.4.19 tcl
0380: 6b 69 74 2d 6c 6f 63 61 6c 0a 09 09 09 69 69 69  kit-local....iii
0390: 2e 20 24 20 54 43 4c 4b 49 54 3d 22 60 70 77 64  . $ TCLKIT="`pwd
03a0: 60 2f 74 63 6c 6b 69 74 2d 6c 6f 63 61 6c 22 0a  `/tclkit-local".
03b0: 09 09 09 69 76 2e 20 20 24 20 65 78 70 6f 72 74  ...iv.  $ export
03c0: 20 54 43 4c 4b 49 54 0a 09 09 62 2e 20 43 72 6f   TCLKIT...b. Cro
03d0: 73 73 2d 63 6f 6d 70 69 6c 65 3a 0a 09 09 09 69  ss-compile:....i
03e0: 2e 20 20 20 24 20 43 43 3d 6d 69 70 73 65 6c 2d  .   $ CC=mipsel-
03f0: 6c 69 6e 75 78 2d 75 63 6c 69 62 63 2d 67 63 63  linux-uclibc-gcc
0400: 0a 09 09 09 69 69 2e 20 20 24 20 43 58 58 3d 66  ....ii.  $ CXX=f
0410: 61 6c 73 65 0a 09 09 09 69 69 69 2e 20 24 20 41  alse....iii. $ A
0420: 52 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78 2d 75  R=mipsel-linux-u
0430: 63 6c 69 62 63 2d 61 72 0a 09 09 09 69 76 2e 20  clibc-ar....iv. 
0440: 20 24 20 52 41 4e 4c 49 42 3d 6d 69 70 73 65 6c   $ RANLIB=mipsel
0450: 2d 6c 69 6e 75 78 2d 75 63 6c 69 62 63 2d 72 61  -linux-uclibc-ra
0460: 6e 6c 69 62 0a 09 09 09 76 2e 20 20 20 24 20 65  nlib....v.   $ e
0470: 78 70 6f 72 74 20 43 43 20 43 58 58 20 41 52 20  xport CC CXX AR 
0480: 52 41 4e 4c 49 42 0a 09 09 76 2e 20 20 20 24 20  RANLIB...v.   $ 
0490: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d 2d 68  ./kitcreator --h
04a0: 6f 73 74 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78  ost=mipsel-linux
04b0: 2d 75 63 6c 69 62 63 0a 0a 09 36 2e 20 43 6f 6d  -uclibc...6. Com
04c0: 70 69 6c 65 20 61 20 36 34 2d 62 69 74 20 54 63  pile a 64-bit Tc
04d0: 6c 6b 69 74 20 38 2e 35 2e 38 20 75 73 69 6e 67  lkit 8.5.8 using
04e0: 20 53 75 6e 53 74 75 64 69 6f 20 31 32 2e 31 20   SunStudio 12.1 
04f0: 6f 6e 20 53 6f 6c 61 72 69 73 2f 78 38 36 3a 0a  on Solaris/x86:.
0500: 09 09 61 2e 20 24 20 43 43 3d 27 2f 6f 70 74 2f  ..a. $ CC='/opt/
0510: 73 75 6e 73 74 75 64 69 6f 31 32 2e 31 2f 62 69  sunstudio12.1/bi
0520: 6e 2f 63 63 20 2d 6d 36 34 27 0a 09 09 62 2e 20  n/cc -m64'...b. 
0530: 24 20 43 58 58 3d 27 2f 6f 70 74 2f 73 75 6e 73  $ CXX='/opt/suns
0540: 74 75 64 69 6f 31 32 2e 31 2f 62 69 6e 2f 43 43  tudio12.1/bin/CC
0550: 20 2d 6d 36 34 27 0a 09 09 63 2e 20 24 20 50 41   -m64'...c. $ PA
0560: 54 43 48 3d 27 67 70 61 74 63 68 27 0a 09 09 63  TCH='gpatch'...c
0570: 2e 20 24 20 65 78 70 6f 72 74 20 43 43 20 43 58  . $ export CC CX
0580: 58 20 50 41 54 43 48 0a 09 09 64 2e 20 24 20 2e  X PATCH...d. $ .
0590: 2f 6b 69 74 63 72 65 61 74 6f 72 20 38 2e 35 2e  /kitcreator 8.5.
05a0: 38 20 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74  8 --enable-64bit
05b0: 0a 0a 09 37 2e 20 54 6f 20 63 6c 65 61 6e 20 75  ...7. To clean u
05c0: 70 20 70 6f 73 74 2d 62 75 69 6c 64 3a 0a 09 09  p post-build:...
05d0: 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f  a. $ ./kitcreato
05e0: 72 20 63 6c 65 61 6e 0a 0a 09 38 2e 20 43 72 65  r clean...8. Cre
05f0: 61 74 65 20 61 20 54 63 6c 6b 69 74 20 77 69 74  ate a Tclkit wit
0600: 68 6f 75 74 20 4d 65 74 61 6b 69 74 34 20 73 75  hout Metakit4 su
0610: 70 70 6f 72 74 20 28 66 61 6c 6c 73 20 62 61 63  pport (falls bac
0620: 6b 20 74 6f 20 5a 69 70 20 66 6f 72 20 73 74 6f  k to Zip for sto
0630: 72 61 67 65 29 3a 0a 09 09 61 2e 20 4b 49 54 43  rage):...a. KITC
0640: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20  REATOR_PKGS='tk 
0650: 69 74 63 6c 27 0a 09 09 62 2e 20 65 78 70 6f 72  itcl'...b. expor
0660: 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  t KITCREATOR_PKG
0670: 53 0a 09 09 63 2e 20 2e 2f 6b 69 74 63 72 65 61  S...c. ./kitcrea
0680: 74 6f 72 0a 0a 09 39 2e 20 43 72 65 61 74 65 20  tor...9. Create 
0690: 61 20 54 63 6c 6b 69 74 20 77 69 74 68 20 4d 65  a Tclkit with Me
06a0: 74 61 6b 69 74 34 20 73 75 70 70 6f 72 74 2c 20  takit4 support, 
06b0: 62 75 74 20 75 73 69 6e 67 20 5a 69 70 20 66 6f  but using Zip fo
06c0: 72 20 73 74 6f 72 61 67 65 3a 0a 09 09 61 2e 20  r storage:...a. 
06d0: 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d  $ ./kitcreator -
06e0: 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72  -enable-kit-stor
06f0: 61 67 65 3d 7a 69 70 0a 0a 45 6e 76 69 72 6f 6e  age=zip..Environ
0700: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 3a 0a  ment variables:.
0710: 09 31 2e 20 4d 41 4b 45 0a 09 09 53 70 65 63 69  .1. MAKE...Speci
0720: 66 69 65 73 20 74 68 65 20 74 6f 6f 6c 20 79 6f  fies the tool yo
0730: 75 20 77 69 73 68 20 74 6f 20 62 65 20 63 61 6c  u wish to be cal
0740: 6c 65 64 20 74 6f 20 62 75 69 6c 64 20 74 61 72  led to build tar
0750: 67 65 74 73 0a 09 09 66 72 6f 6d 20 61 20 4d 61  gets...from a Ma
0760: 6b 65 66 69 6c 65 2e 20 20 54 68 69 73 20 73 63  kefile.  This sc
0770: 72 69 70 74 20 69 73 20 67 65 6e 65 72 61 6c 6c  ript is generall
0780: 79 20 6d 6f 72 65 20 77 65 6c 6c 20 74 65 73 74  y more well test
0790: 65 64 0a 09 09 77 69 74 68 20 47 4e 55 20 4d 61  ed...with GNU Ma
07a0: 6b 65 2e 0a 0a 09 32 2e 20 50 41 54 43 48 0a 09  ke....2. PATCH..
07b0: 09 53 70 65 63 69 66 69 65 73 20 74 68 65 20 74  .Specifies the t
07c0: 6f 6f 6c 20 79 6f 75 20 77 69 73 68 20 74 6f 20  ool you wish to 
07d0: 62 65 20 63 61 6c 6c 65 64 20 74 6f 20 61 70 70  be called to app
07e0: 6c 79 20 75 6e 69 66 69 65 64 0a 09 09 64 69 66  ly unified...dif
07f0: 66 20 70 61 74 63 68 65 73 2e 20 20 54 68 69 73  f patches.  This
0800: 20 73 63 72 69 70 74 20 69 73 20 67 65 6e 65 72   script is gener
0810: 61 6c 6c 79 20 6d 6f 72 65 20 77 65 6c 6c 20 74  ally more well t
0820: 65 73 74 65 64 20 77 69 74 68 0a 09 09 47 4e 55  ested with...GNU
0830: 20 50 61 74 63 68 2e 20 0a 0a 09 33 2e 20 54 43   Patch. ...3. TC
0840: 4c 4b 49 54 0a 09 09 53 70 65 63 69 66 79 20 74  LKIT...Specify t
0850: 68 65 20 70 61 74 68 20 74 6f 20 61 20 54 63 6c  he path to a Tcl
0860: 6b 69 74 20 74 68 61 74 20 69 73 20 72 75 6e 6e  kit that is runn
0870: 61 62 6c 65 20 6f 6e 20 74 68 65 20 63 75 72 72  able on the curr
0880: 65 6e 74 0a 09 09 73 79 73 74 65 6d 2e 20 20 54  ent...system.  T
0890: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 22 74  he default is "t
08a0: 63 6c 6b 69 74 22 2e 20 20 41 20 77 6f 72 6b 69  clkit".  A worki
08b0: 6e 67 20 74 63 6c 6b 69 74 20 69 73 20 72 65 71  ng tclkit is req
08c0: 75 69 72 65 64 0a 09 09 66 6f 72 20 63 72 6f 73  uired...for cros
08d0: 73 2d 63 6f 6d 70 69 6c 69 6e 67 20 54 63 6c 6b  s-compiling Tclk
08e0: 69 74 73 2e 0a 0a 09 34 2e 20 53 54 41 54 49 43  its....4. STATIC
08f0: 54 4b 0a 09 09 53 70 65 63 69 66 79 20 74 68 69  TK...Specify thi
0900: 73 20 61 73 20 22 31 22 20 74 6f 20 73 74 61 74  s as "1" to stat
0910: 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 6f 20 54  ically link to T
0920: 6b 2e 20 20 54 68 65 20 64 65 66 61 75 6c 74 0a  k.  The default.
0930: 09 09 61 63 74 69 6f 6e 20 6f 6e 20 6d 6f 73 74  ..action on most
0940: 20 70 6c 61 74 66 6f 72 6d 73 20 69 73 20 74 6f   platforms is to
0950: 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e   dynamically lin
0960: 6b 20 74 6f 20 54 6b 2e 20 20 57 68 65 6e 0a 09  k to Tk.  When..
0970: 09 62 75 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c  .building KitDLL
0980: 2c 20 53 54 41 54 49 43 54 4b 20 69 73 20 22 31  , STATICTK is "1
0990: 22 20 62 79 20 64 65 66 61 75 6c 74 2e 20 20 49  " by default.  I
09a0: 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 0a 09 09  f you want to...
09b0: 65 6e 61 62 6c 65 20 64 79 6e 61 6d 69 63 20 6c  enable dynamic l
09c0: 69 6e 6b 69 6e 67 20 6f 66 20 54 6b 20 77 69 74  inking of Tk wit
09d0: 68 20 4b 69 74 44 4c 4c 20 79 6f 75 20 77 69 6c  h KitDLL you wil
09e0: 6c 20 68 61 76 65 20 74 6f 0a 09 09 73 70 65 63  l have to...spec
09f0: 69 66 79 20 74 68 69 73 20 61 73 20 22 2d 31 22  ify this as "-1"
0a00: 2e 0a 0a 09 35 2e 20 53 54 41 54 49 43 4d 4b 34  ....5. STATICMK4
0a10: 0a 09 09 53 70 65 63 69 66 79 20 74 68 69 73 20  ...Specify this 
0a20: 61 73 20 22 30 22 20 74 6f 20 61 74 74 65 6d 70  as "0" to attemp
0a30: 74 20 74 6f 20 63 72 65 61 74 65 20 63 72 65 61  t to create crea
0a40: 74 65 20 74 68 65 20 22 6d 6b 34 74 63 6c 22 0a  te the "mk4tcl".
0a50: 09 09 70 72 6f 6a 65 63 74 20 61 73 20 61 20 73  ..project as a s
0a60: 68 61 72 65 64 20 6f 62 6a 65 63 74 2e 20 20 49  hared object.  I
0a70: 66 20 74 68 69 73 20 66 61 69 6c 73 2c 20 69 74  f this fails, it
0a80: 20 77 69 6c 6c 20 66 61 6c 6c 20 62 61 63 6b 0a   will fall back.
0a90: 09 09 74 6f 20 62 75 69 6c 64 69 6e 67 20 73 74  ..to building st
0aa0: 61 74 69 63 61 6c 6c 79 2e 20 20 53 70 65 63 69  atically.  Speci
0ab0: 66 79 20 69 74 20 61 73 20 22 2d 31 22 20 74 6f  fy it as "-1" to
0ac0: 20 66 6f 72 63 65 20 62 75 69 6c 64 69 6e 67 0a   force building.
0ad0: 09 09 69 74 20 61 73 20 61 20 73 68 61 72 65 64  ..it as a shared
0ae0: 20 6f 62 6a 65 63 74 2e 20 20 41 6e 79 20 6f 74   object.  Any ot
0af0: 68 65 72 20 76 61 6c 75 65 2c 20 69 6e 63 6c 75  her value, inclu
0b00: 64 69 6e 67 20 62 65 69 6e 67 20 75 6e 73 65 74  ding being unset
0b10: 0a 09 09 72 65 73 75 6c 74 73 20 69 6e 20 22 6d  ...results in "m
0b20: 6b 34 74 63 6c 22 20 62 65 69 6e 67 20 62 75 69  k4tcl" being bui
0b30: 6c 74 20 61 6e 64 20 6c 69 6e 6b 65 64 20 73 74  lt and linked st
0b40: 61 74 69 63 61 6c 6c 79 2e 20 20 4b 69 74 44 49  atically.  KitDI
0b50: 4c 4c 0a 09 09 73 65 74 73 20 74 68 69 73 20 74  LL...sets this t
0b60: 6f 20 76 61 72 69 61 62 6c 65 20 74 6f 20 22 30  o variable to "0
0b70: 22 2e 20 20 49 66 20 4d 65 74 61 6b 69 74 34 20  ".  If Metakit4 
0b80: 69 73 20 62 75 69 6c 74 20 73 68 61 72 65 64 2c  is built shared,
0b90: 20 69 74 0a 09 09 63 61 6e 6e 6f 74 20 62 65 20   it...cannot be 
0ba0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 6b 69 74  used for the kit
0bb0: 20 73 74 6f 72 61 67 65 20 66 6f 72 20 54 63 6c   storage for Tcl
0bc0: 6b 69 74 2e 0a 0a 09 36 2e 20 53 54 52 49 50 0a  kit....6. STRIP.
0bd0: 09 09 53 70 65 63 69 66 69 65 73 20 74 68 65 20  ..Specifies the 
0be0: 74 6f 6f 6c 20 79 6f 75 20 77 69 73 68 20 74 6f  tool you wish to
0bf0: 20 62 65 20 63 61 6c 6c 65 64 20 74 6f 20 73 74   be called to st
0c00: 72 69 70 20 6f 62 6a 65 63 74 20 66 69 6c 65 73  rip object files
0c10: 2c 0a 09 09 61 72 63 68 69 76 65 73 2c 20 61 6e  ,...archives, an
0c20: 64 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 73  d shared objects
0c30: 2e 20 20 54 68 65 20 64 65 66 61 75 6c 74 20 69  .  The default i
0c40: 73 20 22 73 74 72 69 70 22 2e 20 20 59 6f 75 0a  s "strip".  You.
0c50: 09 09 73 68 6f 75 6c 64 20 70 72 6f 62 61 62 6c  ..should probabl
0c60: 79 20 73 65 74 20 74 68 69 73 20 69 66 20 79 6f  y set this if yo
0c70: 75 20 61 72 65 20 63 72 6f 73 73 2d 63 6f 6d 70  u are cross-comp
0c80: 69 6c 69 6e 67 2e 0a 0a 09 37 2e 20 4b 49 54 43  iling....7. KITC
0c90: 52 45 41 54 4f 52 5f 50 4b 47 53 0a 09 09 53 70  REATOR_PKGS...Sp
0ca0: 65 63 69 66 79 20 77 68 69 63 68 20 6e 6f 6e 2d  ecify which non-
0cb0: 72 65 71 75 69 72 65 64 20 70 61 63 6b 61 67 65  required package
0cc0: 73 20 74 6f 20 62 75 69 6c 64 2e 20 20 54 68 65  s to build.  The
0cd0: 20 64 65 66 61 75 6c 74 20 6c 69 73 74 0a 09 09   default list...
0ce0: 69 73 3a 0a 09 09 09 74 6b 20 69 74 63 6c 20 6d  is:....tk itcl m
0cf0: 6b 34 74 63 6c 0a 0a 09 09 49 66 20 6d 6b 34 74  k4tcl....If mk4t
0d00: 63 6c 20 69 73 20 6e 6f 74 20 70 72 65 73 65 6e  cl is not presen
0d10: 74 20 61 20 5a 69 70 2d 62 61 73 65 64 20 73 74  t a Zip-based st
0d20: 6f 72 61 67 65 20 6d 65 63 68 61 6e 69 73 6d 20  orage mechanism 
0d30: 77 69 6c 6c 20 62 65 0a 09 09 75 73 65 64 20 69  will be...used i
0d40: 6e 73 74 65 61 64 2e 20 20 54 6f 20 73 70 65 63  nstead.  To spec
0d50: 69 66 79 20 74 68 61 74 20 74 68 65 20 64 65 66  ify that the def
0d60: 61 75 6c 74 20 62 65 20 75 73 65 64 2c 20 64 6f  ault be used, do
0d70: 20 6e 6f 74 20 73 65 74 0a 09 09 74 68 69 73 20   not set...this 
0d80: 6f 72 20 73 65 74 20 69 74 20 74 6f 20 74 68 65  or set it to the
0d90: 20 65 6d 70 74 79 20 73 74 72 69 6e 67 2e 20 20   empty string.  
0da0: 54 6f 20 73 70 65 63 69 66 79 20 74 68 61 74 20  To specify that 
0db0: 6e 6f 0a 09 09 6e 6f 6e 2d 72 65 71 75 69 72 65  no...non-require
0dc0: 64 20 70 61 63 6b 61 67 65 73 20 62 65 20 62 75  d packages be bu
0dd0: 69 6c 74 2c 20 73 65 74 20 69 74 20 74 6f 20 61  ilt, set it to a
0de0: 20 73 74 72 69 6e 67 20 74 68 61 74 0a 09 09 63   string that...c
0df0: 6f 6e 74 61 69 6e 73 20 6f 6e 6c 79 20 77 68 69  ontains only whi
0e00: 74 65 20 73 70 61 63 65 2e 0a 0a 09 09 49 66 20  te space.....If 
0e10: 22 6b 69 74 64 6c 6c 22 20 69 73 20 73 70 65 63  "kitdll" is spec
0e20: 69 66 69 65 64 20 69 6e 20 74 68 65 20 6c 69 73  ified in the lis
0e30: 74 20 74 68 65 20 74 61 72 67 65 74 20 62 65 63  t the target bec
0e40: 6f 6d 65 73 20 4b 69 74 44 4c 4c 0a 09 09 61 6e  omes KitDLL...an
0e50: 64 20 6e 6f 20 54 63 6c 6b 69 74 20 77 69 6c 6c  d no Tclkit will
0e60: 20 62 75 69 6c 74 2c 20 62 75 74 20 69 6e 73 74   built, but inst
0e70: 65 61 64 20 6c 69 62 74 63 6c 6b 69 74 2e 0a 0a  ead libtclkit...
0e80: 09 38 2e 20 4b 49 54 43 52 45 41 54 4f 52 5f 4d  .8. KITCREATOR_M
0e90: 49 4e 45 4e 43 4f 44 49 4e 47 53 0a 09 09 53 65  INENCODINGS...Se
0ea0: 74 20 74 68 69 73 20 76 61 72 69 61 62 6c 65 20  t this variable 
0eb0: 74 6f 20 61 20 6e 6f 6e 2d 65 6d 70 74 79 20 73  to a non-empty s
0ec0: 74 72 69 6e 67 20 74 6f 20 67 65 6e 65 72 61 74  tring to generat
0ed0: 65 20 61 20 54 63 6c 6b 69 74 0a 09 09 77 69 74  e a Tclkit...wit
0ee0: 68 6f 75 74 20 61 6c 6c 20 65 6e 63 6f 64 69 6e  hout all encodin
0ef0: 67 73 2c 20 6f 6e 6c 79 20 69 6e 63 6c 75 64 69  gs, only includi
0f00: 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  ng the following
0f10: 3a 0a 09 09 09 61 73 63 69 69 2e 65 6e 63 20 63  :....ascii.enc c
0f20: 70 31 32 35 32 2e 65 6e 63 20 69 73 6f 38 38 35  p1252.enc iso885
0f30: 39 2d 31 2e 65 6e 63 20 69 73 6f 38 38 35 39 2d  9-1.enc iso8859-
0f40: 31 35 2e 65 6e 63 0a 09 09 09 69 73 6f 38 38 35  15.enc....iso885
0f50: 39 2d 32 2e 65 6e 63 20 6b 6f 69 38 2d 72 2e 65  9-2.enc koi8-r.e
0f60: 6e 63 20 6d 61 63 52 6f 6d 61 6e 2e 65 6e 63 0a  nc macRoman.enc.
0f70: 0a 09 39 2e 20 4b 49 54 43 52 45 41 54 4f 52 5f  ..9. KITCREATOR_
0f80: 4d 49 4e 42 55 49 4c 44 0a 09 09 53 65 74 20 74  MINBUILD...Set t
0f90: 68 69 73 20 76 61 72 69 61 62 6c 65 20 74 6f 20  his variable to 
0fa0: 61 20 6e 6f 6e 2d 65 6d 70 74 79 20 73 74 72 69  a non-empty stri
0fb0: 6e 67 20 74 6f 20 65 78 63 6c 75 64 65 20 75 6e  ng to exclude un
0fc0: 6e 65 63 65 73 73 61 72 79 0a 09 09 70 61 63 6b  necessary...pack
0fd0: 61 67 65 73 20 66 72 6f 6d 20 54 63 6c 20 62 75  ages from Tcl bu
0fe0: 69 6c 64 2e 20 20 54 68 69 73 20 65 78 63 6c 75  ild.  This exclu
0ff0: 64 65 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  des the followin
1000: 67 20 70 61 63 6b 61 67 65 73 3a 0a 09 09 09 74  g packages:....t
1010: 63 6c 74 65 73 74 0a 0a 4b 69 74 73 68 20 43 6f  cltest..Kitsh Co
1020: 6e 66 69 67 75 72 65 20 4f 70 74 69 6f 6e 73 3a  nfigure Options:
1030: 0a 09 31 2e 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69  ..1. --enable-ki
1040: 74 2d 73 74 6f 72 61 67 65 3d 7b 7a 69 70 7c 6d  t-storage={zip|m
1050: 6b 34 7c 61 75 74 6f 7d 0a 09 09 53 70 65 63 69  k4|auto}...Speci
1060: 66 79 20 77 68 69 63 68 20 74 79 70 65 20 6f 66  fy which type of
1070: 20 73 74 6f 72 61 67 65 20 74 6f 20 75 73 65 20   storage to use 
1080: 77 69 74 68 20 74 68 65 20 54 63 6c 6b 69 74 2e  with the Tclkit.
1090: 20 20 54 68 65 0a 09 09 64 65 66 61 75 6c 74 20    The...default 
10a0: 69 73 20 74 6f 20 61 75 74 6f 2d 64 65 74 65 63  is to auto-detec
10b0: 74 2e 20 20 41 75 74 6f 2d 64 65 74 65 63 74 69  t.  Auto-detecti
10c0: 6f 6e 20 75 73 65 73 20 4d 6b 34 20 69 66 0a 09  on uses Mk4 if..
10d0: 09 61 76 61 69 6c 61 62 6c 65 20 61 6e 64 20 62  .available and b
10e0: 75 69 6c 74 20 73 74 61 74 69 63 61 6c 6c 79 2c  uilt statically,
10f0: 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 66 61   otherwise it fa
1100: 6c 6c 73 20 62 61 63 6b 20 74 6f 20 5a 69 70 2e  lls back to Zip.
1110: 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..--------------
1120: 2d 2d 2d 2d 2d 0a 4d 65 74 68 6f 64 20 6f 66 20  -----.Method of 
1130: 4f 70 65 72 61 74 69 6f 6e 0a 2d 2d 2d 2d 2d 2d  Operation.------
1140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 53 75  -------------.Su
1150: 6d 6d 61 72 79 3a 0a 09 31 2e 20 22 6b 69 74 63  mmary:..1. "kitc
1160: 72 65 61 74 6f 72 22 20 63 61 6c 6c 73 20 2a 2f  reator" calls */
1170: 62 75 69 6c 64 2e 73 68 0a 09 32 2e 20 2a 2f 62  build.sh..2. */b
1180: 75 69 6c 64 2e 73 68 20 64 6f 77 6e 6c 6f 61 64  uild.sh download
1190: 73 20 61 6e 64 20 63 6f 6d 70 69 6c 65 73 20 61  s and compiles a
11a0: 70 70 72 6f 70 72 69 61 74 65 20 73 6f 66 74 77  ppropriate softw
11b0: 61 72 65 0a 09 33 2e 20 2a 2f 62 75 69 6c 64 2e  are..3. */build.
11c0: 73 68 20 69 6e 73 74 61 6c 6c 73 20 73 6f 66 74  sh installs soft
11d0: 77 61 72 65 20 69 6e 74 6f 20 22 69 6e 73 74 22  ware into "inst"
11e0: 20 28 72 75 6e 2d 74 69 6d 65 20 2b 20 63 6f 6d   (run-time + com
11f0: 70 69 6c 65 2d 74 69 6d 65 29 0a 09 34 2e 20 2a  pile-time)..4. *
1200: 2f 62 75 69 6c 64 2e 73 68 20 69 6e 73 74 61 6c  /build.sh instal
1210: 6c 73 20 72 75 6e 2d 74 69 6d 65 20 73 6f 66 74  ls run-time soft
1220: 77 61 72 65 20 69 6e 74 6f 20 22 6f 75 74 22 2c  ware into "out",
1230: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 09 20   this will be.. 
1240: 20 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68    included in th
1250: 65 20 54 63 6c 6b 69 74 20 61 73 20 69 66 20 69  e Tclkit as if i
1260: 74 20 77 65 72 65 20 74 68 65 20 72 6f 6f 74 20  t were the root 
1270: 64 69 72 65 63 74 6f 72 79 20 6f 66 20 74 68 65  directory of the
1280: 0a 09 20 20 20 54 63 6c 6b 69 74 20 28 63 6f 6d  ..   Tclkit (com
1290: 62 69 6e 65 64 20 77 69 74 68 20 6f 74 68 65 72  bined with other
12a0: 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f 72 69   "out" directori
12b0: 65 73 29 0a 09 35 2e 20 6b 69 74 73 68 2f 62 75  es)..5. kitsh/bu
12c0: 69 6c 64 2e 73 68 20 63 6f 6d 70 69 6c 65 73 20  ild.sh compiles 
12d0: 61 20 22 6d 61 69 6e 22 20 66 75 6e 63 74 69 6f  a "main" functio
12e0: 6e 20 61 6e 64 20 6c 69 6e 6b 73 20 61 6c 6c 20  n and links all 
12f0: 74 68 65 20 62 75 69 6c 74 0a 09 20 20 20 6c 69  the built..   li
1300: 62 72 61 72 69 65 73 20 74 6f 67 65 74 68 65 72  braries together
1310: 20 69 6e 74 6f 20 61 6e 20 65 78 65 63 75 74 61   into an executa
1320: 62 6c 65 0a 09 36 2e 20 6b 69 74 73 68 2f 62 75  ble..6. kitsh/bu
1330: 69 6c 64 2e 73 68 20 63 6f 6d 62 69 6e 65 73 20  ild.sh combines 
1340: 61 6c 6c 20 74 68 65 20 22 6f 75 74 22 20 64 69  all the "out" di
1350: 72 65 63 74 6f 72 69 65 73 20 69 6e 74 6f 20 6f  rectories into o
1360: 6e 65 0a 09 37 2e 20 6b 69 74 73 68 2f 62 75 69  ne..7. kitsh/bui
1370: 6c 64 2e 73 68 20 63 72 65 61 74 65 73 20 61 20  ld.sh creates a 
1380: 4d 65 74 61 6b 69 74 20 6f 72 20 5a 69 70 20 64  Metakit or Zip d
1390: 61 74 61 62 61 73 65 20 66 72 6f 6d 20 74 68 65  atabase from the
13a0: 20 63 6f 6d 62 69 6e 65 64 0a 09 20 20 20 64 69   combined..   di
13b0: 72 65 63 74 6f 72 69 65 73 20 61 6e 64 20 61 70  rectories and ap
13c0: 70 65 6e 64 73 20 74 68 61 74 20 74 6f 20 74 68  pends that to th
13d0: 65 20 63 6f 6d 70 69 6c 65 64 20 65 78 65 63 75  e compiled execu
13e0: 74 61 62 6c 65 20 75 73 69 6e 67 3a 0a 09 09 61  table using:...a
13f0: 2e 20 41 20 54 63 6c 6b 69 74 20 66 6f 75 6e 64  . A Tclkit found
1400: 20 69 6e 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d   in the environm
1410: 65 6e 74 20 76 61 72 69 61 62 6c 65 20 22 54 43  ent variable "TC
1420: 4c 4b 49 54 22 20 28 74 63 6c 6b 69 74 0a 09 09  LKIT" (tclkit...
1430: 20 20 20 69 66 20 75 6e 73 65 74 29 20 69 66 20     if unset) if 
1440: 69 74 20 69 73 20 66 75 6e 63 74 69 6f 6e 61 6c  it is functional
1450: 3b 20 6f 72 0a 09 09 62 2e 20 54 68 65 20 62 75  ; or...b. The bu
1460: 69 6c 74 20 6b 69 74 20 69 74 73 65 6c 66 20 28  ilt kit itself (
1470: 64 6f 65 73 20 6e 6f 74 20 77 6f 72 6b 20 66 6f  does not work fo
1480: 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e  r cross-compilin
1490: 67 29 0a 0a 44 65 74 61 69 6c 73 3a 0a 09 54 68  g)..Details:..Th
14a0: 65 20 67 65 6e 65 72 61 6c 20 6d 65 63 68 61 6e  e general mechan
14b0: 69 73 6d 20 74 68 61 74 20 65 6e 61 62 6c 65 73  ism that enables
14c0: 20 61 20 54 63 6c 6b 69 74 20 74 6f 20 6f 70 65   a Tclkit to ope
14d0: 72 61 74 65 20 69 73 20 61 20 73 6d 61 6c 6c 20  rate is a small 
14e0: 54 63 6c 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69  Tcl.initializati
14f0: 6f 6e 20 72 6f 75 74 69 6e 65 20 6c 69 6e 6b 65  on routine linke
1500: 64 20 73 74 61 74 69 63 61 6c 6c 79 20 74 6f 20  d statically to 
1510: 74 68 65 20 63 6f 72 65 20 6c 69 62 72 61 72 69  the core librari
1520: 65 73 20 6e 65 65 64 65 64 20 74 6f 0a 6f 70 65  es needed to.ope
1530: 72 61 74 65 20 61 20 54 63 6c 20 69 6e 74 65 72  rate a Tcl inter
1540: 70 72 65 74 65 72 2c 20 74 68 65 20 54 63 6c 20  preter, the Tcl 
1550: 56 46 53 20 4c 61 79 65 72 2c 20 61 6e 64 20 61  VFS Layer, and a
1560: 20 64 61 74 61 62 61 73 65 2d 62 61 63 6b 65 64   database-backed
1570: 20 28 4d 65 74 61 6b 69 74 29 0a 56 69 72 74 75   (Metakit).Virtu
1580: 61 6c 20 46 69 6c 65 20 53 79 73 74 65 6d 20 74  al File System t
1590: 68 61 74 20 69 73 20 61 70 70 65 6e 64 65 64 20  hat is appended 
15a0: 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68  to the end of th
15b0: 65 20 65 78 65 63 75 74 61 62 6c 65 2e 0a 0a 54  e executable...T
15c0: 68 69 73 20 70 72 6f 6a 65 63 74 20 62 72 69 6e  his project brin
15d0: 67 73 20 74 6f 67 65 74 68 65 72 20 61 6c 6c 20  gs together all 
15e0: 6f 66 20 74 68 65 20 72 65 71 75 69 72 65 64 20  of the required 
15f0: 70 69 65 63 65 73 2c 20 70 6c 75 73 20 73 6f 6d  pieces, plus som
1600: 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 70 69 65  e additional.pie
1610: 63 65 73 20 74 68 61 74 20 77 65 72 65 20 66 6f  ces that were fo
1620: 75 6e 64 20 69 6e 20 74 68 65 20 6f 72 69 67 69  und in the origi
1630: 6e 61 6c 20 54 63 6c 6b 69 74 3a 0a 09 31 2e 20  nal Tclkit:..1. 
1640: 54 6b 20 28 64 79 6e 61 6d 69 63 61 6c 6c 79 20  Tk (dynamically 
1650: 6c 69 6e 6b 65 64 29 0a 09 32 2e 20 49 74 63 6c  linked)..2. Itcl
1660: 20 28 64 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69   (dynamically li
1670: 6e 6b 65 64 29 0a 0a 54 68 65 20 73 6f 75 72 63  nked)..The sourc
1680: 65 20 63 6f 64 65 20 66 6f 72 20 74 68 65 73 65  e code for these
1690: 20 70 69 65 63 65 73 20 61 72 65 20 64 6f 77 6e   pieces are down
16a0: 6c 6f 61 64 65 64 2c 20 63 6f 6d 70 69 6c 65 64  loaded, compiled
16b0: 2c 20 61 6e 64 20 6c 69 6e 6b 65 64 2c 20 61 6e  , and linked, an
16c0: 64 20 74 68 65 0a 64 61 74 61 62 61 73 65 20 63  d the.database c
16d0: 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 61 70  ontaining the ap
16e0: 70 72 6f 70 72 69 61 74 65 20 66 69 6c 65 73 79  propriate filesy
16f0: 73 74 65 6d 20 64 61 74 61 20 69 73 20 63 72 65  stem data is cre
1700: 61 74 65 64 2e 20 20 57 68 61 74 20 73 65 74 73  ated.  What sets
1710: 0a 74 68 69 73 20 70 72 6f 6a 65 63 74 20 61 70  .this project ap
1720: 61 72 74 20 66 72 6f 6d 20 6f 74 68 65 72 20 73  art from other s
1730: 69 6d 69 6c 61 72 20 70 72 6f 6a 65 63 74 73 20  imilar projects 
1740: 69 73 20 74 68 61 74 3a 0a 09 31 2e 20 49 74 20  is that:..1. It 
1750: 61 74 74 65 6d 70 74 73 20 74 6f 20 62 65 20 6d  attempts to be m
1760: 6f 64 75 6c 61 72 3b 0a 09 32 2e 20 49 74 20 73  odular;..2. It s
1770: 75 70 70 6f 72 74 73 20 63 72 6f 73 73 2d 63 6f  upports cross-co
1780: 6d 70 69 6c 69 6e 67 3b 0a 09 33 2e 20 49 74 20  mpiling;..3. It 
1790: 64 6f 77 6e 6c 6f 61 64 73 20 74 68 65 20 73 6f  downloads the so
17a0: 75 72 63 65 20 66 72 6f 6d 20 74 68 65 69 72 20  urce from their 
17b0: 6f 72 69 67 69 6e 61 6c 20 72 65 70 6f 73 69 74  original reposit
17c0: 6f 72 69 65 73 3b 0a 09 34 2e 20 49 74 20 61 6c  ories;..4. It al
17d0: 6c 6f 77 73 20 79 6f 75 20 74 6f 20 73 70 65 63  lows you to spec
17e0: 69 66 79 20 61 6e 20 61 72 62 69 74 72 61 72 79  ify an arbitrary
17f0: 20 76 65 72 73 69 6f 6e 20 6f 66 20 54 63 6c 20   version of Tcl 
1800: 28 69 6e 63 6c 75 64 69 6e 67 0a 09 20 20 20 43  (including..   C
1810: 56 53 29 3b 20 61 6e 64 0a 09 35 2e 20 49 74 20  VS); and..5. It 
1820: 75 73 65 73 20 47 4e 55 20 41 75 74 6f 63 6f 6e  uses GNU Autocon
1830: 66 20 73 63 72 69 70 74 73 20 66 6f 72 20 63 6f  f scripts for co
1840: 6d 70 69 6c 69 6e 67 20 74 68 65 20 70 61 72 74  mpiling the part
1850: 20 6f 66 20 74 68 65 20 54 63 6c 6b 69 74 0a 09   of the Tclkit..
1860: 20 20 20 74 68 61 74 20 62 72 69 6e 67 73 20 74     that brings t
1870: 68 65 20 77 68 6f 6c 65 20 74 68 69 6e 67 20 74  he whole thing t
1880: 6f 67 65 74 68 65 72 20 28 74 68 65 20 4b 69 74  ogether (the Kit
1890: 73 68 29 0a 0a 54 6f 20 61 63 63 6f 6d 70 6c 69  sh)..To accompli
18a0: 73 68 20 74 68 65 73 65 20 67 6f 61 6c 73 20 74  sh these goals t
18b0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 65 63  he following mec
18c0: 68 61 6e 69 73 6d 73 20 61 72 65 20 69 6e 20 70  hanisms are in p
18d0: 6c 61 63 65 3a 0a 09 31 2e 20 54 68 65 20 74 6f  lace:..1. The to
18e0: 70 2d 6c 65 76 65 6c 20 22 6b 69 74 63 72 65 61  p-level "kitcrea
18f0: 74 6f 72 22 20 73 63 72 69 70 74 3b 20 61 6e 64  tor" script; and
1900: 0a 09 32 2e 20 50 65 72 2d 70 72 6f 6a 65 63 74  ..2. Per-project
1910: 20 73 75 62 64 69 72 65 63 74 6f 72 69 65 73 2c   subdirectories,
1920: 20 65 61 63 68 20 63 6f 6e 74 61 69 6e 69 6e 67   each containing
1930: 20 61 20 22 62 75 69 6c 64 2e 73 68 22 20 73 63   a "build.sh" sc
1940: 72 69 70 74 0a 0a 54 68 65 20 74 6f 70 2d 6c 65  ript..The top-le
1950: 76 65 6c 20 22 6b 69 74 63 72 65 61 74 6f 72 22  vel "kitcreator"
1960: 20 73 63 72 69 70 74 20 69 73 20 76 65 72 79 20   script is very 
1970: 73 69 6d 70 6c 65 2e 20 20 49 74 73 20 6f 6e 6c  simple.  Its onl
1980: 79 20 6a 6f 62 20 69 73 20 74 6f 0a 69 6e 74 65  y job is to.inte
1990: 72 70 72 65 74 20 63 6f 6d 6d 61 6e 64 20 6c 69  rpret command li
19a0: 6e 65 20 61 72 67 75 6d 65 6e 74 73 2c 20 61 6e  ne arguments, an
19b0: 64 20 63 61 6c 6c 20 74 68 65 20 70 65 72 2d 70  d call the per-p
19c0: 72 6f 6a 65 63 74 20 22 62 75 69 6c 64 2e 73 68  roject "build.sh
19d0: 22 20 73 63 72 69 70 74 73 2e 0a 46 6f 72 20 74  " scripts..For t
19e0: 68 65 20 22 74 63 6c 22 20 70 72 6f 6a 65 63 74  he "tcl" project
19f0: 20 69 74 20 61 6c 73 6f 20 66 69 6e 64 73 20 74   it also finds t
1a00: 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 22  he appropriate "
1a10: 74 63 6c 43 6f 6e 66 69 67 2e 73 68 22 20 28 61  tclConfig.sh" (a
1a20: 6e 64 20 73 74 6f 72 65 73 0a 74 68 69 73 20 70  nd stores.this p
1a30: 61 74 68 20 69 6e 20 54 43 4c 43 4f 4e 46 49 47  ath in TCLCONFIG
1a40: 44 49 52 29 20 74 6f 20 65 6e 61 62 6c 65 20 73  DIR) to enable s
1a50: 75 62 73 65 71 75 65 6e 74 20 62 75 69 6c 64 20  ubsequent build 
1a60: 73 63 72 69 70 74 73 20 74 6f 20 66 69 6e 64 20  scripts to find 
1a70: 74 68 65 0a 61 70 70 72 6f 70 72 69 61 74 65 20  the.appropriate 
1a80: 54 63 6c 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69  Tcl to link agai
1a90: 6e 73 74 2e 0a 0a 54 68 65 20 70 65 72 2d 70 72  nst...The per-pr
1aa0: 6f 6a 65 63 74 20 22 62 75 69 6c 64 2e 73 68 22  oject "build.sh"
1ab0: 20 73 63 72 69 70 74 73 20 61 72 65 20 65 6e 74   scripts are ent
1ac0: 69 72 65 6c 79 20 61 75 74 6f 6e 6f 6d 6f 75 73  irely autonomous
1ad0: 2e 20 20 54 68 65 79 20 61 72 65 0a 72 65 73 70  .  They are.resp
1ae0: 6f 6e 73 69 62 6c 65 20 66 6f 72 20 64 6f 77 6e  onsible for down
1af0: 6c 6f 61 64 69 6e 67 20 74 68 65 20 73 6f 75 72  loading the sour
1b00: 63 65 20 63 6f 64 65 20 66 6f 72 20 74 68 65 20  ce code for the 
1b10: 61 70 70 72 6f 70 72 69 61 74 65 20 76 65 72 73  appropriate vers
1b20: 69 6f 6e 20 74 68 61 74 0a 77 69 6c 6c 20 63 6f  ion that.will co
1b30: 6d 70 69 6c 65 20 61 6e 64 20 6c 69 6e 6b 20 61  mpile and link a
1b40: 67 61 69 6e 73 74 20 74 68 65 20 63 75 72 72 65  gainst the curre
1b50: 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 54 63  nt version of Tc
1b60: 6c 20 28 75 73 65 72 20 72 65 71 75 65 73 74 65  l (user requeste
1b70: 64 0a 76 65 72 73 69 6f 6e 20 63 61 6e 20 62 65  d.version can be
1b80: 20 66 6f 75 6e 64 20 69 6e 20 22 54 43 4c 56 45   found in "TCLVE
1b90: 52 53 22 2c 20 77 68 69 6c 65 20 74 68 65 20 61  RS", while the a
1ba0: 63 74 75 61 6c 20 76 65 72 73 69 6f 6e 20 6d 75  ctual version mu
1bb0: 73 74 20 62 65 20 72 65 71 75 65 73 74 65 64 0a  st be requested.
1bc0: 66 72 6f 6d 20 74 68 65 20 22 74 63 6c 43 6f 6e  from the "tclCon
1bd0: 66 69 67 2e 73 68 22 20 73 63 72 69 70 74 29 2c  fig.sh" script),
1be0: 20 63 6f 6d 70 69 6c 69 6e 67 20 69 74 2c 20 69   compiling it, i
1bf0: 6e 73 74 61 6c 6c 69 6e 67 20 61 20 66 75 6e 63  nstalling a func
1c00: 74 69 6f 6e 61 6c 20 63 6f 70 79 0a 69 6e 74 6f  tional copy.into
1c10: 20 74 68 65 20 70 65 72 2d 70 72 6f 6a 65 63 74   the per-project
1c20: 20 22 69 6e 73 74 22 20 64 69 72 65 63 74 6f 72   "inst" director
1c30: 79 2c 20 61 6e 64 20 69 6e 73 74 61 6c 6c 69 6e  y, and installin
1c40: 67 20 61 6e 79 74 68 69 6e 67 20 74 68 61 74 20  g anything that 
1c50: 6e 65 65 64 73 20 74 6f 0a 62 65 20 69 6e 20 74  needs to.be in t
1c60: 68 65 20 54 63 6c 6b 69 74 27 73 20 56 46 53 20  he Tclkit's VFS 
1c70: 72 6f 6f 74 20 69 6e 74 6f 20 74 68 65 20 70 65  root into the pe
1c80: 72 2d 70 72 6f 6a 65 63 74 20 22 6f 75 74 22 20  r-project "out" 
1c90: 64 69 72 65 63 74 6f 72 79 2e 0a 0a 54 68 65 20  directory...The 
1ca0: 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74 68 69  exception to thi
1cb0: 73 20 69 73 20 74 68 65 20 22 6b 69 74 73 68 22  s is the "kitsh"
1cc0: 20 61 6e 64 20 22 6b 69 74 64 6c 6c 22 20 70 72   and "kitdll" pr
1cd0: 6f 6a 65 63 74 73 2e 20 20 54 68 65 79 20 61 72  ojects.  They ar
1ce0: 65 20 74 68 65 20 67 6c 75 65 0a 74 68 61 74 20  e the glue.that 
1cf0: 62 69 6e 64 73 20 61 6c 6c 20 74 68 65 20 69 6e  binds all the in
1d00: 64 69 76 69 64 75 61 6c 20 70 72 6f 6a 65 63 74  dividual project
1d10: 73 20 74 6f 67 65 74 68 65 72 20 69 6e 74 6f 20  s together into 
1d20: 61 20 73 69 6e 67 6c 65 20 65 78 65 63 75 74 61  a single executa
1d30: 62 6c 65 2e 20 20 49 74 73 0a 62 75 69 6c 64 20  ble.  Its.build 
1d40: 73 63 72 69 70 74 20 64 6f 65 73 20 6e 6f 74 20  script does not 
1d50: 63 72 65 61 74 65 20 61 6e 20 22 69 6e 73 74 22  create an "inst"
1d60: 20 6f 72 20 61 6e 20 22 6f 75 74 22 20 64 69 72   or an "out" dir
1d70: 65 63 74 6f 72 79 20 62 65 63 61 75 73 65 20 69  ectory because i
1d80: 74 20 69 73 20 6e 6f 74 0a 61 20 6c 69 62 72 61  t is not.a libra
1d90: 72 79 2e 20 20 49 6e 73 74 65 61 64 2c 20 69 74  ry.  Instead, it
1da0: 20 63 6f 6c 6c 65 63 74 73 20 61 6c 6c 20 74 68   collects all th
1db0: 65 20 6f 74 68 65 72 20 70 72 6f 6a 65 63 74 27  e other project'
1dc0: 73 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f 72  s "out" director
1dd0: 69 65 73 0a 69 6e 74 6f 20 61 20 73 69 6e 67 6c  ies.into a singl
1de0: 65 20 64 69 72 65 63 74 6f 72 79 20 28 73 74 61  e directory (sta
1df0: 72 70 61 63 6b 2e 76 66 73 29 2c 20 61 73 20 77  rpack.vfs), as w
1e00: 65 6c 6c 20 61 20 73 74 61 74 69 63 20 66 69 6c  ell a static fil
1e10: 65 20 28 62 6f 6f 74 2e 74 63 6c 29 2e 0a 49 74  e (boot.tcl)..It
1e20: 20 74 68 65 6e 20 63 6f 6d 70 69 6c 65 73 20 74   then compiles t
1e30: 68 65 20 73 6f 75 72 63 65 20 63 6f 64 65 2c 20  he source code, 
1e40: 61 6e 64 20 74 68 65 6e 20 69 6e 73 74 61 6c 6c  and then install
1e50: 73 20 74 68 65 20 56 46 53 20 6f 6e 74 6f 20 74  s the VFS onto t
1e60: 68 65 20 72 65 73 75 6c 74 69 6e 67 0a 65 78 65  he resulting.exe
1e70: 63 75 74 61 62 6c 65 2e 20 20 54 68 65 20 56 46  cutable.  The VF
1e80: 53 20 69 73 20 63 72 65 61 74 65 64 20 62 79 20  S is created by 
1e90: 74 68 65 20 22 69 6e 73 74 61 6c 6c 76 66 73 2e  the "installvfs.
1ea0: 74 63 6c 22 20 73 63 72 69 70 74 20 66 6f 72 20  tcl" script for 
1eb0: 4b 69 74 73 68 2e 20 20 46 6f 72 0a 4b 69 74 44  Kitsh.  For.KitD
1ec0: 4c 4c 20 74 68 65 20 56 46 53 20 69 73 20 63 72  LL the VFS is cr
1ed0: 65 61 74 65 64 20 62 79 20 22 64 69 72 32 63 2e  eated by "dir2c.
1ee0: 74 63 6c 22 2e 0a 0a 49 66 20 74 68 65 20 22 6d  tcl"...If the "m
1ef0: 6b 34 74 63 6c 22 20 70 72 6f 6a 65 63 74 20 66  k4tcl" project f
1f00: 61 69 6c 73 20 74 6f 20 62 75 69 6c 64 20 28 6f  ails to build (o
1f10: 72 20 69 73 20 6e 6f 74 20 72 65 71 75 65 73 74  r is not request
1f20: 65 64 20 74 6f 20 62 65 20 62 75 69 6c 74 29 2c  ed to be built),
1f30: 0a 74 68 65 20 72 65 73 74 20 6f 66 20 74 68 65  .the rest of the
1f40: 20 70 72 6f 6a 65 63 74 20 77 69 6c 6c 20 62 65   project will be
1f50: 20 62 75 69 6c 74 20 75 73 69 6e 67 20 7a 69 70   built using zip
1f60: 20 66 69 6c 65 73 20 69 6e 73 74 65 61 64 20 6f   files instead o
1f70: 66 20 4d 65 74 61 6b 69 74 0a 64 61 74 61 62 61  f Metakit.databa
1f80: 73 65 73 2e 0a 0a 54 6f 20 63 72 65 61 74 65 20  ses...To create 
1f90: 74 68 65 20 73 74 6f 72 61 67 65 20 64 61 74 61  the storage data
1fa0: 62 61 73 65 2c 20 6f 6e 65 20 6f 66 20 74 77 6f  base, one of two
1fb0: 20 54 63 6c 6b 69 74 73 20 69 73 20 75 73 65 64   Tclkits is used
1fc0: 20 28 74 72 69 65 64 20 69 6e 20 74 68 69 73 0a   (tried in this.
1fd0: 6f 72 64 65 72 29 3a 0a 09 31 2e 20 54 68 65 20  order):..1. The 
1fe0: 54 63 6c 6b 69 74 20 73 70 65 63 69 66 69 65 64  Tclkit specified
1ff0: 20 62 79 20 74 68 65 20 54 43 4c 4b 49 54 20 65   by the TCLKIT e
2000: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61  nvironment varia
2010: 62 6c 65 20 28 6f 72 0a 09 20 20 20 22 74 63 6c  ble (or..   "tcl
2020: 6b 69 74 22 20 69 66 20 74 68 61 74 20 76 61 72  kit" if that var
2030: 69 61 62 6c 65 20 69 73 20 6e 6f 74 20 73 65 74  iable is not set
2040: 29 20 69 66 20 69 74 20 69 73 20 66 75 6e 63 74  ) if it is funct
2050: 69 6f 6e 61 6c 3b 20 6f 72 0a 09 32 2e 20 54 68  ional; or..2. Th
2060: 65 20 62 75 69 6c 74 20 54 63 6c 6b 69 74 20 69  e built Tclkit i
2070: 74 73 65 6c 66 0a 0a 54 68 65 20 73 65 63 6f 6e  tself..The secon
2080: 64 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 6e 6f  d method will no
2090: 74 20 77 6f 72 6b 20 69 66 20 74 68 65 20 62 75  t work if the bu
20a0: 69 6c 74 20 54 63 6c 6b 69 74 20 69 73 20 6e 6f  ilt Tclkit is no
20b0: 74 20 65 78 65 63 75 74 61 62 6c 65 20 6f 6e 20  t executable on 
20c0: 74 68 65 0a 63 75 72 72 65 6e 74 20 70 6c 61 74  the.current plat
20d0: 66 6f 72 6d 20 28 69 2e 65 2e 2c 20 69 6e 20 74  form (i.e., in t
20e0: 68 65 20 63 61 73 65 20 6f 66 20 63 72 6f 73 73  he case of cross
20f0: 2d 63 6f 6d 70 69 6c 61 74 69 6f 6e 29 20 61 6e  -compilation) an
2100: 64 20 73 6f 20 69 74 20 6d 61 79 20 62 65 0a 6e  d so it may be.n
2110: 65 63 65 73 73 61 72 79 20 74 6f 20 62 6f 6f 74  ecessary to boot
2120: 73 74 72 61 70 20 61 20 72 75 6e 6e 61 62 6c 65  strap a runnable
2130: 20 54 63 6c 6b 69 74 20 66 69 72 73 74 2e 0a 0a   Tclkit first...
2140: 4b 69 74 44 4c 4c 20 6d 6f 75 6e 74 73 20 74 68  KitDLL mounts th
2150: 65 20 56 46 53 20 66 6f 72 20 65 76 65 72 79 20  e VFS for every 
2160: 69 6e 74 65 72 70 72 65 74 65 72 20 74 68 61 74  interpreter that
2170: 20 63 61 6c 6c 73 20 54 63 6c 5f 49 6e 69 74 28   calls Tcl_Init(
2180: 29 2e 20 20 54 68 65 20 73 79 73 74 65 6d 0a 56  ).  The system.V
2190: 46 53 20 74 68 61 74 20 69 73 20 63 72 65 61 74  FS that is creat
21a0: 65 64 20 61 74 20 62 75 69 6c 64 20 74 69 6d 65  ed at build time
21b0: 20 69 73 20 6d 6f 75 6e 74 65 64 20 61 74 20 2f   is mounted at /
21c0: 2e 4b 49 54 44 4c 4c 5f 54 43 4c 2e 20 20 41 64  .KITDLL_TCL.  Ad
21d0: 64 69 74 69 6f 6e 61 6c 6c 79 2c 0a 69 66 20 74  ditionally,.if t
21e0: 68 65 72 65 20 69 73 20 61 20 5a 49 50 20 66 69  here is a ZIP fi
21f0: 6c 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74  le appended to t
2200: 68 65 20 44 4c 4c 20 69 74 20 77 69 6c 6c 20 62  he DLL it will b
2210: 65 20 6d 6f 75 6e 74 65 64 20 61 74 20 2f 2e 4b  e mounted at /.K
2220: 49 54 44 4c 4c 5f 55 53 45 52 0a 61 6e 64 20 69  ITDLL_USER.and i
2230: 66 20 74 68 65 72 65 20 69 73 20 61 20 5a 49 50  f there is a ZIP
2240: 20 66 69 6c 65 20 61 70 70 65 6e 64 65 64 20 74   file appended t
2250: 6f 20 74 68 65 20 65 78 65 63 75 74 61 62 6c 65  o the executable
2260: 20 69 74 20 77 69 6c 6c 20 62 65 20 6d 6f 75 6e   it will be moun
2270: 74 65 64 20 61 74 0a 2f 2e 4b 49 54 44 4c 4c 5f  ted at./.KITDLL_
2280: 41 50 50 2e 20 20 41 6c 6c 20 56 46 53 65 73 20  APP.  All VFSes 
2290: 74 68 61 74 20 61 72 65 20 6d 6f 75 6e 74 65 64  that are mounted
22a0: 20 68 61 76 65 20 74 68 65 20 22 6c 69 62 22 20   have the "lib" 
22b0: 73 75 62 2d 64 69 72 65 63 74 6f 72 79 20 61 70  sub-directory ap
22c0: 70 65 6e 64 65 64 0a 74 6f 20 74 68 65 20 69 6e  pended.to the in
22d0: 74 65 72 70 72 65 74 65 72 73 20 22 61 75 74 6f  terpreters "auto
22e0: 5f 70 61 74 68 22 20 76 61 72 69 61 62 6c 65 2e  _path" variable.
22f0: 0a                                               .