Hex Artifact Content

Artifact d6d6daf6281fddc735b468f9cdf3e5eaf2bbf7c9:


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 3c 76 65 72 73 69 6f 6e 3e 20 7c 20 63   [{<version> | c
00b0: 76 73 5f 3c 63 76 73 54 61 67 3e 20 7c 20 63 6c  vs_<cvsTag> | cl
00c0: 65 61 6e 20 7c 20 64 69 73 74 63 6c 65 61 6e 7d  ean | distclean}
00d0: 5d 0a 09 20 20 20 20 20 20 20 20 20 20 20 5b 3c  ]..           [<
00e0: 63 6f 6e 66 69 67 75 72 65 5f 6f 70 74 69 6f 6e  configure_option
00f0: 73 2e 2e 2e 3e 5d 0a 0a 09 57 68 65 72 65 3a 0a  s...>]...Where:.
0100: 09 09 76 65 72 73 69 6f 6e 20 20 20 20 20 20 20  ..version       
0110: 20 20 20 20 20 69 73 20 61 20 54 63 6c 20 76 65       is a Tcl ve
0120: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 20 28 65 2e  rsion number (e.
0130: 67 2e 2c 20 38 2e 34 2e 31 39 29 0a 09 09 63 76  g., 8.4.19)...cv
0140: 73 54 61 67 20 20 20 20 20 20 20 20 20 20 20 20  sTag            
0150: 20 69 73 20 61 20 43 56 53 20 72 65 6c 65 61 73   is a CVS releas
0160: 65 20 74 61 67 20 28 65 2e 67 2e 2c 20 48 45 41  e tag (e.g., HEA
0170: 44 29 0a 09 09 63 6f 6e 66 69 67 75 72 65 5f 6f  D)...configure_o
0180: 70 74 69 6f 6e 73 20 20 61 72 65 20 6f 70 74 69  ptions  are opti
0190: 6f 6e 73 20 74 6f 20 70 61 73 73 20 74 6f 20 73  ons to pass to s
01a0: 75 62 6f 72 64 69 6e 61 74 65 20 63 6f 6e 66 69  ubordinate confi
01b0: 67 75 72 65 0a 09 09 20 20 20 20 20 20 20 20 20  gure...         
01c0: 20 20 20 20 20 20 20 20 20 20 73 63 72 69 70 74            script
01d0: 73 20 28 65 2e 67 2e 2c 20 2d 2d 65 6e 61 62 6c  s (e.g., --enabl
01e0: 65 2d 36 34 62 69 74 29 0a 0a 09 44 65 66 61 75  e-64bit)...Defau
01f0: 6c 74 20 69 73 20 74 6f 20 63 72 65 61 74 65 20  lt is to create 
0200: 61 20 54 63 6c 6b 69 74 20 66 72 6f 6d 20 54 63  a Tclkit from Tc
0210: 6c 20 76 65 72 73 69 6f 6e 20 38 2e 34 2e 31 39  l version 8.4.19
0220: 0a 0a 45 78 61 6d 70 6c 65 73 3a 0a 09 31 2e 20  ..Examples:..1. 
0230: 43 72 65 61 74 65 20 61 20 54 63 6c 6b 69 74 3a  Create a Tclkit:
0240: 0a 09 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65  ...a. $ ./kitcre
0250: 61 74 6f 72 0a 0a 09 32 2e 20 43 72 65 61 74 65  ator...2. Create
0260: 20 61 20 54 63 6c 6b 69 74 20 66 6f 72 20 54 63   a Tclkit for Tc
0270: 6c 20 38 2e 35 2e 38 3a 0a 09 09 61 2e 20 24 20  l 8.5.8:...a. $ 
0280: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 38 2e 35  ./kitcreator 8.5
0290: 2e 38 0a 0a 09 33 2e 20 43 72 65 61 74 65 20 61  .8...3. Create a
02a0: 20 54 63 6c 6b 69 74 20 66 6f 72 20 54 63 6c 20   Tclkit for Tcl 
02b0: 66 72 6f 6d 20 43 56 53 20 48 45 41 44 3a 0a 09  from CVS HEAD:..
02c0: 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74  .a. $ ./kitcreat
02d0: 6f 72 20 63 76 73 5f 48 45 41 44 0a 0a 09 34 2e  or cvs_HEAD...4.
02e0: 20 43 6f 6d 70 69 6c 65 20 61 20 36 34 2d 62 69   Compile a 64-bi
02f0: 74 20 54 63 6c 6b 69 74 3a 0a 09 09 61 2e 20 24  t Tclkit:...a. $
0300: 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d 2d   ./kitcreator --
0310: 65 6e 61 62 6c 65 2d 36 34 62 69 74 0a 0a 09 35  enable-64bit...5
0320: 2e 20 43 72 6f 73 73 2d 63 6f 6d 70 69 6c 65 20  . Cross-compile 
0330: 61 20 54 63 6c 6b 69 74 3a 0a 09 09 61 2e 20 42  a Tclkit:...a. B
0340: 6f 6f 74 73 74 72 61 70 20 28 6f 70 74 69 6f 6e  ootstrap (option
0350: 61 6c 2c 20 79 6f 75 20 63 61 6e 20 75 73 65 20  al, you can use 
0360: 61 6e 20 65 78 69 73 74 69 6e 67 20 54 63 6c 6b  an existing Tclk
0370: 69 74 29 3a 0a 09 09 09 69 2e 20 20 20 24 20 2e  it):....i.   $ .
0380: 2f 6b 69 74 63 72 65 61 74 6f 72 0a 09 09 09 69  /kitcreator....i
0390: 69 2e 20 20 24 20 6d 76 20 74 63 6c 6b 69 74 2d  i.  $ mv tclkit-
03a0: 38 2e 34 2e 31 39 20 74 63 6c 6b 69 74 2d 6c 6f  8.4.19 tclkit-lo
03b0: 63 61 6c 0a 09 09 09 69 69 69 2e 20 24 20 54 43  cal....iii. $ TC
03c0: 4c 4b 49 54 3d 22 60 70 77 64 60 2f 74 63 6c 6b  LKIT="`pwd`/tclk
03d0: 69 74 2d 6c 6f 63 61 6c 22 0a 09 09 09 69 76 2e  it-local"....iv.
03e0: 20 20 24 20 65 78 70 6f 72 74 20 54 43 4c 4b 49    $ export TCLKI
03f0: 54 0a 09 09 62 2e 20 43 72 6f 73 73 2d 63 6f 6d  T...b. Cross-com
0400: 70 69 6c 65 3a 0a 09 09 09 69 2e 20 20 20 24 20  pile:....i.   $ 
0410: 43 43 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78 2d  CC=mipsel-linux-
0420: 75 63 6c 69 62 63 2d 67 63 63 0a 09 09 09 69 69  uclibc-gcc....ii
0430: 2e 20 20 24 20 43 58 58 3d 66 61 6c 73 65 0a 09  .  $ CXX=false..
0440: 09 09 69 69 69 2e 20 24 20 41 52 3d 6d 69 70 73  ..iii. $ AR=mips
0450: 65 6c 2d 6c 69 6e 75 78 2d 75 63 6c 69 62 63 2d  el-linux-uclibc-
0460: 61 72 0a 09 09 09 69 76 2e 20 20 24 20 52 41 4e  ar....iv.  $ RAN
0470: 4c 49 42 3d 6d 69 70 73 65 6c 2d 6c 69 6e 75 78  LIB=mipsel-linux
0480: 2d 75 63 6c 69 62 63 2d 72 61 6e 6c 69 62 0a 09  -uclibc-ranlib..
0490: 09 09 76 2e 20 20 20 24 20 65 78 70 6f 72 74 20  ..v.   $ export 
04a0: 43 43 20 43 58 58 20 41 52 20 52 41 4e 4c 49 42  CC CXX AR RANLIB
04b0: 0a 09 09 76 2e 20 20 20 24 20 2e 2f 6b 69 74 63  ...v.   $ ./kitc
04c0: 72 65 61 74 6f 72 20 2d 2d 68 6f 73 74 3d 6d 69  reator --host=mi
04d0: 70 73 65 6c 2d 6c 69 6e 75 78 2d 75 63 6c 69 62  psel-linux-uclib
04e0: 63 0a 0a 09 36 2e 20 43 6f 6d 70 69 6c 65 20 61  c...6. Compile a
04f0: 20 36 34 2d 62 69 74 20 54 63 6c 6b 69 74 20 38   64-bit Tclkit 8
0500: 2e 35 2e 38 20 75 73 69 6e 67 20 53 75 6e 53 74  .5.8 using SunSt
0510: 75 64 69 6f 20 31 32 2e 31 20 6f 6e 20 53 6f 6c  udio 12.1 on Sol
0520: 61 72 69 73 2f 78 38 36 3a 0a 09 09 61 2e 20 24  aris/x86:...a. $
0530: 20 43 43 3d 27 2f 6f 70 74 2f 73 75 6e 73 74 75   CC='/opt/sunstu
0540: 64 69 6f 31 32 2e 31 2f 62 69 6e 2f 63 63 20 2d  dio12.1/bin/cc -
0550: 6d 36 34 27 0a 09 09 62 2e 20 24 20 43 58 58 3d  m64'...b. $ CXX=
0560: 27 2f 6f 70 74 2f 73 75 6e 73 74 75 64 69 6f 31  '/opt/sunstudio1
0570: 32 2e 31 2f 62 69 6e 2f 43 43 20 2d 6d 36 34 27  2.1/bin/CC -m64'
0580: 0a 09 09 63 2e 20 24 20 50 41 54 43 48 3d 27 67  ...c. $ PATCH='g
0590: 70 61 74 63 68 27 0a 09 09 63 2e 20 24 20 65 78  patch'...c. $ ex
05a0: 70 6f 72 74 20 43 43 20 43 58 58 20 50 41 54 43  port CC CXX PATC
05b0: 48 0a 09 09 64 2e 20 24 20 2e 2f 6b 69 74 63 72  H...d. $ ./kitcr
05c0: 65 61 74 6f 72 20 38 2e 35 2e 38 20 2d 2d 65 6e  eator 8.5.8 --en
05d0: 61 62 6c 65 2d 36 34 62 69 74 0a 0a 09 37 2e 20  able-64bit...7. 
05e0: 54 6f 20 63 6c 65 61 6e 20 75 70 20 70 6f 73 74  To clean up post
05f0: 2d 62 75 69 6c 64 3a 0a 09 09 61 2e 20 24 20 2e  -build:...a. $ .
0600: 2f 6b 69 74 63 72 65 61 74 6f 72 20 63 6c 65 61  /kitcreator clea
0610: 6e 0a 0a 09 38 2e 20 43 72 65 61 74 65 20 61 20  n...8. Create a 
0620: 54 63 6c 6b 69 74 20 77 69 74 68 6f 75 74 20 4d  Tclkit without M
0630: 65 74 61 6b 69 74 34 20 73 75 70 70 6f 72 74 20  etakit4 support 
0640: 28 66 61 6c 6c 73 20 62 61 63 6b 20 74 6f 20 5a  (falls back to Z
0650: 69 70 20 66 6f 72 20 73 74 6f 72 61 67 65 29 3a  ip for storage):
0660: 0a 09 09 61 2e 20 4b 49 54 43 52 45 41 54 4f 52  ...a. KITCREATOR
0670: 5f 50 4b 47 53 3d 27 74 6b 20 69 74 63 6c 27 0a  _PKGS='tk itcl'.
0680: 09 09 62 2e 20 65 78 70 6f 72 74 20 4b 49 54 43  ..b. export KITC
0690: 52 45 41 54 4f 52 5f 50 4b 47 53 0a 09 09 63 2e  REATOR_PKGS...c.
06a0: 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 0a 0a 09   ./kitcreator...
06b0: 39 2e 20 43 72 65 61 74 65 20 61 20 54 63 6c 6b  9. Create a Tclk
06c0: 69 74 20 77 69 74 68 20 4d 65 74 61 6b 69 74 34  it with Metakit4
06d0: 20 73 75 70 70 6f 72 74 2c 20 62 75 74 20 75 73   support, but us
06e0: 69 6e 67 20 5a 69 70 20 66 6f 72 20 73 74 6f 72  ing Zip for stor
06f0: 61 67 65 3a 0a 09 09 61 2e 20 24 20 2e 2f 6b 69  age:...a. $ ./ki
0700: 74 63 72 65 61 74 6f 72 20 2d 2d 65 6e 61 62 6c  tcreator --enabl
0710: 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7a 69  e-kit-storage=zi
0720: 70 0a 0a 09 31 30 2e 20 43 72 65 61 74 65 20 61  p...10. Create a
0730: 20 54 63 6c 6b 69 74 20 77 69 74 68 20 4d 65 74   Tclkit with Met
0740: 61 6b 69 74 34 20 73 75 70 70 6f 72 74 2c 20 62  akit4 support, b
0750: 75 74 20 75 73 69 6e 67 20 43 2d 56 46 53 20 66  ut using C-VFS f
0760: 6f 72 20 73 74 6f 72 61 67 65 0a 09 09 61 2e 20  or storage...a. 
0770: 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d  $ ./kitcreator -
0780: 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72  -enable-kit-stor
0790: 61 67 65 3d 63 76 66 73 0a 0a 09 31 31 2e 20 43  age=cvfs...11. C
07a0: 72 65 61 74 65 20 61 20 4b 69 74 44 4c 4c 20 77  reate a KitDLL w
07b0: 69 74 68 6f 75 74 20 4d 65 74 61 6b 69 74 20 73  ithout Metakit s
07c0: 75 70 70 6f 72 74 20 28 77 69 6c 6c 20 6e 6f 74  upport (will not
07d0: 20 63 72 65 61 74 65 20 61 20 54 63 6c 6b 69 74   create a Tclkit
07e0: 0a 09 20 20 20 20 62 69 6e 61 72 79 2c 20 6a 75  ..    binary, ju
07f0: 73 74 20 74 68 65 20 6c 69 62 72 61 72 79 29 3a  st the library):
0800: 0a 09 09 61 2e 20 24 20 4b 49 54 43 52 45 41 54  ...a. $ KITCREAT
0810: 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74 63 6c  OR_PKGS='tk itcl
0820: 20 6b 69 74 64 6c 6c 27 0a 09 09 62 2e 20 24 20   kitdll'...b. $ 
0830: 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f  export KITCREATO
0840: 52 5f 50 4b 47 53 0a 09 09 63 2e 20 24 20 2e 2f  R_PKGS...c. $ ./
0850: 6b 69 74 63 72 65 61 74 6f 72 0a 0a 45 6e 76 69  kitcreator..Envi
0860: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
0870: 73 3a 0a 09 31 2e 20 4d 41 4b 45 0a 09 09 53 70  s:..1. MAKE...Sp
0880: 65 63 69 66 69 65 73 20 74 68 65 20 74 6f 6f 6c  ecifies the tool
0890: 20 79 6f 75 20 77 69 73 68 20 74 6f 20 62 65 20   you wish to be 
08a0: 63 61 6c 6c 65 64 20 74 6f 20 62 75 69 6c 64 20  called to build 
08b0: 74 61 72 67 65 74 73 0a 09 09 66 72 6f 6d 20 61  targets...from a
08c0: 20 4d 61 6b 65 66 69 6c 65 2e 20 20 54 68 69 73   Makefile.  This
08d0: 20 73 63 72 69 70 74 20 69 73 20 67 65 6e 65 72   script is gener
08e0: 61 6c 6c 79 20 6d 6f 72 65 20 77 65 6c 6c 20 74  ally more well t
08f0: 65 73 74 65 64 0a 09 09 77 69 74 68 20 47 4e 55  ested...with GNU
0900: 20 4d 61 6b 65 2e 0a 0a 09 32 2e 20 50 41 54 43   Make....2. PATC
0910: 48 0a 09 09 53 70 65 63 69 66 69 65 73 20 74 68  H...Specifies th
0920: 65 20 74 6f 6f 6c 20 79 6f 75 20 77 69 73 68 20  e tool you wish 
0930: 74 6f 20 62 65 20 63 61 6c 6c 65 64 20 74 6f 20  to be called to 
0940: 61 70 70 6c 79 20 75 6e 69 66 69 65 64 0a 09 09  apply unified...
0950: 64 69 66 66 20 70 61 74 63 68 65 73 2e 20 20 54  diff patches.  T
0960: 68 69 73 20 73 63 72 69 70 74 20 69 73 20 67 65  his script is ge
0970: 6e 65 72 61 6c 6c 79 20 6d 6f 72 65 20 77 65 6c  nerally more wel
0980: 6c 20 74 65 73 74 65 64 20 77 69 74 68 0a 09 09  l tested with...
0990: 47 4e 55 20 50 61 74 63 68 2e 20 0a 0a 09 33 2e  GNU Patch. ...3.
09a0: 20 54 43 4c 4b 49 54 0a 09 09 53 70 65 63 69 66   TCLKIT...Specif
09b0: 79 20 74 68 65 20 70 61 74 68 20 74 6f 20 61 20  y the path to a 
09c0: 54 63 6c 6b 69 74 20 74 68 61 74 20 69 73 20 72  Tclkit that is r
09d0: 75 6e 6e 61 62 6c 65 20 6f 6e 20 74 68 65 20 63  unnable on the c
09e0: 75 72 72 65 6e 74 0a 09 09 73 79 73 74 65 6d 2e  urrent...system.
09f0: 20 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73    The default is
0a00: 20 22 74 63 6c 6b 69 74 22 2e 20 20 41 20 77 6f   "tclkit".  A wo
0a10: 72 6b 69 6e 67 20 74 63 6c 6b 69 74 20 69 73 20  rking tclkit is 
0a20: 72 65 71 75 69 72 65 64 0a 09 09 66 6f 72 20 63  required...for c
0a30: 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 20 54  ross-compiling T
0a40: 63 6c 6b 69 74 73 2e 0a 0a 09 34 2e 20 53 54 41  clkits....4. STA
0a50: 54 49 43 54 4b 0a 09 09 53 70 65 63 69 66 79 20  TICTK...Specify 
0a60: 74 68 69 73 20 61 73 20 22 31 22 20 74 6f 20 73  this as "1" to s
0a70: 74 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74  tatically link t
0a80: 6f 20 54 6b 2e 20 20 54 68 65 20 64 65 66 61 75  o Tk.  The defau
0a90: 6c 74 0a 09 09 61 63 74 69 6f 6e 20 6f 6e 20 6d  lt...action on m
0aa0: 6f 73 74 20 70 6c 61 74 66 6f 72 6d 73 20 69 73  ost platforms is
0ab0: 20 74 6f 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20   to dynamically 
0ac0: 6c 69 6e 6b 20 74 6f 20 54 6b 2e 20 20 57 68 65  link to Tk.  Whe
0ad0: 6e 0a 09 09 62 75 69 6c 64 69 6e 67 20 4b 69 74  n...building Kit
0ae0: 44 4c 4c 2c 20 53 54 41 54 49 43 54 4b 20 69 73  DLL, STATICTK is
0af0: 20 22 31 22 20 62 79 20 64 65 66 61 75 6c 74 2e   "1" by default.
0b00: 20 20 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f    If you want to
0b10: 0a 09 09 65 6e 61 62 6c 65 20 64 79 6e 61 6d 69  ...enable dynami
0b20: 63 20 6c 69 6e 6b 69 6e 67 20 6f 66 20 54 6b 20  c linking of Tk 
0b30: 77 69 74 68 20 4b 69 74 44 4c 4c 20 79 6f 75 20  with KitDLL you 
0b40: 77 69 6c 6c 20 68 61 76 65 20 74 6f 0a 09 09 73  will have to...s
0b50: 70 65 63 69 66 79 20 74 68 69 73 20 61 73 20 22  pecify this as "
0b60: 2d 31 22 2e 0a 0a 09 35 2e 20 53 54 41 54 49 43  -1"....5. STATIC
0b70: 4d 4b 34 0a 09 09 53 70 65 63 69 66 79 20 74 68  MK4...Specify th
0b80: 69 73 20 61 73 20 22 30 22 20 74 6f 20 61 74 74  is as "0" to att
0b90: 65 6d 70 74 20 74 6f 20 63 72 65 61 74 65 20 63  empt to create c
0ba0: 72 65 61 74 65 20 74 68 65 20 22 6d 6b 34 74 63  reate the "mk4tc
0bb0: 6c 22 0a 09 09 70 72 6f 6a 65 63 74 20 61 73 20  l"...project as 
0bc0: 61 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 2e  a shared object.
0bd0: 20 20 49 66 20 74 68 69 73 20 66 61 69 6c 73 2c    If this fails,
0be0: 20 69 74 20 77 69 6c 6c 20 66 61 6c 6c 20 62 61   it will fall ba
0bf0: 63 6b 0a 09 09 74 6f 20 62 75 69 6c 64 69 6e 67  ck...to building
0c00: 20 73 74 61 74 69 63 61 6c 6c 79 2e 20 20 53 70   statically.  Sp
0c10: 65 63 69 66 79 20 69 74 20 61 73 20 22 2d 31 22  ecify it as "-1"
0c20: 20 74 6f 20 66 6f 72 63 65 20 62 75 69 6c 64 69   to force buildi
0c30: 6e 67 0a 09 09 69 74 20 61 73 20 61 20 73 68 61  ng...it as a sha
0c40: 72 65 64 20 6f 62 6a 65 63 74 2e 20 20 41 6e 79  red object.  Any
0c50: 20 6f 74 68 65 72 20 76 61 6c 75 65 2c 20 69 6e   other value, in
0c60: 63 6c 75 64 69 6e 67 20 62 65 69 6e 67 20 75 6e  cluding being un
0c70: 73 65 74 0a 09 09 72 65 73 75 6c 74 73 20 69 6e  set...results in
0c80: 20 22 6d 6b 34 74 63 6c 22 20 62 65 69 6e 67 20   "mk4tcl" being 
0c90: 62 75 69 6c 74 20 61 6e 64 20 6c 69 6e 6b 65 64  built and linked
0ca0: 20 73 74 61 74 69 63 61 6c 6c 79 2e 20 20 4b 69   statically.  Ki
0cb0: 74 44 49 4c 4c 0a 09 09 73 65 74 73 20 74 68 69  tDILL...sets thi
0cc0: 73 20 74 6f 20 76 61 72 69 61 62 6c 65 20 74 6f  s to variable to
0cd0: 20 22 30 22 2e 20 20 49 66 20 4d 65 74 61 6b 69   "0".  If Metaki
0ce0: 74 34 20 69 73 20 62 75 69 6c 74 20 73 68 61 72  t4 is built shar
0cf0: 65 64 2c 20 69 74 0a 09 09 63 61 6e 6e 6f 74 20  ed, it...cannot 
0d00: 62 65 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  be used for the 
0d10: 6b 69 74 20 73 74 6f 72 61 67 65 20 66 6f 72 20  kit storage for 
0d20: 54 63 6c 6b 69 74 2e 0a 0a 09 36 2e 20 53 54 52  Tclkit....6. STR
0d30: 49 50 0a 09 09 53 70 65 63 69 66 69 65 73 20 74  IP...Specifies t
0d40: 68 65 20 74 6f 6f 6c 20 79 6f 75 20 77 69 73 68  he tool you wish
0d50: 20 74 6f 20 62 65 20 63 61 6c 6c 65 64 20 74 6f   to be called to
0d60: 20 73 74 72 69 70 20 6f 62 6a 65 63 74 20 66 69   strip object fi
0d70: 6c 65 73 2c 0a 09 09 61 72 63 68 69 76 65 73 2c  les,...archives,
0d80: 20 61 6e 64 20 73 68 61 72 65 64 20 6f 62 6a 65   and shared obje
0d90: 63 74 73 2e 20 20 54 68 65 20 64 65 66 61 75 6c  cts.  The defaul
0da0: 74 20 69 73 20 22 73 74 72 69 70 22 2e 20 20 59  t is "strip".  Y
0db0: 6f 75 0a 09 09 73 68 6f 75 6c 64 20 70 72 6f 62  ou...should prob
0dc0: 61 62 6c 79 20 73 65 74 20 74 68 69 73 20 69 66  ably set this if
0dd0: 20 79 6f 75 20 61 72 65 20 63 72 6f 73 73 2d 63   you are cross-c
0de0: 6f 6d 70 69 6c 69 6e 67 2e 0a 0a 09 37 2e 20 4b  ompiling....7. K
0df0: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a 09  ITCREATOR_PKGS..
0e00: 09 53 70 65 63 69 66 79 20 77 68 69 63 68 20 6e  .Specify which n
0e10: 6f 6e 2d 72 65 71 75 69 72 65 64 20 70 61 63 6b  on-required pack
0e20: 61 67 65 73 20 74 6f 20 62 75 69 6c 64 2e 20 20  ages to build.  
0e30: 54 68 65 20 64 65 66 61 75 6c 74 20 6c 69 73 74  The default list
0e40: 0a 09 09 69 73 3a 0a 09 09 09 74 6b 20 69 74 63  ...is:....tk itc
0e50: 6c 20 6d 6b 34 74 63 6c 0a 0a 09 09 49 66 20 6d  l mk4tcl....If m
0e60: 6b 34 74 63 6c 20 69 73 20 6e 6f 74 20 70 72 65  k4tcl is not pre
0e70: 73 65 6e 74 20 61 20 5a 69 70 2d 62 61 73 65 64  sent a Zip-based
0e80: 20 73 74 6f 72 61 67 65 20 6d 65 63 68 61 6e 69   storage mechani
0e90: 73 6d 20 77 69 6c 6c 20 62 65 0a 09 09 75 73 65  sm will be...use
0ea0: 64 20 69 6e 73 74 65 61 64 2e 20 20 54 6f 20 73  d instead.  To s
0eb0: 70 65 63 69 66 79 20 74 68 61 74 20 74 68 65 20  pecify that the 
0ec0: 64 65 66 61 75 6c 74 20 62 65 20 75 73 65 64 2c  default be used,
0ed0: 20 64 6f 20 6e 6f 74 20 73 65 74 0a 09 09 74 68   do not set...th
0ee0: 69 73 20 6f 72 20 73 65 74 20 69 74 20 74 6f 20  is or set it to 
0ef0: 74 68 65 20 65 6d 70 74 79 20 73 74 72 69 6e 67  the empty string
0f00: 2e 20 20 54 6f 20 73 70 65 63 69 66 79 20 74 68  .  To specify th
0f10: 61 74 20 6e 6f 0a 09 09 6e 6f 6e 2d 72 65 71 75  at no...non-requ
0f20: 69 72 65 64 20 70 61 63 6b 61 67 65 73 20 62 65  ired packages be
0f30: 20 62 75 69 6c 74 2c 20 73 65 74 20 69 74 20 74   built, set it t
0f40: 6f 20 61 20 73 74 72 69 6e 67 20 74 68 61 74 0a  o a string that.
0f50: 09 09 63 6f 6e 74 61 69 6e 73 20 6f 6e 6c 79 20  ..contains only 
0f60: 77 68 69 74 65 20 73 70 61 63 65 2e 0a 0a 09 09  white space.....
0f70: 49 66 20 22 6b 69 74 64 6c 6c 22 20 69 73 20 73  If "kitdll" is s
0f80: 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20  pecified in the 
0f90: 6c 69 73 74 20 74 68 65 20 74 61 72 67 65 74 20  list the target 
0fa0: 62 65 63 6f 6d 65 73 20 4b 69 74 44 4c 4c 0a 09  becomes KitDLL..
0fb0: 09 61 6e 64 20 6e 6f 20 54 63 6c 6b 69 74 20 77  .and no Tclkit w
0fc0: 69 6c 6c 20 62 75 69 6c 74 2c 20 62 75 74 20 69  ill built, but i
0fd0: 6e 73 74 65 61 64 20 6c 69 62 74 63 6c 6b 69 74  nstead libtclkit
0fe0: 2e 0a 0a 09 38 2e 20 4b 49 54 43 52 45 41 54 4f  ....8. KITCREATO
0ff0: 52 5f 4d 49 4e 45 4e 43 4f 44 49 4e 47 53 0a 09  R_MINENCODINGS..
1000: 09 53 65 74 20 74 68 69 73 20 76 61 72 69 61 62  .Set this variab
1010: 6c 65 20 74 6f 20 61 20 6e 6f 6e 2d 65 6d 70 74  le to a non-empt
1020: 79 20 73 74 72 69 6e 67 20 74 6f 20 67 65 6e 65  y string to gene
1030: 72 61 74 65 20 61 20 54 63 6c 6b 69 74 0a 09 09  rate a Tclkit...
1040: 77 69 74 68 6f 75 74 20 61 6c 6c 20 65 6e 63 6f  without all enco
1050: 64 69 6e 67 73 2c 20 6f 6e 6c 79 20 69 6e 63 6c  dings, only incl
1060: 75 64 69 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77  uding the follow
1070: 69 6e 67 3a 0a 09 09 09 61 73 63 69 69 2e 65 6e  ing:....ascii.en
1080: 63 20 63 70 31 32 35 32 2e 65 6e 63 20 69 73 6f  c cp1252.enc iso
1090: 38 38 35 39 2d 31 2e 65 6e 63 20 69 73 6f 38 38  8859-1.enc iso88
10a0: 35 39 2d 31 35 2e 65 6e 63 0a 09 09 09 69 73 6f  59-15.enc....iso
10b0: 38 38 35 39 2d 32 2e 65 6e 63 20 6b 6f 69 38 2d  8859-2.enc koi8-
10c0: 72 2e 65 6e 63 20 6d 61 63 52 6f 6d 61 6e 2e 65  r.enc macRoman.e
10d0: 6e 63 0a 0a 09 39 2e 20 4b 49 54 43 52 45 41 54  nc...9. KITCREAT
10e0: 4f 52 5f 4d 49 4e 42 55 49 4c 44 0a 09 09 53 65  OR_MINBUILD...Se
10f0: 74 20 74 68 69 73 20 76 61 72 69 61 62 6c 65 20  t this variable 
1100: 74 6f 20 61 20 6e 6f 6e 2d 65 6d 70 74 79 20 73  to a non-empty s
1110: 74 72 69 6e 67 20 74 6f 20 65 78 63 6c 75 64 65  tring to exclude
1120: 20 75 6e 6e 65 63 65 73 73 61 72 79 0a 09 09 70   unnecessary...p
1130: 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 54 63 6c  ackages from Tcl
1140: 20 62 75 69 6c 64 2e 20 20 54 68 69 73 20 65 78   build.  This ex
1150: 63 6c 75 64 65 73 20 74 68 65 20 66 6f 6c 6c 6f  cludes the follo
1160: 77 69 6e 67 20 70 61 63 6b 61 67 65 73 3a 0a 09  wing packages:..
1170: 09 09 74 63 6c 74 65 73 74 0a 0a 09 09 41 64 64  ..tcltest....Add
1180: 69 74 69 6f 6e 61 6c 6c 79 2c 20 61 6e 79 20 62  itionally, any b
1190: 75 6e 64 6c 65 64 20 70 61 63 6b 61 67 65 73 20  undled packages 
11a0: 28 69 6e 20 74 68 65 20 22 70 6b 67 73 22 20 64  (in the "pkgs" d
11b0: 69 72 65 63 74 6f 72 79 29 0a 09 09 61 72 65 20  irectory)...are 
11c0: 65 78 63 6c 75 64 65 64 2e 20 20 54 68 69 73 20  excluded.  This 
11d0: 74 79 70 69 63 61 6c 6c 79 20 69 6e 63 6c 75 64  typically includ
11e0: 65 73 20 28 61 73 20 6f 66 20 54 63 6c 20 38 2e  es (as of Tcl 8.
11f0: 36 29 3a 0a 09 09 09 69 74 63 6c 20 74 68 72 65  6):....itcl thre
1200: 61 64 0a 0a 4b 69 74 73 68 20 43 6f 6e 66 69 67  ad..Kitsh Config
1210: 75 72 65 20 4f 70 74 69 6f 6e 73 3a 0a 09 31 2e  ure Options:..1.
1220: 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 74   --enable-kit-st
1230: 6f 72 61 67 65 3d 7b 7a 69 70 7c 6d 6b 34 7c 61  orage={zip|mk4|a
1240: 75 74 6f 7d 0a 09 09 53 70 65 63 69 66 79 20 77  uto}...Specify w
1250: 68 69 63 68 20 74 79 70 65 20 6f 66 20 73 74 6f  hich type of sto
1260: 72 61 67 65 20 74 6f 20 75 73 65 20 77 69 74 68  rage to use with
1270: 20 74 68 65 20 54 63 6c 6b 69 74 2e 20 20 54 68   the Tclkit.  Th
1280: 65 0a 09 09 64 65 66 61 75 6c 74 20 69 73 20 74  e...default is t
1290: 6f 20 61 75 74 6f 2d 64 65 74 65 63 74 2e 20 20  o auto-detect.  
12a0: 41 75 74 6f 2d 64 65 74 65 63 74 69 6f 6e 20 75  Auto-detection u
12b0: 73 65 73 20 4d 6b 34 20 69 66 0a 09 09 61 76 61  ses Mk4 if...ava
12c0: 69 6c 61 62 6c 65 20 61 6e 64 20 62 75 69 6c 74  ilable and built
12d0: 20 73 74 61 74 69 63 61 6c 6c 79 2c 20 6f 74 68   statically, oth
12e0: 65 72 77 69 73 65 20 69 74 20 66 61 6c 6c 73 20  erwise it falls 
12f0: 62 61 63 6b 20 74 6f 20 5a 69 70 2e 0a 0a 2d 2d  back to Zip...--
1300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1310: 2d 2d 0a 55 73 69 6e 67 20 74 68 65 20 4b 69 74  --.Using the Kit
1320: 44 4c 4c 20 53 44 4b 0a 2d 2d 2d 2d 2d 2d 2d 2d  DLL SDK.--------
1330: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 57 68 65  ------------.Whe
1340: 6e 20 79 6f 75 20 62 75 69 6c 64 20 61 20 4b 69  n you build a Ki
1350: 74 44 4c 4c 2c 20 61 20 22 6c 69 62 74 63 6c 6b  tDLL, a "libtclk
1360: 69 74 2d 73 64 6b 2d 3c 74 63 6c 76 65 72 73 3e  it-sdk-<tclvers>
1370: 2e 74 61 72 2e 67 7a 22 20 74 61 72 62 61 6c 6c  .tar.gz" tarball
1380: 20 69 73 20 61 6c 73 6f 0a 70 72 6f 64 75 63 65   is also.produce
1390: 64 2e 20 20 54 68 69 73 20 74 61 72 62 61 6c 6c  d.  This tarball
13a0: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 54 63   contains the Tc
13b0: 6c 20 28 61 6e 64 20 54 6b 2c 20 69 66 20 63 6f  l (and Tk, if co
13c0: 6d 70 69 6c 65 64 29 20 73 74 75 62 73 20 6c 69  mpiled) stubs li
13d0: 62 72 61 72 69 65 73 2c 0a 61 6e 64 20 54 63 6c  braries,.and Tcl
13e0: 20 28 61 6e 64 20 54 6b 2c 20 69 66 20 63 6f 6d   (and Tk, if com
13f0: 70 69 6c 65 64 29 20 68 65 61 64 65 72 20 66 69  piled) header fi
1400: 6c 65 73 20 6e 65 65 64 65 64 20 74 6f 20 63 6f  les needed to co
1410: 6d 70 69 6c 65 20 61 6e 64 20 6c 69 6e 6b 20 74  mpile and link t
1420: 68 69 6e 67 73 0a 61 67 61 69 6e 73 74 20 54 63  hings.against Tc
1430: 6c 20 28 61 6e 64 20 54 6b 29 2e 20 20 49 74 20  l (and Tk).  It 
1440: 61 6c 73 6f 20 69 6e 63 6c 75 64 65 73 20 22 74  also includes "t
1450: 63 6c 43 6f 6e 66 69 67 2e 73 68 22 20 28 61 6e  clConfig.sh" (an
1460: 64 20 22 74 6b 43 6f 6e 66 69 67 2e 73 68 22 2c  d "tkConfig.sh",
1470: 20 69 66 0a 54 6b 20 77 61 73 20 63 6f 6d 70 69   if.Tk was compi
1480: 6c 65 64 29 2e 0a 0a 54 68 65 20 70 75 72 70 6f  led)...The purpo
1490: 73 65 20 66 6f 72 20 74 68 69 73 20 74 61 72 62  se for this tarb
14a0: 61 6c 6c 20 69 73 20 74 6f 20 62 65 20 75 73 65  all is to be use
14b0: 64 20 74 6f 20 62 75 69 6c 64 20 54 63 6c 20 65  d to build Tcl e
14c0: 78 74 65 6e 73 69 6f 6e 73 20 6f 72 0a 61 70 70  xtensions or.app
14d0: 6c 69 63 61 74 69 6f 6e 73 20 74 68 61 74 20 72  lications that r
14e0: 65 6c 79 20 6f 6e 20 54 63 6c 2f 54 6b 20 75 73  ely on Tcl/Tk us
14f0: 69 6e 67 20 74 68 65 20 4b 69 74 44 4c 4c 2e 0a  ing the KitDLL..
1500: 0a 54 6f 20 75 73 65 20 69 74 2c 20 6f 6e 65 20  .To use it, one 
1510: 66 69 72 73 74 20 6d 75 73 74 20 65 78 74 72 61  first must extra
1520: 63 74 20 74 68 65 20 74 61 72 62 61 6c 6c 2e 20  ct the tarball. 
1530: 20 41 66 74 65 72 20 74 68 61 74 20 74 68 65 20   After that the 
1540: 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69  environment.vari
1550: 61 62 6c 65 20 22 54 43 4c 4b 49 54 5f 53 44 4b  able "TCLKIT_SDK
1560: 5f 44 49 52 22 20 6d 75 73 74 20 62 65 20 73 65  _DIR" must be se
1570: 74 20 74 6f 20 74 68 65 20 64 69 72 65 63 74 6f  t to the directo
1580: 72 79 20 74 68 61 74 20 77 61 73 20 63 72 65 61  ry that was crea
1590: 74 65 64 20 69 6e 0a 6f 72 64 65 72 20 74 6f 20  ted in.order to 
15a0: 6d 61 6b 65 20 6d 6f 73 74 20 6f 66 20 74 68 65  make most of the
15b0: 20 76 61 72 69 61 62 6c 65 73 20 63 6f 6e 74 61   variables conta
15c0: 69 6e 20 75 73 65 66 75 6c 20 76 61 6c 75 65 73  in useful values
15d0: 2e 0a 0a 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20  ...For example, 
15e0: 74 6f 20 62 75 69 6c 64 20 61 6e 20 65 78 74 65  to build an exte
15f0: 6e 73 69 6f 6e 20 75 73 69 6e 67 20 74 68 65 20  nsion using the 
1600: 4b 69 74 44 4c 4c 20 53 44 4b 20 6f 6e 65 20 77  KitDLL SDK one w
1610: 6f 75 6c 64 20 74 79 70 69 63 61 6c 6c 79 20 64  ould typically d
1620: 6f 0a 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65  o.something like
1630: 3a 0a 09 31 2e 20 43 6f 6d 70 69 6c 65 20 4b 69  :..1. Compile Ki
1640: 74 44 4c 4c 20 28 6d 61 79 20 62 65 20 6f 6d 69  tDLL (may be omi
1650: 74 74 65 64 20 69 66 20 74 68 65 20 4b 69 74 44  tted if the KitD
1660: 4c 4c 20 53 44 4b 20 69 73 20 61 6c 72 65 61 64  LL SDK is alread
1670: 79 0a 09 20 20 20 61 76 61 69 6c 61 62 6c 65 29  y..   available)
1680: 0a 09 09 61 2e 20 24 20 4b 49 54 43 52 45 41 54  ...a. $ KITCREAT
1690: 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74 63 6c  OR_PKGS='tk itcl
16a0: 20 6b 69 74 64 6c 6c 27 0a 09 09 62 2e 20 24 20   kitdll'...b. $ 
16b0: 65 78 70 6f 72 74 20 4b 49 54 43 52 45 41 54 4f  export KITCREATO
16c0: 52 5f 50 4b 47 53 0a 09 09 63 2e 20 24 20 2e 2f  R_PKGS...c. $ ./
16d0: 6b 69 74 63 72 65 61 74 6f 72 0a 09 32 2e 20 43  kitcreator..2. C
16e0: 6f 6d 70 69 6c 65 20 74 68 65 20 45 78 74 65 6e  ompile the Exten
16f0: 73 69 6f 6e 0a 09 09 61 2e 20 24 20 74 61 72 20  sion...a. $ tar 
1700: 2d 78 66 20 2f 70 61 74 68 2f 74 6f 2f 6c 69 62  -xf /path/to/lib
1710: 74 63 6c 6b 69 74 2d 73 64 6b 2d 38 2e 34 2e 31  tclkit-sdk-8.4.1
1720: 39 2e 74 61 72 2e 67 7a 0a 09 09 62 2e 20 24 20  9.tar.gz...b. $ 
1730: 54 43 4c 4b 49 54 5f 53 44 4b 5f 44 49 52 3d 22  TCLKIT_SDK_DIR="
1740: 24 28 70 77 64 29 2f 6c 69 62 74 63 6c 6b 69 74  $(pwd)/libtclkit
1750: 2d 73 64 6b 2d 38 2e 34 2e 31 39 22 0a 09 09 63  -sdk-8.4.19"...c
1760: 2e 20 24 20 65 78 70 6f 72 74 20 54 43 4c 4b 49  . $ export TCLKI
1770: 54 5f 53 44 4b 5f 44 49 52 0a 09 09 64 2e 20 24  T_SDK_DIR...d. $
1780: 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d 77   ./configure --w
1790: 69 74 68 2d 74 63 6c 3d 22 24 7b 54 43 4c 4b 49  ith-tcl="${TCLKI
17a0: 54 5f 53 44 4b 5f 44 49 52 7d 2f 6c 69 62 22 0a  T_SDK_DIR}/lib".
17b0: 09 09 65 2e 20 24 20 6d 61 6b 65 0a 0a 2d 2d 2d  ..e. $ make..---
17c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
17d0: 0a 4d 65 74 68 6f 64 20 6f 66 20 4f 70 65 72 61  .Method of Opera
17e0: 74 69 6f 6e 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  tion.-----------
17f0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 53 75 6d 6d 61 72 79  --------.Summary
1800: 3a 0a 09 31 2e 20 22 6b 69 74 63 72 65 61 74 6f  :..1. "kitcreato
1810: 72 22 20 63 61 6c 6c 73 20 2a 2f 62 75 69 6c 64  r" calls */build
1820: 2e 73 68 0a 09 32 2e 20 2a 2f 62 75 69 6c 64 2e  .sh..2. */build.
1830: 73 68 20 64 6f 77 6e 6c 6f 61 64 73 20 61 6e 64  sh downloads and
1840: 20 63 6f 6d 70 69 6c 65 73 20 61 70 70 72 6f 70   compiles approp
1850: 72 69 61 74 65 20 73 6f 66 74 77 61 72 65 0a 09  riate software..
1860: 33 2e 20 2a 2f 62 75 69 6c 64 2e 73 68 20 69 6e  3. */build.sh in
1870: 73 74 61 6c 6c 73 20 73 6f 66 74 77 61 72 65 20  stalls software 
1880: 69 6e 74 6f 20 22 69 6e 73 74 22 20 28 72 75 6e  into "inst" (run
1890: 2d 74 69 6d 65 20 2b 20 63 6f 6d 70 69 6c 65 2d  -time + compile-
18a0: 74 69 6d 65 29 0a 09 34 2e 20 2a 2f 62 75 69 6c  time)..4. */buil
18b0: 64 2e 73 68 20 69 6e 73 74 61 6c 6c 73 20 72 75  d.sh installs ru
18c0: 6e 2d 74 69 6d 65 20 73 6f 66 74 77 61 72 65 20  n-time software 
18d0: 69 6e 74 6f 20 22 6f 75 74 22 2c 20 74 68 69 73  into "out", this
18e0: 20 77 69 6c 6c 20 62 65 0a 09 20 20 20 69 6e 63   will be..   inc
18f0: 6c 75 64 65 64 20 69 6e 20 74 68 65 20 54 63 6c  luded in the Tcl
1900: 6b 69 74 20 61 73 20 69 66 20 69 74 20 77 65 72  kit as if it wer
1910: 65 20 74 68 65 20 72 6f 6f 74 20 64 69 72 65 63  e the root direc
1920: 74 6f 72 79 20 6f 66 20 74 68 65 0a 09 20 20 20  tory of the..   
1930: 54 63 6c 6b 69 74 20 28 63 6f 6d 62 69 6e 65 64  Tclkit (combined
1940: 20 77 69 74 68 20 6f 74 68 65 72 20 22 6f 75 74   with other "out
1950: 22 20 64 69 72 65 63 74 6f 72 69 65 73 29 0a 09  " directories)..
1960: 35 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e 73  5. kitsh/build.s
1970: 68 20 63 6f 6d 70 69 6c 65 73 20 61 20 22 6d 61  h compiles a "ma
1980: 69 6e 22 20 66 75 6e 63 74 69 6f 6e 20 61 6e 64  in" function and
1990: 20 6c 69 6e 6b 73 20 61 6c 6c 20 74 68 65 20 62   links all the b
19a0: 75 69 6c 74 0a 09 20 20 20 6c 69 62 72 61 72 69  uilt..   librari
19b0: 65 73 20 74 6f 67 65 74 68 65 72 20 69 6e 74 6f  es together into
19c0: 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 0a 09   an executable..
19d0: 36 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e 73  6. kitsh/build.s
19e0: 68 20 63 6f 6d 62 69 6e 65 73 20 61 6c 6c 20 74  h combines all t
19f0: 68 65 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f  he "out" directo
1a00: 72 69 65 73 20 69 6e 74 6f 20 6f 6e 65 0a 09 37  ries into one..7
1a10: 2e 20 6b 69 74 73 68 2f 62 75 69 6c 64 2e 73 68  . kitsh/build.sh
1a20: 20 63 72 65 61 74 65 73 20 61 20 4d 65 74 61 6b   creates a Metak
1a30: 69 74 20 6f 72 20 5a 69 70 20 64 61 74 61 62 61  it or Zip databa
1a40: 73 65 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 62  se from the comb
1a50: 69 6e 65 64 0a 09 20 20 20 64 69 72 65 63 74 6f  ined..   directo
1a60: 72 69 65 73 20 61 6e 64 20 61 70 70 65 6e 64 73  ries and appends
1a70: 20 74 68 61 74 20 74 6f 20 74 68 65 20 63 6f 6d   that to the com
1a80: 70 69 6c 65 64 20 65 78 65 63 75 74 61 62 6c 65  piled executable
1a90: 20 75 73 69 6e 67 3a 0a 09 09 61 2e 20 41 20 54   using:...a. A T
1aa0: 63 6c 6b 69 74 20 66 6f 75 6e 64 20 69 6e 20 74  clkit found in t
1ab0: 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76  he environment v
1ac0: 61 72 69 61 62 6c 65 20 22 54 43 4c 4b 49 54 22  ariable "TCLKIT"
1ad0: 20 28 74 63 6c 6b 69 74 0a 09 09 20 20 20 69 66   (tclkit...   if
1ae0: 20 75 6e 73 65 74 29 20 69 66 20 69 74 20 69 73   unset) if it is
1af0: 20 66 75 6e 63 74 69 6f 6e 61 6c 3b 20 6f 72 0a   functional; or.
1b00: 09 09 62 2e 20 54 68 65 20 62 75 69 6c 74 20 6b  ..b. The built k
1b10: 69 74 20 69 74 73 65 6c 66 20 28 64 6f 65 73 20  it itself (does 
1b20: 6e 6f 74 20 77 6f 72 6b 20 66 6f 72 20 63 72 6f  not work for cro
1b30: 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 29 0a 0a 44  ss-compiling)..D
1b40: 65 74 61 69 6c 73 3a 0a 09 54 68 65 20 67 65 6e  etails:..The gen
1b50: 65 72 61 6c 20 6d 65 63 68 61 6e 69 73 6d 20 74  eral mechanism t
1b60: 68 61 74 20 65 6e 61 62 6c 65 73 20 61 20 54 63  hat enables a Tc
1b70: 6c 6b 69 74 20 74 6f 20 6f 70 65 72 61 74 65 20  lkit to operate 
1b80: 69 73 20 61 20 73 6d 61 6c 6c 20 54 63 6c 0a 69  is a small Tcl.i
1b90: 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 72 6f  nitialization ro
1ba0: 75 74 69 6e 65 20 6c 69 6e 6b 65 64 20 73 74 61  utine linked sta
1bb0: 74 69 63 61 6c 6c 79 20 74 6f 20 74 68 65 20 63  tically to the c
1bc0: 6f 72 65 20 6c 69 62 72 61 72 69 65 73 20 6e 65  ore libraries ne
1bd0: 65 64 65 64 20 74 6f 0a 6f 70 65 72 61 74 65 20  eded to.operate 
1be0: 61 20 54 63 6c 20 69 6e 74 65 72 70 72 65 74 65  a Tcl interprete
1bf0: 72 2c 20 74 68 65 20 54 63 6c 20 56 46 53 20 4c  r, the Tcl VFS L
1c00: 61 79 65 72 2c 20 61 6e 64 20 61 20 64 61 74 61  ayer, and a data
1c10: 62 61 73 65 2d 62 61 63 6b 65 64 20 28 4d 65 74  base-backed (Met
1c20: 61 6b 69 74 29 0a 56 69 72 74 75 61 6c 20 46 69  akit).Virtual Fi
1c30: 6c 65 20 53 79 73 74 65 6d 20 74 68 61 74 20 69  le System that i
1c40: 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68  s appended to th
1c50: 65 20 65 6e 64 20 6f 66 20 74 68 65 20 65 78 65  e end of the exe
1c60: 63 75 74 61 62 6c 65 2e 0a 0a 54 68 69 73 20 70  cutable...This p
1c70: 72 6f 6a 65 63 74 20 62 72 69 6e 67 73 20 74 6f  roject brings to
1c80: 67 65 74 68 65 72 20 61 6c 6c 20 6f 66 20 74 68  gether all of th
1c90: 65 20 72 65 71 75 69 72 65 64 20 70 69 65 63 65  e required piece
1ca0: 73 2c 20 70 6c 75 73 20 73 6f 6d 65 20 61 64 64  s, plus some add
1cb0: 69 74 69 6f 6e 61 6c 0a 70 69 65 63 65 73 20 74  itional.pieces t
1cc0: 68 61 74 20 77 65 72 65 20 66 6f 75 6e 64 20 69  hat were found i
1cd0: 6e 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 54  n the original T
1ce0: 63 6c 6b 69 74 3a 0a 09 31 2e 20 54 6b 20 28 64  clkit:..1. Tk (d
1cf0: 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65  ynamically linke
1d00: 64 29 0a 09 32 2e 20 49 74 63 6c 20 28 64 79 6e  d)..2. Itcl (dyn
1d10: 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 29  amically linked)
1d20: 0a 0a 54 68 65 20 73 6f 75 72 63 65 20 63 6f 64  ..The source cod
1d30: 65 20 66 6f 72 20 74 68 65 73 65 20 70 69 65 63  e for these piec
1d40: 65 73 20 61 72 65 20 64 6f 77 6e 6c 6f 61 64 65  es are downloade
1d50: 64 2c 20 63 6f 6d 70 69 6c 65 64 2c 20 61 6e 64  d, compiled, and
1d60: 20 6c 69 6e 6b 65 64 2c 20 61 6e 64 20 74 68 65   linked, and the
1d70: 0a 64 61 74 61 62 61 73 65 20 63 6f 6e 74 61 69  .database contai
1d80: 6e 69 6e 67 20 74 68 65 20 61 70 70 72 6f 70 72  ning the appropr
1d90: 69 61 74 65 20 66 69 6c 65 73 79 73 74 65 6d 20  iate filesystem 
1da0: 64 61 74 61 20 69 73 20 63 72 65 61 74 65 64 2e  data is created.
1db0: 20 20 57 68 61 74 20 73 65 74 73 0a 74 68 69 73    What sets.this
1dc0: 20 70 72 6f 6a 65 63 74 20 61 70 61 72 74 20 66   project apart f
1dd0: 72 6f 6d 20 6f 74 68 65 72 20 73 69 6d 69 6c 61  rom other simila
1de0: 72 20 70 72 6f 6a 65 63 74 73 20 69 73 20 74 68  r projects is th
1df0: 61 74 3a 0a 09 31 2e 20 49 74 20 61 74 74 65 6d  at:..1. It attem
1e00: 70 74 73 20 74 6f 20 62 65 20 6d 6f 64 75 6c 61  pts to be modula
1e10: 72 3b 0a 09 32 2e 20 49 74 20 73 75 70 70 6f 72  r;..2. It suppor
1e20: 74 73 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69  ts cross-compili
1e30: 6e 67 3b 0a 09 33 2e 20 49 74 20 64 6f 77 6e 6c  ng;..3. It downl
1e40: 6f 61 64 73 20 74 68 65 20 73 6f 75 72 63 65 20  oads the source 
1e50: 66 72 6f 6d 20 74 68 65 69 72 20 6f 72 69 67 69  from their origi
1e60: 6e 61 6c 20 72 65 70 6f 73 69 74 6f 72 69 65 73  nal repositories
1e70: 3b 0a 09 34 2e 20 49 74 20 61 6c 6c 6f 77 73 20  ;..4. It allows 
1e80: 79 6f 75 20 74 6f 20 73 70 65 63 69 66 79 20 61  you to specify a
1e90: 6e 20 61 72 62 69 74 72 61 72 79 20 76 65 72 73  n arbitrary vers
1ea0: 69 6f 6e 20 6f 66 20 54 63 6c 20 28 69 6e 63 6c  ion of Tcl (incl
1eb0: 75 64 69 6e 67 0a 09 20 20 20 43 56 53 29 3b 20  uding..   CVS); 
1ec0: 61 6e 64 0a 09 35 2e 20 49 74 20 75 73 65 73 20  and..5. It uses 
1ed0: 47 4e 55 20 41 75 74 6f 63 6f 6e 66 20 73 63 72  GNU Autoconf scr
1ee0: 69 70 74 73 20 66 6f 72 20 63 6f 6d 70 69 6c 69  ipts for compili
1ef0: 6e 67 20 74 68 65 20 70 61 72 74 20 6f 66 20 74  ng the part of t
1f00: 68 65 20 54 63 6c 6b 69 74 0a 09 20 20 20 74 68  he Tclkit..   th
1f10: 61 74 20 62 72 69 6e 67 73 20 74 68 65 20 77 68  at brings the wh
1f20: 6f 6c 65 20 74 68 69 6e 67 20 74 6f 67 65 74 68  ole thing togeth
1f30: 65 72 20 28 74 68 65 20 4b 69 74 73 68 29 0a 0a  er (the Kitsh)..
1f40: 54 6f 20 61 63 63 6f 6d 70 6c 69 73 68 20 74 68  To accomplish th
1f50: 65 73 65 20 67 6f 61 6c 73 20 74 68 65 20 66 6f  ese goals the fo
1f60: 6c 6c 6f 77 69 6e 67 20 6d 65 63 68 61 6e 69 73  llowing mechanis
1f70: 6d 73 20 61 72 65 20 69 6e 20 70 6c 61 63 65 3a  ms are in place:
1f80: 0a 09 31 2e 20 54 68 65 20 74 6f 70 2d 6c 65 76  ..1. The top-lev
1f90: 65 6c 20 22 6b 69 74 63 72 65 61 74 6f 72 22 20  el "kitcreator" 
1fa0: 73 63 72 69 70 74 3b 20 61 6e 64 0a 09 32 2e 20  script; and..2. 
1fb0: 50 65 72 2d 70 72 6f 6a 65 63 74 20 73 75 62 64  Per-project subd
1fc0: 69 72 65 63 74 6f 72 69 65 73 2c 20 65 61 63 68  irectories, each
1fd0: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 20 22 62   containing a "b
1fe0: 75 69 6c 64 2e 73 68 22 20 73 63 72 69 70 74 0a  uild.sh" script.
1ff0: 0a 54 68 65 20 74 6f 70 2d 6c 65 76 65 6c 20 22  .The top-level "
2000: 6b 69 74 63 72 65 61 74 6f 72 22 20 73 63 72 69  kitcreator" scri
2010: 70 74 20 69 73 20 76 65 72 79 20 73 69 6d 70 6c  pt is very simpl
2020: 65 2e 20 20 49 74 73 20 6f 6e 6c 79 20 6a 6f 62  e.  Its only job
2030: 20 69 73 20 74 6f 0a 69 6e 74 65 72 70 72 65 74   is to.interpret
2040: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 61 72   command line ar
2050: 67 75 6d 65 6e 74 73 2c 20 61 6e 64 20 63 61 6c  guments, and cal
2060: 6c 20 74 68 65 20 70 65 72 2d 70 72 6f 6a 65 63  l the per-projec
2070: 74 20 22 62 75 69 6c 64 2e 73 68 22 20 73 63 72  t "build.sh" scr
2080: 69 70 74 73 2e 0a 46 6f 72 20 74 68 65 20 22 74  ipts..For the "t
2090: 63 6c 22 20 70 72 6f 6a 65 63 74 20 69 74 20 61  cl" project it a
20a0: 6c 73 6f 20 66 69 6e 64 73 20 74 68 65 20 61 70  lso finds the ap
20b0: 70 72 6f 70 72 69 61 74 65 20 22 74 63 6c 43 6f  propriate "tclCo
20c0: 6e 66 69 67 2e 73 68 22 20 28 61 6e 64 20 73 74  nfig.sh" (and st
20d0: 6f 72 65 73 0a 74 68 69 73 20 70 61 74 68 20 69  ores.this path i
20e0: 6e 20 54 43 4c 43 4f 4e 46 49 47 44 49 52 29 20  n TCLCONFIGDIR) 
20f0: 74 6f 20 65 6e 61 62 6c 65 20 73 75 62 73 65 71  to enable subseq
2100: 75 65 6e 74 20 62 75 69 6c 64 20 73 63 72 69 70  uent build scrip
2110: 74 73 20 74 6f 20 66 69 6e 64 20 74 68 65 0a 61  ts to find the.a
2120: 70 70 72 6f 70 72 69 61 74 65 20 54 63 6c 20 74  ppropriate Tcl t
2130: 6f 20 6c 69 6e 6b 20 61 67 61 69 6e 73 74 2e 0a  o link against..
2140: 0a 54 68 65 20 70 65 72 2d 70 72 6f 6a 65 63 74  .The per-project
2150: 20 22 62 75 69 6c 64 2e 73 68 22 20 73 63 72 69   "build.sh" scri
2160: 70 74 73 20 61 72 65 20 65 6e 74 69 72 65 6c 79  pts are entirely
2170: 20 61 75 74 6f 6e 6f 6d 6f 75 73 2e 20 20 54 68   autonomous.  Th
2180: 65 79 20 61 72 65 0a 72 65 73 70 6f 6e 73 69 62  ey are.responsib
2190: 6c 65 20 66 6f 72 20 64 6f 77 6e 6c 6f 61 64 69  le for downloadi
21a0: 6e 67 20 74 68 65 20 73 6f 75 72 63 65 20 63 6f  ng the source co
21b0: 64 65 20 66 6f 72 20 74 68 65 20 61 70 70 72 6f  de for the appro
21c0: 70 72 69 61 74 65 20 76 65 72 73 69 6f 6e 20 74  priate version t
21d0: 68 61 74 0a 77 69 6c 6c 20 63 6f 6d 70 69 6c 65  hat.will compile
21e0: 20 61 6e 64 20 6c 69 6e 6b 20 61 67 61 69 6e 73   and link agains
21f0: 74 20 74 68 65 20 63 75 72 72 65 6e 74 20 76 65  t the current ve
2200: 72 73 69 6f 6e 20 6f 66 20 54 63 6c 20 28 75 73  rsion of Tcl (us
2210: 65 72 20 72 65 71 75 65 73 74 65 64 0a 76 65 72  er requested.ver
2220: 73 69 6f 6e 20 63 61 6e 20 62 65 20 66 6f 75 6e  sion can be foun
2230: 64 20 69 6e 20 22 54 43 4c 56 45 52 53 22 2c 20  d in "TCLVERS", 
2240: 77 68 69 6c 65 20 74 68 65 20 61 63 74 75 61 6c  while the actual
2250: 20 76 65 72 73 69 6f 6e 20 6d 75 73 74 20 62 65   version must be
2260: 20 72 65 71 75 65 73 74 65 64 0a 66 72 6f 6d 20   requested.from 
2270: 74 68 65 20 22 74 63 6c 43 6f 6e 66 69 67 2e 73  the "tclConfig.s
2280: 68 22 20 73 63 72 69 70 74 29 2c 20 63 6f 6d 70  h" script), comp
2290: 69 6c 69 6e 67 20 69 74 2c 20 69 6e 73 74 61 6c  iling it, instal
22a0: 6c 69 6e 67 20 61 20 66 75 6e 63 74 69 6f 6e 61  ling a functiona
22b0: 6c 20 63 6f 70 79 0a 69 6e 74 6f 20 74 68 65 20  l copy.into the 
22c0: 70 65 72 2d 70 72 6f 6a 65 63 74 20 22 69 6e 73  per-project "ins
22d0: 74 22 20 64 69 72 65 63 74 6f 72 79 2c 20 61 6e  t" directory, an
22e0: 64 20 69 6e 73 74 61 6c 6c 69 6e 67 20 61 6e 79  d installing any
22f0: 74 68 69 6e 67 20 74 68 61 74 20 6e 65 65 64 73  thing that needs
2300: 20 74 6f 0a 62 65 20 69 6e 20 74 68 65 20 54 63   to.be in the Tc
2310: 6c 6b 69 74 27 73 20 56 46 53 20 72 6f 6f 74 20  lkit's VFS root 
2320: 69 6e 74 6f 20 74 68 65 20 70 65 72 2d 70 72 6f  into the per-pro
2330: 6a 65 63 74 20 22 6f 75 74 22 20 64 69 72 65 63  ject "out" direc
2340: 74 6f 72 79 2e 0a 0a 41 6e 79 20 61 64 64 69 74  tory...Any addit
2350: 69 6f 6e 61 6c 20 70 72 6f 6a 65 63 74 73 20 63  ional projects c
2360: 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 64 20 73  an be included s
2370: 69 6d 70 6c 79 20 62 79 20 63 72 65 61 74 69 6e  imply by creatin
2380: 67 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74  g the appropriat
2390: 65 0a 64 69 72 65 63 74 6f 72 79 20 69 6e 20 74  e.directory in t
23a0: 68 65 20 73 61 6d 65 20 64 69 72 65 63 74 6f 72  he same director
23b0: 79 20 61 73 20 74 68 65 20 22 6b 69 74 63 72 65  y as the "kitcre
23c0: 61 74 6f 72 22 20 73 63 72 69 70 74 2c 20 63 72  ator" script, cr
23d0: 65 61 74 69 6e 67 20 61 0a 22 62 75 69 6c 64 2e  eating a."build.
23e0: 73 68 22 20 73 63 72 69 70 74 20 69 6e 20 74 68  sh" script in th
23f0: 61 74 20 64 69 72 65 63 74 6f 72 79 20 74 68 61  at directory tha
2400: 74 20 66 6f 6c 6c 6f 77 73 20 74 68 65 20 61 62  t follows the ab
2410: 6f 76 65 20 70 72 6f 63 65 64 75 72 65 2c 20 61  ove procedure, a
2420: 6e 64 20 74 68 65 6e 0a 72 65 66 65 72 65 6e 63  nd then.referenc
2430: 69 6e 67 20 74 68 61 74 20 64 69 72 65 63 74 6f  ing that directo
2440: 72 79 20 69 6e 20 22 4b 49 54 43 52 45 41 54 4f  ry in "KITCREATO
2450: 52 5f 50 4b 47 53 22 20 66 6f 72 20 74 68 65 20  R_PKGS" for the 
2460: 22 6b 69 74 63 72 65 61 74 6f 72 22 20 69 6e 76  "kitcreator" inv
2470: 6f 63 61 74 69 6f 6e 2e 0a 49 6e 20 74 68 69 73  ocation..In this
2480: 20 77 61 79 20 4b 69 74 43 72 65 61 74 6f 72 20   way KitCreator 
2490: 69 73 20 22 70 6c 75 67 67 61 62 6c 65 22 2e 20  is "pluggable". 
24a0: 20 49 6e 63 6c 75 64 65 64 20 70 61 63 6b 61 67   Included packag
24b0: 65 73 20 6d 61 79 20 62 65 20 65 69 74 68 65 72  es may be either
24c0: 0a 73 74 61 74 69 63 61 6c 6c 79 20 6f 72 20 64  .statically or d
24d0: 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65  ynamically linke
24e0: 64 2e 20 20 49 66 20 69 74 20 69 73 20 73 74 61  d.  If it is sta
24f0: 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20 74  tically linked t
2500: 68 65 6e 20 74 68 65 20 6d 6f 64 75 6c 65 0a 6e  hen the module.n
2510: 61 6d 65 20 6d 75 73 74 20 62 65 20 74 68 65 20  ame must be the 
2520: 6e 61 6d 65 20 6f 66 20 74 68 65 20 64 69 72 65  name of the dire
2530: 63 74 6f 72 79 20 2d 2d 20 74 68 61 74 20 69 73  ctory -- that is
2540: 2c 20 69 66 20 74 68 65 20 64 69 72 65 63 74 6f  , if the directo
2550: 72 79 20 77 65 72 65 20 22 66 6f 6f 22 2c 0a 4b  ry were "foo",.K
2560: 69 74 43 72 65 61 74 6f 72 20 77 69 6c 6c 20 65  itCreator will e
2570: 78 70 65 63 74 20 74 6f 20 69 6e 69 74 69 61 6c  xpect to initial
2580: 69 7a 65 20 74 68 65 20 6d 6f 64 75 6c 65 20 73  ize the module s
2590: 74 61 74 69 63 61 6c 6c 79 20 75 73 69 6e 67 20  tatically using 
25a0: 46 6f 6f 5f 49 6e 69 74 28 29 2e 0a 0a 54 68 65  Foo_Init()...The
25b0: 20 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74 68   exception to th
25c0: 69 73 20 69 73 20 74 68 65 20 22 6b 69 74 73 68  is is the "kitsh
25d0: 22 20 70 72 6f 6a 65 63 74 2e 20 20 49 74 20 69  " project.  It i
25e0: 73 20 74 68 65 20 67 6c 75 65 20 74 68 61 74 20  s the glue that 
25f0: 62 69 6e 64 73 20 61 6c 6c 0a 74 68 65 20 69 6e  binds all.the in
2600: 64 69 76 69 64 75 61 6c 20 70 72 6f 6a 65 63 74  dividual project
2610: 73 20 74 6f 67 65 74 68 65 72 20 69 6e 74 6f 20  s together into 
2620: 61 20 73 69 6e 67 6c 65 20 65 78 65 63 75 74 61  a single executa
2630: 62 6c 65 2e 20 20 49 74 73 20 62 75 69 6c 64 20  ble.  Its build 
2640: 73 63 72 69 70 74 0a 64 6f 65 73 20 6e 6f 74 20  script.does not 
2650: 63 72 65 61 74 65 20 61 6e 20 22 69 6e 73 74 22  create an "inst"
2660: 20 6f 72 20 61 6e 20 22 6f 75 74 22 20 64 69 72   or an "out" dir
2670: 65 63 74 6f 72 79 20 62 65 63 61 75 73 65 20 69  ectory because i
2680: 74 20 69 73 20 6e 6f 74 20 61 20 6c 69 62 72 61  t is not a libra
2690: 72 79 2e 0a 49 6e 73 74 65 61 64 2c 20 69 74 20  ry..Instead, it 
26a0: 63 6f 6c 6c 65 63 74 73 20 61 6c 6c 20 74 68 65  collects all the
26b0: 20 6f 74 68 65 72 20 70 72 6f 6a 65 63 74 27 73   other project's
26c0: 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f 72 69   "out" directori
26d0: 65 73 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65  es into a single
26e0: 0a 64 69 72 65 63 74 6f 72 79 20 28 73 74 61 72  .directory (star
26f0: 70 61 63 6b 2e 76 66 73 29 2c 20 61 73 20 77 65  pack.vfs), as we
2700: 6c 6c 20 61 20 73 74 61 74 69 63 20 66 69 6c 65  ll a static file
2710: 20 28 62 6f 6f 74 2e 74 63 6c 29 2e 20 49 74 20   (boot.tcl). It 
2720: 74 68 65 6e 20 63 6f 6d 70 69 6c 65 73 0a 74 68  then compiles.th
2730: 65 20 73 6f 75 72 63 65 20 63 6f 64 65 2c 20 61  e source code, a
2740: 6e 64 20 74 68 65 6e 20 69 6e 73 74 61 6c 6c 73  nd then installs
2750: 20 74 68 65 20 56 46 53 20 6f 6e 74 6f 20 74 68   the VFS onto th
2760: 65 20 72 65 73 75 6c 74 69 6e 67 20 65 78 65 63  e resulting exec
2770: 75 74 61 62 6c 65 2e 0a 54 68 65 20 56 46 53 20  utable..The VFS 
2780: 69 73 20 63 72 65 61 74 65 64 20 62 79 20 74 68  is created by th
2790: 65 20 22 69 6e 73 74 61 6c 6c 76 66 73 2e 74 63  e "installvfs.tc
27a0: 6c 22 20 73 63 72 69 70 74 20 66 6f 72 20 4b 69  l" script for Ki
27b0: 74 73 68 2e 20 20 46 6f 72 20 4b 69 74 44 4c 4c  tsh.  For KitDLL
27c0: 20 74 68 65 0a 56 46 53 20 69 73 20 63 72 65 61   the.VFS is crea
27d0: 74 65 64 20 62 79 20 22 64 69 72 32 63 2e 74 63  ted by "dir2c.tc
27e0: 6c 22 2e 0a 0a 49 66 20 74 68 65 20 22 6d 6b 34  l"...If the "mk4
27f0: 74 63 6c 22 20 70 72 6f 6a 65 63 74 20 66 61 69  tcl" project fai
2800: 6c 73 20 74 6f 20 62 75 69 6c 64 20 28 6f 72 20  ls to build (or 
2810: 69 73 20 6e 6f 74 20 72 65 71 75 65 73 74 65 64  is not requested
2820: 20 74 6f 20 62 65 20 62 75 69 6c 74 29 2c 0a 74   to be built),.t
2830: 68 65 20 72 65 73 74 20 6f 66 20 74 68 65 20 70  he rest of the p
2840: 72 6f 6a 65 63 74 20 77 69 6c 6c 20 62 65 20 62  roject will be b
2850: 75 69 6c 74 20 75 73 69 6e 67 20 7a 69 70 20 66  uilt using zip f
2860: 69 6c 65 73 20 69 6e 73 74 65 61 64 20 6f 66 20  iles instead of 
2870: 4d 65 74 61 6b 69 74 0a 64 61 74 61 62 61 73 65  Metakit.database
2880: 73 2e 0a 0a 54 6f 20 63 72 65 61 74 65 20 74 68  s...To create th
2890: 65 20 73 74 6f 72 61 67 65 20 64 61 74 61 62 61  e storage databa
28a0: 73 65 2c 20 6f 6e 65 20 6f 66 20 74 77 6f 20 54  se, one of two T
28b0: 63 6c 6b 69 74 73 20 69 73 20 75 73 65 64 20 28  clkits is used (
28c0: 74 72 69 65 64 20 69 6e 20 74 68 69 73 0a 6f 72  tried in this.or
28d0: 64 65 72 29 3a 0a 09 31 2e 20 54 68 65 20 54 63  der):..1. The Tc
28e0: 6c 6b 69 74 20 73 70 65 63 69 66 69 65 64 20 62  lkit specified b
28f0: 79 20 74 68 65 20 54 43 4c 4b 49 54 20 65 6e 76  y the TCLKIT env
2900: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
2910: 65 20 28 6f 72 0a 09 20 20 20 22 74 63 6c 6b 69  e (or..   "tclki
2920: 74 22 20 69 66 20 74 68 61 74 20 76 61 72 69 61  t" if that varia
2930: 62 6c 65 20 69 73 20 6e 6f 74 20 73 65 74 29 20  ble is not set) 
2940: 69 66 20 69 74 20 69 73 20 66 75 6e 63 74 69 6f  if it is functio
2950: 6e 61 6c 3b 20 6f 72 0a 09 32 2e 20 54 68 65 20  nal; or..2. The 
2960: 62 75 69 6c 74 20 54 63 6c 6b 69 74 20 69 74 73  built Tclkit its
2970: 65 6c 66 0a 0a 54 68 65 20 73 65 63 6f 6e 64 20  elf..The second 
2980: 6d 65 74 68 6f 64 20 77 69 6c 6c 20 6e 6f 74 20  method will not 
2990: 77 6f 72 6b 20 69 66 20 74 68 65 20 62 75 69 6c  work if the buil
29a0: 74 20 54 63 6c 6b 69 74 20 69 73 20 6e 6f 74 20  t Tclkit is not 
29b0: 65 78 65 63 75 74 61 62 6c 65 20 6f 6e 20 74 68  executable on th
29c0: 65 0a 63 75 72 72 65 6e 74 20 70 6c 61 74 66 6f  e.current platfo
29d0: 72 6d 20 28 69 2e 65 2e 2c 20 69 6e 20 74 68 65  rm (i.e., in the
29e0: 20 63 61 73 65 20 6f 66 20 63 72 6f 73 73 2d 63   case of cross-c
29f0: 6f 6d 70 69 6c 61 74 69 6f 6e 29 20 61 6e 64 20  ompilation) and 
2a00: 73 6f 20 69 74 20 6d 61 79 20 62 65 0a 6e 65 63  so it may be.nec
2a10: 65 73 73 61 72 79 20 74 6f 20 62 6f 6f 74 73 74  essary to bootst
2a20: 72 61 70 20 61 20 72 75 6e 6e 61 62 6c 65 20 54  rap a runnable T
2a30: 63 6c 6b 69 74 20 66 69 72 73 74 2e 0a 0a 4b 69  clkit first...Ki
2a40: 74 44 4c 4c 20 6d 6f 75 6e 74 73 20 74 68 65 20  tDLL mounts the 
2a50: 56 46 53 20 66 6f 72 20 65 76 65 72 79 20 69 6e  VFS for every in
2a60: 74 65 72 70 72 65 74 65 72 20 74 68 61 74 20 63  terpreter that c
2a70: 61 6c 6c 73 20 54 63 6c 5f 49 6e 69 74 28 29 2e  alls Tcl_Init().
2a80: 20 20 54 68 65 20 73 79 73 74 65 6d 0a 56 46 53    The system.VFS
2a90: 20 74 68 61 74 20 69 73 20 63 72 65 61 74 65 64   that is created
2aa0: 20 61 74 20 62 75 69 6c 64 20 74 69 6d 65 20 69   at build time i
2ab0: 73 20 6d 6f 75 6e 74 65 64 20 61 74 20 2f 2e 4b  s mounted at /.K
2ac0: 49 54 44 4c 4c 5f 54 43 4c 2e 20 20 41 64 64 69  ITDLL_TCL.  Addi
2ad0: 74 69 6f 6e 61 6c 6c 79 2c 0a 69 66 20 74 68 65  tionally,.if the
2ae0: 72 65 20 69 73 20 61 20 5a 49 50 20 66 69 6c 65  re is a ZIP file
2af0: 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 65   appended to the
2b00: 20 44 4c 4c 20 69 74 20 77 69 6c 6c 20 62 65 20   DLL it will be 
2b10: 6d 6f 75 6e 74 65 64 20 61 74 20 2f 2e 4b 49 54  mounted at /.KIT
2b20: 44 4c 4c 5f 55 53 45 52 0a 61 6e 64 20 69 66 20  DLL_USER.and if 
2b30: 74 68 65 72 65 20 69 73 20 61 20 5a 49 50 20 66  there is a ZIP f
2b40: 69 6c 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20  ile appended to 
2b50: 74 68 65 20 65 78 65 63 75 74 61 62 6c 65 20 69  the executable i
2b60: 74 20 77 69 6c 6c 20 62 65 20 6d 6f 75 6e 74 65  t will be mounte
2b70: 64 20 61 74 0a 2f 2e 4b 49 54 44 4c 4c 5f 41 50  d at./.KITDLL_AP
2b80: 50 2e 20 20 41 6c 6c 20 56 46 53 65 73 20 74 68  P.  All VFSes th
2b90: 61 74 20 61 72 65 20 6d 6f 75 6e 74 65 64 20 68  at are mounted h
2ba0: 61 76 65 20 74 68 65 20 22 6c 69 62 22 20 73 75  ave the "lib" su
2bb0: 62 2d 64 69 72 65 63 74 6f 72 79 20 61 70 70 65  b-directory appe
2bc0: 6e 64 65 64 0a 74 6f 20 74 68 65 20 69 6e 74 65  nded.to the inte
2bd0: 72 70 72 65 74 65 72 73 20 22 61 75 74 6f 5f 70  rpreters "auto_p
2be0: 61 74 68 22 20 76 61 72 69 61 62 6c 65 2e 0a     ath" variable..