Hex Artifact Content

Artifact 43ef200174c13d7183bbe8e63235a095e2807b34:


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: 35 2e 31 34 29 0a 09 09 74 61 67 20 20 20 20 20  5.14)...tag     
0170: 20 20 20 20 20 20 20 20 20 20 20 69 73 20 61 20             is a 
0180: 43 56 53 20 6f 72 20 66 6f 73 73 69 6c 20 72 65  CVS or fossil re
0190: 6c 65 61 73 65 20 74 61 67 20 28 65 2e 67 2e 2c  lease tag (e.g.,
01a0: 20 48 45 41 44 29 0a 09 09 63 6f 6e 66 69 67 75   HEAD)...configu
01b0: 72 65 5f 6f 70 74 69 6f 6e 20 20 20 6f 70 74 69  re_option   opti
01c0: 6f 6e 20 74 6f 20 70 61 73 73 20 74 6f 20 73 75  on to pass to su
01d0: 62 6f 72 64 69 6e 61 74 65 20 63 6f 6e 66 69 67  bordinate config
01e0: 75 72 65 0a 09 09 20 20 20 20 20 20 20 20 20 20  ure...          
01f0: 20 20 20 20 20 20 20 20 20 73 63 72 69 70 74 73           scripts
0200: 20 28 65 2e 67 2e 2c 20 2d 2d 65 6e 61 62 6c 65   (e.g., --enable
0210: 2d 36 34 62 69 74 29 0a 0a 09 44 65 66 61 75 6c  -64bit)...Defaul
0220: 74 20 69 73 20 74 6f 20 63 72 65 61 74 65 20 61  t is to create a
0230: 20 54 63 6c 6b 69 74 20 66 72 6f 6d 20 54 63 6c   Tclkit from Tcl
0240: 20 76 65 72 73 69 6f 6e 20 38 2e 35 2e 31 34 0a   version 8.5.14.
0250: 0a 45 78 61 6d 70 6c 65 73 3a 0a 09 31 2e 20 43  .Examples:..1. C
0260: 72 65 61 74 65 20 61 20 54 63 6c 6b 69 74 3a 0a  reate a Tclkit:.
0270: 09 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61  ..a. $ ./kitcrea
0280: 74 6f 72 0a 0a 09 32 2e 20 43 72 65 61 74 65 20  tor...2. Create 
0290: 61 20 54 63 6c 6b 69 74 20 66 6f 72 20 54 63 6c  a Tclkit for Tcl
02a0: 20 38 2e 35 2e 38 3a 0a 09 09 61 2e 20 24 20 2e   8.5.8:...a. $ .
02b0: 2f 6b 69 74 63 72 65 61 74 6f 72 20 38 2e 35 2e  /kitcreator 8.5.
02c0: 38 0a 0a 09 33 2e 20 43 72 65 61 74 65 20 61 20  8...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 38 20 75 73 69 6e 67 20 53  it 8.5.8 using S
0650: 75 6e 53 74 75 64 69 6f 20 31 32 2e 31 20 6f 6e  unStudio 12.1 on
0660: 20 53 6f 6c 61 72 69 73 2f 78 38 36 3a 0a 09 09   Solaris/x86:...
0670: 61 2e 20 24 20 43 43 3d 27 2f 6f 70 74 2f 73 75  a. $ CC='/opt/su
0680: 6e 73 74 75 64 69 6f 31 32 2e 31 2f 62 69 6e 2f  nstudio12.1/bin/
0690: 63 63 20 2d 6d 36 34 27 0a 09 09 62 2e 20 24 20  cc -m64'...b. $ 
06a0: 43 58 58 3d 27 2f 6f 70 74 2f 73 75 6e 73 74 75  CXX='/opt/sunstu
06b0: 64 69 6f 31 32 2e 31 2f 62 69 6e 2f 43 43 20 2d  dio12.1/bin/CC -
06c0: 6d 36 34 27 0a 09 09 63 2e 20 24 20 50 41 54 43  m64'...c. $ PATC
06d0: 48 3d 27 67 70 61 74 63 68 27 0a 09 09 63 2e 20  H='gpatch'...c. 
06e0: 24 20 65 78 70 6f 72 74 20 43 43 20 43 58 58 20  $ export CC CXX 
06f0: 50 41 54 43 48 0a 09 09 64 2e 20 24 20 2e 2f 6b  PATCH...d. $ ./k
0700: 69 74 63 72 65 61 74 6f 72 20 38 2e 35 2e 38 20  itcreator 8.5.8 
0710: 2d 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74 0a 0a  --enable-64bit..
0720: 09 37 2e 20 54 6f 20 63 6c 65 61 6e 20 75 70 20  .7. To clean up 
0730: 70 6f 73 74 2d 62 75 69 6c 64 3a 0a 09 09 61 2e  post-build:...a.
0740: 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20   $ ./kitcreator 
0750: 63 6c 65 61 6e 0a 0a 09 38 2e 20 43 72 65 61 74  clean...8. Creat
0760: 65 20 61 20 54 63 6c 6b 69 74 20 77 69 74 68 6f  e a Tclkit witho
0770: 75 74 20 4d 65 74 61 6b 69 74 34 20 73 75 70 70  ut Metakit4 supp
0780: 6f 72 74 20 28 66 61 6c 6c 73 20 62 61 63 6b 20  ort (falls back 
0790: 74 6f 20 5a 69 70 20 66 6f 72 20 73 74 6f 72 61  to Zip for stora
07a0: 67 65 29 3a 0a 09 09 61 2e 20 4b 49 54 43 52 45  ge):...a. KITCRE
07b0: 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20 69 74  ATOR_PKGS='tk it
07c0: 63 6c 27 0a 09 09 62 2e 20 65 78 70 6f 72 74 20  cl'...b. export 
07d0: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a  KITCREATOR_PKGS.
07e0: 09 09 63 2e 20 2e 2f 6b 69 74 63 72 65 61 74 6f  ..c. ./kitcreato
07f0: 72 0a 0a 09 39 2e 20 43 72 65 61 74 65 20 61 20  r...9. Create a 
0800: 54 63 6c 6b 69 74 20 77 69 74 68 20 4d 65 74 61  Tclkit with Meta
0810: 6b 69 74 34 20 73 75 70 70 6f 72 74 2c 20 62 75  kit4 support, bu
0820: 74 20 75 73 69 6e 67 20 5a 69 70 20 66 6f 72 20  t using Zip for 
0830: 73 74 6f 72 61 67 65 3a 0a 09 09 61 2e 20 24 20  storage:...a. $ 
0840: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 2d 2d 65  ./kitcreator --e
0850: 6e 61 62 6c 65 2d 6b 69 74 2d 73 74 6f 72 61 67  nable-kit-storag
0860: 65 3d 7a 69 70 0a 0a 09 31 30 2e 20 43 72 65 61  e=zip...10. Crea
0870: 74 65 20 61 20 54 63 6c 6b 69 74 20 77 69 74 68  te a Tclkit with
0880: 20 4d 65 74 61 6b 69 74 34 20 73 75 70 70 6f 72   Metakit4 suppor
0890: 74 2c 20 62 75 74 20 75 73 69 6e 67 20 43 2d 56  t, but using C-V
08a0: 46 53 20 66 6f 72 20 73 74 6f 72 61 67 65 0a 09  FS for storage..
08b0: 09 61 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74  .a. $ ./kitcreat
08c0: 6f 72 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d  or --enable-kit-
08d0: 73 74 6f 72 61 67 65 3d 63 76 66 73 0a 0a 09 31  storage=cvfs...1
08e0: 31 2e 20 43 72 65 61 74 65 20 61 20 4b 69 74 44  1. Create a KitD
08f0: 4c 4c 20 77 69 74 68 6f 75 74 20 4d 65 74 61 6b  LL without Metak
0900: 69 74 20 73 75 70 70 6f 72 74 20 28 77 69 6c 6c  it support (will
0910: 20 6e 6f 74 20 63 72 65 61 74 65 20 61 20 54 63   not create a Tc
0920: 6c 6b 69 74 0a 09 20 20 20 20 62 69 6e 61 72 79  lkit..    binary
0930: 2c 20 6a 75 73 74 20 74 68 65 20 6c 69 62 72 61  , just the libra
0940: 72 79 29 3a 0a 09 09 61 2e 20 24 20 4b 49 54 43  ry):...a. $ KITC
0950: 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27 74 6b 20  REATOR_PKGS='tk 
0960: 69 74 63 6c 20 6b 69 74 64 6c 6c 27 0a 09 09 62  itcl kitdll'...b
0970: 2e 20 24 20 65 78 70 6f 72 74 20 4b 49 54 43 52  . $ export KITCR
0980: 45 41 54 4f 52 5f 50 4b 47 53 0a 09 09 63 2e 20  EATOR_PKGS...c. 
0990: 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f 72 0a 0a  $ ./kitcreator..
09a0: 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  Environment vari
09b0: 61 62 6c 65 73 3a 0a 09 31 2e 20 4d 41 4b 45 0a  ables:..1. MAKE.
09c0: 09 09 53 70 65 63 69 66 69 65 73 20 74 68 65 20  ..Specifies the 
09d0: 74 6f 6f 6c 20 79 6f 75 20 77 69 73 68 20 74 6f  tool you wish to
09e0: 20 62 65 20 63 61 6c 6c 65 64 20 74 6f 20 62 75   be called to bu
09f0: 69 6c 64 20 74 61 72 67 65 74 73 0a 09 09 66 72  ild targets...fr
0a00: 6f 6d 20 61 20 4d 61 6b 65 66 69 6c 65 2e 20 20  om a Makefile.  
0a10: 54 68 69 73 20 73 63 72 69 70 74 20 69 73 20 67  This script is g
0a20: 65 6e 65 72 61 6c 6c 79 20 6d 6f 72 65 20 77 65  enerally more we
0a30: 6c 6c 20 74 65 73 74 65 64 0a 09 09 77 69 74 68  ll tested...with
0a40: 20 47 4e 55 20 4d 61 6b 65 2e 0a 0a 09 32 2e 20   GNU Make....2. 
0a50: 50 41 54 43 48 0a 09 09 53 70 65 63 69 66 69 65  PATCH...Specifie
0a60: 73 20 74 68 65 20 74 6f 6f 6c 20 79 6f 75 20 77  s the tool you w
0a70: 69 73 68 20 74 6f 20 62 65 20 63 61 6c 6c 65 64  ish to be called
0a80: 20 74 6f 20 61 70 70 6c 79 20 75 6e 69 66 69 65   to apply unifie
0a90: 64 0a 09 09 64 69 66 66 20 70 61 74 63 68 65 73  d...diff patches
0aa0: 2e 20 20 54 68 69 73 20 73 63 72 69 70 74 20 69  .  This script i
0ab0: 73 20 67 65 6e 65 72 61 6c 6c 79 20 6d 6f 72 65  s generally more
0ac0: 20 77 65 6c 6c 20 74 65 73 74 65 64 20 77 69 74   well tested wit
0ad0: 68 0a 09 09 47 4e 55 20 50 61 74 63 68 2e 20 0a  h...GNU Patch. .
0ae0: 0a 09 33 2e 20 54 43 4c 4b 49 54 0a 09 09 53 70  ..3. TCLKIT...Sp
0af0: 65 63 69 66 79 20 74 68 65 20 70 61 74 68 20 74  ecify the path t
0b00: 6f 20 61 20 54 63 6c 6b 69 74 20 74 68 61 74 20  o a Tclkit that 
0b10: 69 73 20 72 75 6e 6e 61 62 6c 65 20 6f 6e 20 74  is runnable on t
0b20: 68 65 20 63 75 72 72 65 6e 74 0a 09 09 73 79 73  he current...sys
0b30: 74 65 6d 2e 20 20 54 68 65 20 64 65 66 61 75 6c  tem.  The defaul
0b40: 74 20 69 73 20 22 74 63 6c 6b 69 74 22 2e 20 20  t is "tclkit".  
0b50: 41 20 77 6f 72 6b 69 6e 67 20 74 63 6c 6b 69 74  A working tclkit
0b60: 20 69 73 20 72 65 71 75 69 72 65 64 0a 09 09 66   is required...f
0b70: 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69  or cross-compili
0b80: 6e 67 20 54 63 6c 6b 69 74 73 2e 0a 0a 09 34 2e  ng Tclkits....4.
0b90: 20 53 54 41 54 49 43 54 4b 0a 09 09 53 70 65 63   STATICTK...Spec
0ba0: 69 66 79 20 74 68 69 73 20 61 73 20 22 31 22 20  ify this as "1" 
0bb0: 74 6f 20 73 74 61 74 69 63 61 6c 6c 79 20 6c 69  to statically li
0bc0: 6e 6b 20 74 6f 20 54 6b 2e 20 20 54 68 65 20 64  nk to Tk.  The d
0bd0: 65 66 61 75 6c 74 0a 09 09 61 63 74 69 6f 6e 20  efault...action 
0be0: 6f 6e 20 6d 6f 73 74 20 70 6c 61 74 66 6f 72 6d  on most platform
0bf0: 73 20 69 73 20 74 6f 20 64 79 6e 61 6d 69 63 61  s is to dynamica
0c00: 6c 6c 79 20 6c 69 6e 6b 20 74 6f 20 54 6b 2e 20  lly link to Tk. 
0c10: 20 57 68 65 6e 0a 09 09 62 75 69 6c 64 69 6e 67   When...building
0c20: 20 4b 69 74 44 4c 4c 2c 20 53 54 41 54 49 43 54   KitDLL, STATICT
0c30: 4b 20 69 73 20 22 31 22 20 62 79 20 64 65 66 61  K is "1" by defa
0c40: 75 6c 74 2e 20 20 49 66 20 79 6f 75 20 77 61 6e  ult.  If you wan
0c50: 74 20 74 6f 0a 09 09 65 6e 61 62 6c 65 20 64 79  t to...enable dy
0c60: 6e 61 6d 69 63 20 6c 69 6e 6b 69 6e 67 20 6f 66  namic linking of
0c70: 20 54 6b 20 77 69 74 68 20 4b 69 74 44 4c 4c 20   Tk with KitDLL 
0c80: 79 6f 75 20 77 69 6c 6c 20 68 61 76 65 20 74 6f  you will have to
0c90: 0a 09 09 73 70 65 63 69 66 79 20 74 68 69 73 20  ...specify this 
0ca0: 61 73 20 22 2d 31 22 2e 0a 0a 09 35 2e 20 53 54  as "-1"....5. ST
0cb0: 41 54 49 43 4d 4b 34 0a 09 09 53 70 65 63 69 66  ATICMK4...Specif
0cc0: 79 20 74 68 69 73 20 61 73 20 22 30 22 20 74 6f  y this as "0" to
0cd0: 20 61 74 74 65 6d 70 74 20 74 6f 20 63 72 65 61   attempt to crea
0ce0: 74 65 20 63 72 65 61 74 65 20 74 68 65 20 22 6d  te create the "m
0cf0: 6b 34 74 63 6c 22 0a 09 09 70 72 6f 6a 65 63 74  k4tcl"...project
0d00: 20 61 73 20 61 20 73 68 61 72 65 64 20 6f 62 6a   as a shared obj
0d10: 65 63 74 2e 20 20 49 66 20 74 68 69 73 20 66 61  ect.  If this fa
0d20: 69 6c 73 2c 20 69 74 20 77 69 6c 6c 20 66 61 6c  ils, it will fal
0d30: 6c 20 62 61 63 6b 0a 09 09 74 6f 20 62 75 69 6c  l back...to buil
0d40: 64 69 6e 67 20 73 74 61 74 69 63 61 6c 6c 79 2e  ding statically.
0d50: 20 20 53 70 65 63 69 66 79 20 69 74 20 61 73 20    Specify it as 
0d60: 22 2d 31 22 20 74 6f 20 66 6f 72 63 65 20 62 75  "-1" to force bu
0d70: 69 6c 64 69 6e 67 0a 09 09 69 74 20 61 73 20 61  ilding...it as a
0d80: 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 2e 20   shared object. 
0d90: 20 41 6e 79 20 6f 74 68 65 72 20 76 61 6c 75 65   Any other value
0da0: 2c 20 69 6e 63 6c 75 64 69 6e 67 20 62 65 69 6e  , including bein
0db0: 67 20 75 6e 73 65 74 0a 09 09 72 65 73 75 6c 74  g unset...result
0dc0: 73 20 69 6e 20 22 6d 6b 34 74 63 6c 22 20 62 65  s in "mk4tcl" be
0dd0: 69 6e 67 20 62 75 69 6c 74 20 61 6e 64 20 6c 69  ing built and li
0de0: 6e 6b 65 64 20 73 74 61 74 69 63 61 6c 6c 79 2e  nked statically.
0df0: 20 20 4b 69 74 44 49 4c 4c 0a 09 09 73 65 74 73    KitDILL...sets
0e00: 20 74 68 69 73 20 74 6f 20 76 61 72 69 61 62 6c   this to variabl
0e10: 65 20 74 6f 20 22 30 22 2e 20 20 49 66 20 4d 65  e to "0".  If Me
0e20: 74 61 6b 69 74 34 20 69 73 20 62 75 69 6c 74 20  takit4 is built 
0e30: 73 68 61 72 65 64 2c 20 69 74 0a 09 09 63 61 6e  shared, it...can
0e40: 6e 6f 74 20 62 65 20 75 73 65 64 20 66 6f 72 20  not be used for 
0e50: 74 68 65 20 6b 69 74 20 73 74 6f 72 61 67 65 20  the kit storage 
0e60: 66 6f 72 20 54 63 6c 6b 69 74 2e 0a 0a 09 36 2e  for Tclkit....6.
0e70: 20 53 54 52 49 50 0a 09 09 53 70 65 63 69 66 69   STRIP...Specifi
0e80: 65 73 20 74 68 65 20 74 6f 6f 6c 20 79 6f 75 20  es the tool you 
0e90: 77 69 73 68 20 74 6f 20 62 65 20 63 61 6c 6c 65  wish to be calle
0ea0: 64 20 74 6f 20 73 74 72 69 70 20 6f 62 6a 65 63  d to strip objec
0eb0: 74 20 66 69 6c 65 73 2c 0a 09 09 61 72 63 68 69  t files,...archi
0ec0: 76 65 73 2c 20 61 6e 64 20 73 68 61 72 65 64 20  ves, and shared 
0ed0: 6f 62 6a 65 63 74 73 2e 20 20 54 68 65 20 64 65  objects.  The de
0ee0: 66 61 75 6c 74 20 69 73 20 22 73 74 72 69 70 22  fault is "strip"
0ef0: 2e 20 20 59 6f 75 0a 09 09 73 68 6f 75 6c 64 20  .  You...should 
0f00: 70 72 6f 62 61 62 6c 79 20 73 65 74 20 74 68 69  probably set thi
0f10: 73 20 69 66 20 79 6f 75 20 61 72 65 20 63 72 6f  s if you are cro
0f20: 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 2e 0a 0a 09  ss-compiling....
0f30: 37 2e 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  7. KITCREATOR_PK
0f40: 47 53 0a 09 09 53 70 65 63 69 66 79 20 77 68 69  GS...Specify whi
0f50: 63 68 20 6e 6f 6e 2d 72 65 71 75 69 72 65 64 20  ch non-required 
0f60: 70 61 63 6b 61 67 65 73 20 74 6f 20 62 75 69 6c  packages to buil
0f70: 64 2e 20 20 54 68 65 20 64 65 66 61 75 6c 74 20  d.  The default 
0f80: 6c 69 73 74 0a 09 09 69 73 3a 0a 09 09 09 74 6b  list...is:....tk
0f90: 20 69 74 63 6c 20 6d 6b 34 74 63 6c 0a 0a 09 09   itcl mk4tcl....
0fa0: 49 66 20 6d 6b 34 74 63 6c 20 69 73 20 6e 6f 74  If mk4tcl is not
0fb0: 20 70 72 65 73 65 6e 74 20 61 20 5a 69 70 2d 62   present a Zip-b
0fc0: 61 73 65 64 20 73 74 6f 72 61 67 65 20 6d 65 63  ased storage mec
0fd0: 68 61 6e 69 73 6d 20 77 69 6c 6c 20 62 65 0a 09  hanism will be..
0fe0: 09 75 73 65 64 20 69 6e 73 74 65 61 64 2e 20 20  .used instead.  
0ff0: 54 6f 20 73 70 65 63 69 66 79 20 74 68 61 74 20  To specify that 
1000: 74 68 65 20 64 65 66 61 75 6c 74 20 62 65 20 75  the default be u
1010: 73 65 64 2c 20 64 6f 20 6e 6f 74 20 73 65 74 0a  sed, do not set.
1020: 09 09 74 68 69 73 20 6f 72 20 73 65 74 20 69 74  ..this or set it
1030: 20 74 6f 20 74 68 65 20 65 6d 70 74 79 20 73 74   to the empty st
1040: 72 69 6e 67 2e 20 20 54 6f 20 73 70 65 63 69 66  ring.  To specif
1050: 79 20 74 68 61 74 20 6e 6f 0a 09 09 6e 6f 6e 2d  y that no...non-
1060: 72 65 71 75 69 72 65 64 20 70 61 63 6b 61 67 65  required package
1070: 73 20 62 65 20 62 75 69 6c 74 2c 20 73 65 74 20  s be built, set 
1080: 69 74 20 74 6f 20 61 20 73 74 72 69 6e 67 20 74  it to a string t
1090: 68 61 74 0a 09 09 63 6f 6e 74 61 69 6e 73 20 6f  hat...contains o
10a0: 6e 6c 79 20 77 68 69 74 65 20 73 70 61 63 65 2e  nly white space.
10b0: 0a 0a 09 09 49 66 20 22 6b 69 74 64 6c 6c 22 20  ....If "kitdll" 
10c0: 69 73 20 73 70 65 63 69 66 69 65 64 20 69 6e 20  is specified in 
10d0: 74 68 65 20 6c 69 73 74 20 74 68 65 20 74 61 72  the list the tar
10e0: 67 65 74 20 62 65 63 6f 6d 65 73 20 4b 69 74 44  get becomes KitD
10f0: 4c 4c 0a 09 09 61 6e 64 20 6e 6f 20 54 63 6c 6b  LL...and no Tclk
1100: 69 74 20 77 69 6c 6c 20 62 75 69 6c 74 2c 20 62  it will built, b
1110: 75 74 20 69 6e 73 74 65 61 64 20 6c 69 62 74 63  ut instead libtc
1120: 6c 6b 69 74 2e 0a 0a 09 38 2e 20 4b 49 54 43 52  lkit....8. KITCR
1130: 45 41 54 4f 52 5f 4d 49 4e 45 4e 43 4f 44 49 4e  EATOR_MINENCODIN
1140: 47 53 0a 09 09 53 65 74 20 74 68 69 73 20 76 61  GS...Set this va
1150: 72 69 61 62 6c 65 20 74 6f 20 61 20 6e 6f 6e 2d  riable to a non-
1160: 65 6d 70 74 79 20 73 74 72 69 6e 67 20 74 6f 20  empty string to 
1170: 67 65 6e 65 72 61 74 65 20 61 20 54 63 6c 6b 69  generate a Tclki
1180: 74 0a 09 09 77 69 74 68 6f 75 74 20 61 6c 6c 20  t...without all 
1190: 65 6e 63 6f 64 69 6e 67 73 2c 20 6f 6e 6c 79 20  encodings, only 
11a0: 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 20 66 6f  including the fo
11b0: 6c 6c 6f 77 69 6e 67 3a 0a 09 09 09 61 73 63 69  llowing:....asci
11c0: 69 2e 65 6e 63 20 63 70 31 32 35 32 2e 65 6e 63  i.enc cp1252.enc
11d0: 20 69 73 6f 38 38 35 39 2d 31 2e 65 6e 63 20 69   iso8859-1.enc i
11e0: 73 6f 38 38 35 39 2d 31 35 2e 65 6e 63 0a 09 09  so8859-15.enc...
11f0: 09 69 73 6f 38 38 35 39 2d 32 2e 65 6e 63 20 6b  .iso8859-2.enc k
1200: 6f 69 38 2d 72 2e 65 6e 63 20 6d 61 63 52 6f 6d  oi8-r.enc macRom
1210: 61 6e 2e 65 6e 63 0a 0a 09 39 2e 20 4b 49 54 43  an.enc...9. KITC
1220: 52 45 41 54 4f 52 5f 4d 49 4e 42 55 49 4c 44 0a  REATOR_MINBUILD.
1230: 09 09 53 65 74 20 74 68 69 73 20 76 61 72 69 61  ..Set this varia
1240: 62 6c 65 20 74 6f 20 61 20 6e 6f 6e 2d 65 6d 70  ble to a non-emp
1250: 74 79 20 73 74 72 69 6e 67 20 74 6f 20 65 78 63  ty string to exc
1260: 6c 75 64 65 20 75 6e 6e 65 63 65 73 73 61 72 79  lude unnecessary
1270: 0a 09 09 70 61 63 6b 61 67 65 73 20 66 72 6f 6d  ...packages from
1280: 20 54 63 6c 20 62 75 69 6c 64 2e 20 20 54 68 69   Tcl build.  Thi
1290: 73 20 65 78 63 6c 75 64 65 73 20 74 68 65 20 66  s excludes the f
12a0: 6f 6c 6c 6f 77 69 6e 67 20 70 61 63 6b 61 67 65  ollowing package
12b0: 73 3a 0a 09 09 09 74 63 6c 74 65 73 74 0a 0a 09  s:....tcltest...
12c0: 09 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c 20 61  .Additionally, a
12d0: 6e 79 20 62 75 6e 64 6c 65 64 20 70 61 63 6b 61  ny bundled packa
12e0: 67 65 73 20 28 69 6e 20 74 68 65 20 22 70 6b 67  ges (in the "pkg
12f0: 73 22 20 64 69 72 65 63 74 6f 72 79 29 0a 09 09  s" directory)...
1300: 61 72 65 20 65 78 63 6c 75 64 65 64 2e 20 20 54  are excluded.  T
1310: 68 69 73 20 74 79 70 69 63 61 6c 6c 79 20 69 6e  his typically in
1320: 63 6c 75 64 65 73 20 28 61 73 20 6f 66 20 54 63  cludes (as of Tc
1330: 6c 20 38 2e 36 29 3a 0a 09 09 09 69 74 63 6c 20  l 8.6):....itcl 
1340: 74 68 72 65 61 64 0a 0a 09 09 41 6c 73 6f 2c 20  thread....Also, 
1350: 54 63 6c 4f 4f 20 69 73 20 72 65 6d 6f 76 65 64  TclOO is removed
1360: 20 66 72 6f 6d 20 54 63 6c 20 38 2e 36 20 66 6f   from Tcl 8.6 fo
1370: 72 63 65 66 75 6c 6c 79 2e 0a 0a 4b 69 74 73 68  rcefully...Kitsh
1380: 20 43 6f 6e 66 69 67 75 72 65 20 4f 70 74 69 6f   Configure Optio
1390: 6e 73 3a 0a 09 31 2e 20 2d 2d 65 6e 61 62 6c 65  ns:..1. --enable
13a0: 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7b 7a 69  -kit-storage={zi
13b0: 70 7c 6d 6b 34 7c 61 75 74 6f 7d 0a 09 09 53 70  p|mk4|auto}...Sp
13c0: 65 63 69 66 79 20 77 68 69 63 68 20 74 79 70 65  ecify which type
13d0: 20 6f 66 20 73 74 6f 72 61 67 65 20 74 6f 20 75   of storage to u
13e0: 73 65 20 77 69 74 68 20 74 68 65 20 54 63 6c 6b  se with the Tclk
13f0: 69 74 2e 20 20 54 68 65 0a 09 09 64 65 66 61 75  it.  The...defau
1400: 6c 74 20 69 73 20 74 6f 20 61 75 74 6f 2d 64 65  lt is to auto-de
1410: 74 65 63 74 2e 20 20 41 75 74 6f 2d 64 65 74 65  tect.  Auto-dete
1420: 63 74 69 6f 6e 20 75 73 65 73 20 4d 6b 34 20 69  ction uses Mk4 i
1430: 66 0a 09 09 61 76 61 69 6c 61 62 6c 65 20 61 6e  f...available an
1440: 64 20 62 75 69 6c 74 20 73 74 61 74 69 63 61 6c  d built statical
1450: 6c 79 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74  ly, otherwise it
1460: 20 66 61 6c 6c 73 20 62 61 63 6b 20 74 6f 20 5a   falls back to Z
1470: 69 70 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ip...-----------
1480: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 55 73 69 6e 67 20  ---------.Using 
1490: 74 68 65 20 4b 69 74 44 4c 4c 20 53 44 4b 0a 2d  the KitDLL SDK.-
14a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14b0: 2d 2d 2d 0a 57 68 65 6e 20 79 6f 75 20 62 75 69  ---.When you bui
14c0: 6c 64 20 61 20 4b 69 74 44 4c 4c 2c 20 61 20 22  ld a KitDLL, a "
14d0: 6c 69 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 3c 74  libtclkit-sdk-<t
14e0: 63 6c 76 65 72 73 3e 2e 74 61 72 2e 67 7a 22 20  clvers>.tar.gz" 
14f0: 74 61 72 62 61 6c 6c 20 69 73 20 61 6c 73 6f 0a  tarball is also.
1500: 70 72 6f 64 75 63 65 64 2e 20 20 54 68 69 73 20  produced.  This 
1510: 74 61 72 62 61 6c 6c 20 63 6f 6e 74 61 69 6e 73  tarball contains
1520: 20 74 68 65 20 54 63 6c 20 28 61 6e 64 20 54 6b   the Tcl (and Tk
1530: 2c 20 69 66 20 63 6f 6d 70 69 6c 65 64 29 20 73  , if compiled) s
1540: 74 75 62 73 20 6c 69 62 72 61 72 69 65 73 2c 0a  tubs libraries,.
1550: 61 6e 64 20 54 63 6c 20 28 61 6e 64 20 54 6b 2c  and Tcl (and Tk,
1560: 20 69 66 20 63 6f 6d 70 69 6c 65 64 29 20 68 65   if compiled) he
1570: 61 64 65 72 20 66 69 6c 65 73 20 6e 65 65 64 65  ader files neede
1580: 64 20 74 6f 20 63 6f 6d 70 69 6c 65 20 61 6e 64  d to compile and
1590: 20 6c 69 6e 6b 20 74 68 69 6e 67 73 0a 61 67 61   link things.aga
15a0: 69 6e 73 74 20 54 63 6c 20 28 61 6e 64 20 54 6b  inst Tcl (and Tk
15b0: 29 2e 20 20 49 74 20 61 6c 73 6f 20 69 6e 63 6c  ).  It also incl
15c0: 75 64 65 73 20 22 74 63 6c 43 6f 6e 66 69 67 2e  udes "tclConfig.
15d0: 73 68 22 20 28 61 6e 64 20 22 74 6b 43 6f 6e 66  sh" (and "tkConf
15e0: 69 67 2e 73 68 22 2c 20 69 66 0a 54 6b 20 77 61  ig.sh", if.Tk wa
15f0: 73 20 63 6f 6d 70 69 6c 65 64 29 2e 0a 0a 54 68  s compiled)...Th
1600: 65 20 70 75 72 70 6f 73 65 20 66 6f 72 20 74 68  e purpose for th
1610: 69 73 20 74 61 72 62 61 6c 6c 20 69 73 20 74 6f  is tarball is to
1620: 20 62 65 20 75 73 65 64 20 74 6f 20 62 75 69 6c   be used to buil
1630: 64 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 73  d Tcl extensions
1640: 20 6f 72 0a 61 70 70 6c 69 63 61 74 69 6f 6e 73   or.applications
1650: 20 74 68 61 74 20 72 65 6c 79 20 6f 6e 20 54 63   that rely on Tc
1660: 6c 2f 54 6b 20 75 73 69 6e 67 20 74 68 65 20 4b  l/Tk using the K
1670: 69 74 44 4c 4c 2e 0a 0a 54 6f 20 75 73 65 20 69  itDLL...To use i
1680: 74 2c 20 6f 6e 65 20 66 69 72 73 74 20 6d 75 73  t, one first mus
1690: 74 20 65 78 74 72 61 63 74 20 74 68 65 20 74 61  t extract the ta
16a0: 72 62 61 6c 6c 2e 20 20 41 66 74 65 72 20 74 68  rball.  After th
16b0: 61 74 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65  at the environme
16c0: 6e 74 0a 76 61 72 69 61 62 6c 65 20 22 54 43 4c  nt.variable "TCL
16d0: 4b 49 54 5f 53 44 4b 5f 44 49 52 22 20 6d 75 73  KIT_SDK_DIR" mus
16e0: 74 20 62 65 20 73 65 74 20 74 6f 20 74 68 65 20  t be set to the 
16f0: 64 69 72 65 63 74 6f 72 79 20 74 68 61 74 20 77  directory that w
1700: 61 73 20 63 72 65 61 74 65 64 20 69 6e 0a 6f 72  as created in.or
1710: 64 65 72 20 74 6f 20 6d 61 6b 65 20 6d 6f 73 74  der to make most
1720: 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65   of the variable
1730: 73 20 63 6f 6e 74 61 69 6e 20 75 73 65 66 75 6c  s contain useful
1740: 20 76 61 6c 75 65 73 2e 0a 0a 46 6f 72 20 65 78   values...For ex
1750: 61 6d 70 6c 65 2c 20 74 6f 20 62 75 69 6c 64 20  ample, to build 
1760: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 69  an extension usi
1770: 6e 67 20 74 68 65 20 4b 69 74 44 4c 4c 20 53 44  ng the KitDLL SD
1780: 4b 20 6f 6e 65 20 77 6f 75 6c 64 20 74 79 70 69  K one would typi
1790: 63 61 6c 6c 79 20 64 6f 0a 73 6f 6d 65 74 68 69  cally do.somethi
17a0: 6e 67 20 6c 69 6b 65 3a 0a 09 31 2e 20 43 6f 6d  ng like:..1. Com
17b0: 70 69 6c 65 20 4b 69 74 44 4c 4c 20 28 6d 61 79  pile KitDLL (may
17c0: 20 62 65 20 6f 6d 69 74 74 65 64 20 69 66 20 74   be omitted if t
17d0: 68 65 20 4b 69 74 44 4c 4c 20 53 44 4b 20 69 73  he KitDLL SDK is
17e0: 20 61 6c 72 65 61 64 79 0a 09 20 20 20 61 76 61   already..   ava
17f0: 69 6c 61 62 6c 65 29 0a 09 09 61 2e 20 24 20 4b  ilable)...a. $ K
1800: 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 3d 27  ITCREATOR_PKGS='
1810: 74 6b 20 69 74 63 6c 20 6b 69 74 64 6c 6c 27 0a  tk itcl kitdll'.
1820: 09 09 62 2e 20 24 20 65 78 70 6f 72 74 20 4b 49  ..b. $ export KI
1830: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a 09 09  TCREATOR_PKGS...
1840: 63 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61 74 6f  c. $ ./kitcreato
1850: 72 0a 09 32 2e 20 43 6f 6d 70 69 6c 65 20 74 68  r..2. Compile th
1860: 65 20 45 78 74 65 6e 73 69 6f 6e 0a 09 09 61 2e  e Extension...a.
1870: 20 24 20 74 61 72 20 2d 78 66 20 2f 70 61 74 68   $ tar -xf /path
1880: 2f 74 6f 2f 6c 69 62 74 63 6c 6b 69 74 2d 73 64  /to/libtclkit-sd
1890: 6b 2d 38 2e 34 2e 31 39 2e 74 61 72 2e 67 7a 0a  k-8.4.19.tar.gz.
18a0: 09 09 62 2e 20 24 20 54 43 4c 4b 49 54 5f 53 44  ..b. $ TCLKIT_SD
18b0: 4b 5f 44 49 52 3d 22 24 28 70 77 64 29 2f 6c 69  K_DIR="$(pwd)/li
18c0: 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 38 2e 34 2e  btclkit-sdk-8.4.
18d0: 31 39 22 0a 09 09 63 2e 20 24 20 65 78 70 6f 72  19"...c. $ expor
18e0: 74 20 54 43 4c 4b 49 54 5f 53 44 4b 5f 44 49 52  t TCLKIT_SDK_DIR
18f0: 0a 09 09 64 2e 20 24 20 2e 2f 63 6f 6e 66 69 67  ...d. $ ./config
1900: 75 72 65 20 2d 2d 77 69 74 68 2d 74 63 6c 3d 22  ure --with-tcl="
1910: 24 7b 54 43 4c 4b 49 54 5f 53 44 4b 5f 44 49 52  ${TCLKIT_SDK_DIR
1920: 7d 2f 6c 69 62 22 0a 09 09 65 2e 20 24 20 6d 61  }/lib"...e. $ ma
1930: 6b 65 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ke..------------
1940: 2d 2d 2d 2d 2d 2d 2d 0a 4d 65 74 68 6f 64 20 6f  -------.Method o
1950: 66 20 4f 70 65 72 61 74 69 6f 6e 0a 2d 2d 2d 2d  f Operation.----
1960: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
1970: 53 75 6d 6d 61 72 79 3a 0a 09 31 2e 20 22 6b 69  Summary:..1. "ki
1980: 74 63 72 65 61 74 6f 72 22 20 63 61 6c 6c 73 20  tcreator" calls 
1990: 2a 2f 62 75 69 6c 64 2e 73 68 0a 09 32 2e 20 2a  */build.sh..2. *
19a0: 2f 62 75 69 6c 64 2e 73 68 20 64 6f 77 6e 6c 6f  /build.sh downlo
19b0: 61 64 73 20 61 6e 64 20 63 6f 6d 70 69 6c 65 73  ads and compiles
19c0: 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 6f 66   appropriate sof
19d0: 74 77 61 72 65 0a 09 33 2e 20 2a 2f 62 75 69 6c  tware..3. */buil
19e0: 64 2e 73 68 20 69 6e 73 74 61 6c 6c 73 20 73 6f  d.sh installs so
19f0: 66 74 77 61 72 65 20 69 6e 74 6f 20 22 69 6e 73  ftware into "ins
1a00: 74 22 20 28 72 75 6e 2d 74 69 6d 65 20 2b 20 63  t" (run-time + c
1a10: 6f 6d 70 69 6c 65 2d 74 69 6d 65 29 0a 09 34 2e  ompile-time)..4.
1a20: 20 2a 2f 62 75 69 6c 64 2e 73 68 20 69 6e 73 74   */build.sh inst
1a30: 61 6c 6c 73 20 72 75 6e 2d 74 69 6d 65 20 73 6f  alls run-time so
1a40: 66 74 77 61 72 65 20 69 6e 74 6f 20 22 6f 75 74  ftware into "out
1a50: 22 2c 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a  ", this will be.
1a60: 09 20 20 20 69 6e 63 6c 75 64 65 64 20 69 6e 20  .   included in 
1a70: 74 68 65 20 54 63 6c 6b 69 74 20 61 73 20 69 66  the Tclkit as if
1a80: 20 69 74 20 77 65 72 65 20 74 68 65 20 72 6f 6f   it were the roo
1a90: 74 20 64 69 72 65 63 74 6f 72 79 20 6f 66 20 74  t directory of t
1aa0: 68 65 0a 09 20 20 20 54 63 6c 6b 69 74 20 28 63  he..   Tclkit (c
1ab0: 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 6f 74 68  ombined with oth
1ac0: 65 72 20 22 6f 75 74 22 20 64 69 72 65 63 74 6f  er "out" directo
1ad0: 72 69 65 73 29 0a 09 35 2e 20 6b 69 74 73 68 2f  ries)..5. kitsh/
1ae0: 62 75 69 6c 64 2e 73 68 20 63 6f 6d 70 69 6c 65  build.sh compile
1af0: 73 20 61 20 22 6d 61 69 6e 22 20 66 75 6e 63 74  s a "main" funct
1b00: 69 6f 6e 20 61 6e 64 20 6c 69 6e 6b 73 20 61 6c  ion and links al
1b10: 6c 20 74 68 65 20 62 75 69 6c 74 0a 09 20 20 20  l the built..   
1b20: 6c 69 62 72 61 72 69 65 73 20 74 6f 67 65 74 68  libraries togeth
1b30: 65 72 20 69 6e 74 6f 20 61 6e 20 65 78 65 63 75  er into an execu
1b40: 74 61 62 6c 65 0a 09 36 2e 20 6b 69 74 73 68 2f  table..6. kitsh/
1b50: 62 75 69 6c 64 2e 73 68 20 63 6f 6d 62 69 6e 65  build.sh combine
1b60: 73 20 61 6c 6c 20 74 68 65 20 22 6f 75 74 22 20  s all the "out" 
1b70: 64 69 72 65 63 74 6f 72 69 65 73 20 69 6e 74 6f  directories into
1b80: 20 6f 6e 65 0a 09 37 2e 20 6b 69 74 73 68 2f 62   one..7. kitsh/b
1b90: 75 69 6c 64 2e 73 68 20 63 72 65 61 74 65 73 20  uild.sh creates 
1ba0: 61 20 4d 65 74 61 6b 69 74 20 6f 72 20 5a 69 70  a Metakit or Zip
1bb0: 20 64 61 74 61 62 61 73 65 20 66 72 6f 6d 20 74   database from t
1bc0: 68 65 20 63 6f 6d 62 69 6e 65 64 0a 09 20 20 20  he combined..   
1bd0: 64 69 72 65 63 74 6f 72 69 65 73 20 61 6e 64 20  directories and 
1be0: 61 70 70 65 6e 64 73 20 74 68 61 74 20 74 6f 20  appends that to 
1bf0: 74 68 65 20 63 6f 6d 70 69 6c 65 64 20 65 78 65  the compiled exe
1c00: 63 75 74 61 62 6c 65 20 75 73 69 6e 67 3a 0a 09  cutable using:..
1c10: 09 61 2e 20 41 20 54 63 6c 6b 69 74 20 66 6f 75  .a. A Tclkit fou
1c20: 6e 64 20 69 6e 20 74 68 65 20 65 6e 76 69 72 6f  nd in the enviro
1c30: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 20 22  nment variable "
1c40: 54 43 4c 4b 49 54 22 20 28 74 63 6c 6b 69 74 0a  TCLKIT" (tclkit.
1c50: 09 09 20 20 20 69 66 20 75 6e 73 65 74 29 20 69  ..   if unset) i
1c60: 66 20 69 74 20 69 73 20 66 75 6e 63 74 69 6f 6e  f it is function
1c70: 61 6c 3b 20 6f 72 0a 09 09 62 2e 20 54 68 65 20  al; or...b. The 
1c80: 62 75 69 6c 74 20 6b 69 74 20 69 74 73 65 6c 66  built kit itself
1c90: 20 28 64 6f 65 73 20 6e 6f 74 20 77 6f 72 6b 20   (does not work 
1ca0: 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c  for cross-compil
1cb0: 69 6e 67 29 0a 0a 44 65 74 61 69 6c 73 3a 0a 09  ing)..Details:..
1cc0: 54 68 65 20 67 65 6e 65 72 61 6c 20 6d 65 63 68  The general mech
1cd0: 61 6e 69 73 6d 20 74 68 61 74 20 65 6e 61 62 6c  anism that enabl
1ce0: 65 73 20 61 20 54 63 6c 6b 69 74 20 74 6f 20 6f  es a Tclkit to o
1cf0: 70 65 72 61 74 65 20 69 73 20 61 20 73 6d 61 6c  perate is a smal
1d00: 6c 20 54 63 6c 0a 69 6e 69 74 69 61 6c 69 7a 61  l Tcl.initializa
1d10: 74 69 6f 6e 20 72 6f 75 74 69 6e 65 20 6c 69 6e  tion routine lin
1d20: 6b 65 64 20 73 74 61 74 69 63 61 6c 6c 79 20 74  ked statically t
1d30: 6f 20 74 68 65 20 63 6f 72 65 20 6c 69 62 72 61  o the core libra
1d40: 72 69 65 73 20 6e 65 65 64 65 64 20 74 6f 0a 6f  ries needed to.o
1d50: 70 65 72 61 74 65 20 61 20 54 63 6c 20 69 6e 74  perate a Tcl int
1d60: 65 72 70 72 65 74 65 72 2c 20 74 68 65 20 54 63  erpreter, the Tc
1d70: 6c 20 56 46 53 20 4c 61 79 65 72 2c 20 61 6e 64  l VFS Layer, and
1d80: 20 61 20 64 61 74 61 62 61 73 65 2d 62 61 63 6b   a database-back
1d90: 65 64 20 28 4d 65 74 61 6b 69 74 29 0a 56 69 72  ed (Metakit).Vir
1da0: 74 75 61 6c 20 46 69 6c 65 20 53 79 73 74 65 6d  tual File System
1db0: 20 74 68 61 74 20 69 73 20 61 70 70 65 6e 64 65   that is appende
1dc0: 64 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20  d to the end of 
1dd0: 74 68 65 20 65 78 65 63 75 74 61 62 6c 65 2e 0a  the executable..
1de0: 0a 54 68 69 73 20 70 72 6f 6a 65 63 74 20 62 72  .This project br
1df0: 69 6e 67 73 20 74 6f 67 65 74 68 65 72 20 61 6c  ings together al
1e00: 6c 20 6f 66 20 74 68 65 20 72 65 71 75 69 72 65  l of the require
1e10: 64 20 70 69 65 63 65 73 2c 20 70 6c 75 73 20 73  d pieces, plus s
1e20: 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 70  ome additional.p
1e30: 69 65 63 65 73 20 74 68 61 74 20 77 65 72 65 20  ieces that were 
1e40: 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 6f 72 69  found in the ori
1e50: 67 69 6e 61 6c 20 54 63 6c 6b 69 74 3a 0a 09 31  ginal Tclkit:..1
1e60: 2e 20 54 6b 20 28 64 79 6e 61 6d 69 63 61 6c 6c  . Tk (dynamicall
1e70: 79 20 6c 69 6e 6b 65 64 29 0a 09 32 2e 20 49 74  y linked)..2. It
1e80: 63 6c 20 28 64 79 6e 61 6d 69 63 61 6c 6c 79 20  cl (dynamically 
1e90: 6c 69 6e 6b 65 64 29 0a 0a 54 68 65 20 73 6f 75  linked)..The sou
1ea0: 72 63 65 20 63 6f 64 65 20 66 6f 72 20 74 68 65  rce code for the
1eb0: 73 65 20 70 69 65 63 65 73 20 61 72 65 20 64 6f  se pieces are do
1ec0: 77 6e 6c 6f 61 64 65 64 2c 20 63 6f 6d 70 69 6c  wnloaded, compil
1ed0: 65 64 2c 20 61 6e 64 20 6c 69 6e 6b 65 64 2c 20  ed, and linked, 
1ee0: 61 6e 64 20 74 68 65 0a 64 61 74 61 62 61 73 65  and the.database
1ef0: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20   containing the 
1f00: 61 70 70 72 6f 70 72 69 61 74 65 20 66 69 6c 65  appropriate file
1f10: 73 79 73 74 65 6d 20 64 61 74 61 20 69 73 20 63  system data is c
1f20: 72 65 61 74 65 64 2e 20 20 57 68 61 74 20 73 65  reated.  What se
1f30: 74 73 0a 74 68 69 73 20 70 72 6f 6a 65 63 74 20  ts.this project 
1f40: 61 70 61 72 74 20 66 72 6f 6d 20 6f 74 68 65 72  apart from other
1f50: 20 73 69 6d 69 6c 61 72 20 70 72 6f 6a 65 63 74   similar project
1f60: 73 20 69 73 20 74 68 61 74 3a 0a 09 31 2e 20 49  s is that:..1. I
1f70: 74 20 61 74 74 65 6d 70 74 73 20 74 6f 20 62 65  t attempts to be
1f80: 20 6d 6f 64 75 6c 61 72 3b 0a 09 32 2e 20 49 74   modular;..2. It
1f90: 20 73 75 70 70 6f 72 74 73 20 63 72 6f 73 73 2d   supports cross-
1fa0: 63 6f 6d 70 69 6c 69 6e 67 3b 0a 09 33 2e 20 49  compiling;..3. I
1fb0: 74 20 64 6f 77 6e 6c 6f 61 64 73 20 74 68 65 20  t downloads the 
1fc0: 73 6f 75 72 63 65 20 66 72 6f 6d 20 74 68 65 69  source from thei
1fd0: 72 20 6f 72 69 67 69 6e 61 6c 20 72 65 70 6f 73  r original repos
1fe0: 69 74 6f 72 69 65 73 3b 0a 09 34 2e 20 49 74 20  itories;..4. It 
1ff0: 61 6c 6c 6f 77 73 20 79 6f 75 20 74 6f 20 73 70  allows you to sp
2000: 65 63 69 66 79 20 61 6e 20 61 72 62 69 74 72 61  ecify an arbitra
2010: 72 79 20 76 65 72 73 69 6f 6e 20 6f 66 20 54 63  ry version of Tc
2020: 6c 20 28 69 6e 63 6c 75 64 69 6e 67 0a 09 20 20  l (including..  
2030: 20 43 56 53 29 3b 20 61 6e 64 0a 09 35 2e 20 49   CVS); and..5. I
2040: 74 20 75 73 65 73 20 47 4e 55 20 41 75 74 6f 63  t uses GNU Autoc
2050: 6f 6e 66 20 73 63 72 69 70 74 73 20 66 6f 72 20  onf scripts for 
2060: 63 6f 6d 70 69 6c 69 6e 67 20 74 68 65 20 70 61  compiling the pa
2070: 72 74 20 6f 66 20 74 68 65 20 54 63 6c 6b 69 74  rt of the Tclkit
2080: 0a 09 20 20 20 74 68 61 74 20 62 72 69 6e 67 73  ..   that brings
2090: 20 74 68 65 20 77 68 6f 6c 65 20 74 68 69 6e 67   the whole thing
20a0: 20 74 6f 67 65 74 68 65 72 20 28 74 68 65 20 4b   together (the K
20b0: 69 74 73 68 29 0a 0a 54 6f 20 61 63 63 6f 6d 70  itsh)..To accomp
20c0: 6c 69 73 68 20 74 68 65 73 65 20 67 6f 61 6c 73  lish these goals
20d0: 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d   the following m
20e0: 65 63 68 61 6e 69 73 6d 73 20 61 72 65 20 69 6e  echanisms are in
20f0: 20 70 6c 61 63 65 3a 0a 09 31 2e 20 54 68 65 20   place:..1. The 
2100: 74 6f 70 2d 6c 65 76 65 6c 20 22 6b 69 74 63 72  top-level "kitcr
2110: 65 61 74 6f 72 22 20 73 63 72 69 70 74 3b 20 61  eator" script; a
2120: 6e 64 0a 09 32 2e 20 50 65 72 2d 70 72 6f 6a 65  nd..2. Per-proje
2130: 63 74 20 73 75 62 64 69 72 65 63 74 6f 72 69 65  ct subdirectorie
2140: 73 2c 20 65 61 63 68 20 63 6f 6e 74 61 69 6e 69  s, each containi
2150: 6e 67 20 61 20 22 62 75 69 6c 64 2e 73 68 22 20  ng a "build.sh" 
2160: 73 63 72 69 70 74 0a 0a 54 68 65 20 74 6f 70 2d  script..The top-
2170: 6c 65 76 65 6c 20 22 6b 69 74 63 72 65 61 74 6f  level "kitcreato
2180: 72 22 20 73 63 72 69 70 74 20 69 73 20 76 65 72  r" script is ver
2190: 79 20 73 69 6d 70 6c 65 2e 20 20 49 74 73 20 6f  y simple.  Its o
21a0: 6e 6c 79 20 6a 6f 62 20 69 73 20 74 6f 0a 69 6e  nly job is to.in
21b0: 74 65 72 70 72 65 74 20 63 6f 6d 6d 61 6e 64 20  terpret command 
21c0: 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 2c 20  line arguments, 
21d0: 61 6e 64 20 63 61 6c 6c 20 74 68 65 20 70 65 72  and call the per
21e0: 2d 70 72 6f 6a 65 63 74 20 22 62 75 69 6c 64 2e  -project "build.
21f0: 73 68 22 20 73 63 72 69 70 74 73 2e 0a 46 6f 72  sh" scripts..For
2200: 20 74 68 65 20 22 74 63 6c 22 20 70 72 6f 6a 65   the "tcl" proje
2210: 63 74 20 69 74 20 61 6c 73 6f 20 66 69 6e 64 73  ct it also finds
2220: 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65   the appropriate
2230: 20 22 74 63 6c 43 6f 6e 66 69 67 2e 73 68 22 20   "tclConfig.sh" 
2240: 28 61 6e 64 20 73 74 6f 72 65 73 0a 74 68 69 73  (and stores.this
2250: 20 70 61 74 68 20 69 6e 20 54 43 4c 43 4f 4e 46   path in TCLCONF
2260: 49 47 44 49 52 29 20 74 6f 20 65 6e 61 62 6c 65  IGDIR) to enable
2270: 20 73 75 62 73 65 71 75 65 6e 74 20 62 75 69 6c   subsequent buil
2280: 64 20 73 63 72 69 70 74 73 20 74 6f 20 66 69 6e  d scripts to fin
2290: 64 20 74 68 65 0a 61 70 70 72 6f 70 72 69 61 74  d the.appropriat
22a0: 65 20 54 63 6c 20 74 6f 20 6c 69 6e 6b 20 61 67  e Tcl to link ag
22b0: 61 69 6e 73 74 2e 0a 0a 54 68 65 20 70 65 72 2d  ainst...The per-
22c0: 70 72 6f 6a 65 63 74 20 22 62 75 69 6c 64 2e 73  project "build.s
22d0: 68 22 20 73 63 72 69 70 74 73 20 61 72 65 20 65  h" scripts are e
22e0: 6e 74 69 72 65 6c 79 20 61 75 74 6f 6e 6f 6d 6f  ntirely autonomo
22f0: 75 73 2e 20 20 54 68 65 79 20 61 72 65 0a 72 65  us.  They are.re
2300: 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 64 6f  sponsible for do
2310: 77 6e 6c 6f 61 64 69 6e 67 20 74 68 65 20 73 6f  wnloading the so
2320: 75 72 63 65 20 63 6f 64 65 20 66 6f 72 20 74 68  urce code for th
2330: 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 76 65  e appropriate ve
2340: 72 73 69 6f 6e 20 74 68 61 74 0a 77 69 6c 6c 20  rsion that.will 
2350: 63 6f 6d 70 69 6c 65 20 61 6e 64 20 6c 69 6e 6b  compile and link
2360: 20 61 67 61 69 6e 73 74 20 74 68 65 20 63 75 72   against the cur
2370: 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20  rent version of 
2380: 54 63 6c 20 28 75 73 65 72 20 72 65 71 75 65 73  Tcl (user reques
2390: 74 65 64 0a 76 65 72 73 69 6f 6e 20 63 61 6e 20  ted.version can 
23a0: 62 65 20 66 6f 75 6e 64 20 69 6e 20 22 54 43 4c  be found in "TCL
23b0: 56 45 52 53 22 2c 20 77 68 69 6c 65 20 74 68 65  VERS", while the
23c0: 20 61 63 74 75 61 6c 20 76 65 72 73 69 6f 6e 20   actual version 
23d0: 6d 75 73 74 20 62 65 20 72 65 71 75 65 73 74 65  must be requeste
23e0: 64 0a 66 72 6f 6d 20 74 68 65 20 22 74 63 6c 43  d.from the "tclC
23f0: 6f 6e 66 69 67 2e 73 68 22 20 73 63 72 69 70 74  onfig.sh" script
2400: 29 2c 20 63 6f 6d 70 69 6c 69 6e 67 20 69 74 2c  ), compiling it,
2410: 20 69 6e 73 74 61 6c 6c 69 6e 67 20 61 20 66 75   installing a fu
2420: 6e 63 74 69 6f 6e 61 6c 20 63 6f 70 79 0a 69 6e  nctional copy.in
2430: 74 6f 20 74 68 65 20 70 65 72 2d 70 72 6f 6a 65  to the per-proje
2440: 63 74 20 22 69 6e 73 74 22 20 64 69 72 65 63 74  ct "inst" direct
2450: 6f 72 79 2c 20 61 6e 64 20 69 6e 73 74 61 6c 6c  ory, and install
2460: 69 6e 67 20 61 6e 79 74 68 69 6e 67 20 74 68 61  ing anything tha
2470: 74 20 6e 65 65 64 73 20 74 6f 0a 62 65 20 69 6e  t needs to.be in
2480: 20 74 68 65 20 54 63 6c 6b 69 74 27 73 20 56 46   the Tclkit's VF
2490: 53 20 72 6f 6f 74 20 69 6e 74 6f 20 74 68 65 20  S root into the 
24a0: 70 65 72 2d 70 72 6f 6a 65 63 74 20 22 6f 75 74  per-project "out
24b0: 22 20 64 69 72 65 63 74 6f 72 79 2e 0a 0a 41 6e  " directory...An
24c0: 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 70 72 6f  y additional pro
24d0: 6a 65 63 74 73 20 63 61 6e 20 62 65 20 69 6e 63  jects can be inc
24e0: 6c 75 64 65 64 20 73 69 6d 70 6c 79 20 62 79 20  luded simply by 
24f0: 63 72 65 61 74 69 6e 67 20 74 68 65 20 61 70 70  creating the app
2500: 72 6f 70 72 69 61 74 65 0a 64 69 72 65 63 74 6f  ropriate.directo
2510: 72 79 20 69 6e 20 74 68 65 20 73 61 6d 65 20 64  ry in the same d
2520: 69 72 65 63 74 6f 72 79 20 61 73 20 74 68 65 20  irectory as the 
2530: 22 6b 69 74 63 72 65 61 74 6f 72 22 20 73 63 72  "kitcreator" scr
2540: 69 70 74 2c 20 63 72 65 61 74 69 6e 67 20 61 0a  ipt, creating a.
2550: 22 62 75 69 6c 64 2e 73 68 22 20 73 63 72 69 70  "build.sh" scrip
2560: 74 20 69 6e 20 74 68 61 74 20 64 69 72 65 63 74  t in that direct
2570: 6f 72 79 20 74 68 61 74 20 66 6f 6c 6c 6f 77 73  ory that follows
2580: 20 74 68 65 20 61 62 6f 76 65 20 70 72 6f 63 65   the above proce
2590: 64 75 72 65 2c 20 61 6e 64 20 74 68 65 6e 0a 72  dure, and then.r
25a0: 65 66 65 72 65 6e 63 69 6e 67 20 74 68 61 74 20  eferencing that 
25b0: 64 69 72 65 63 74 6f 72 79 20 69 6e 20 22 4b 49  directory in "KI
25c0: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 22 20 66  TCREATOR_PKGS" f
25d0: 6f 72 20 74 68 65 20 22 6b 69 74 63 72 65 61 74  or the "kitcreat
25e0: 6f 72 22 20 69 6e 76 6f 63 61 74 69 6f 6e 2e 0a  or" invocation..
25f0: 49 6e 20 74 68 69 73 20 77 61 79 20 4b 69 74 43  In this way KitC
2600: 72 65 61 74 6f 72 20 69 73 20 22 70 6c 75 67 67  reator is "plugg
2610: 61 62 6c 65 22 2e 20 20 49 6e 63 6c 75 64 65 64  able".  Included
2620: 20 70 61 63 6b 61 67 65 73 20 6d 61 79 20 62 65   packages may be
2630: 20 65 69 74 68 65 72 0a 73 74 61 74 69 63 61 6c   either.statical
2640: 6c 79 20 6f 72 20 64 79 6e 61 6d 69 63 61 6c 6c  ly or dynamicall
2650: 79 20 6c 69 6e 6b 65 64 2e 20 20 49 66 20 69 74  y linked.  If it
2660: 20 69 73 20 73 74 61 74 69 63 61 6c 6c 79 20 6c   is statically l
2670: 69 6e 6b 65 64 20 74 68 65 6e 20 74 68 65 20 6d  inked then the m
2680: 6f 64 75 6c 65 0a 6e 61 6d 65 20 6d 75 73 74 20  odule.name must 
2690: 62 65 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74  be the name of t
26a0: 68 65 20 64 69 72 65 63 74 6f 72 79 20 2d 2d 20  he directory -- 
26b0: 74 68 61 74 20 69 73 2c 20 69 66 20 74 68 65 20  that is, if the 
26c0: 64 69 72 65 63 74 6f 72 79 20 77 65 72 65 20 22  directory were "
26d0: 66 6f 6f 22 2c 0a 4b 69 74 43 72 65 61 74 6f 72  foo",.KitCreator
26e0: 20 77 69 6c 6c 20 65 78 70 65 63 74 20 74 6f 20   will expect to 
26f0: 69 6e 69 74 69 61 6c 69 7a 65 20 74 68 65 20 6d  initialize the m
2700: 6f 64 75 6c 65 20 73 74 61 74 69 63 61 6c 6c 79  odule statically
2710: 20 75 73 69 6e 67 20 46 6f 6f 5f 49 6e 69 74 28   using Foo_Init(
2720: 29 2e 0a 0a 54 68 65 20 65 78 63 65 70 74 69 6f  )...The exceptio
2730: 6e 20 74 6f 20 74 68 69 73 20 69 73 20 74 68 65  n to this is the
2740: 20 22 6b 69 74 73 68 22 20 70 72 6f 6a 65 63 74   "kitsh" project
2750: 2e 20 20 49 74 20 69 73 20 74 68 65 20 67 6c 75  .  It is the glu
2760: 65 20 74 68 61 74 20 62 69 6e 64 73 20 61 6c 6c  e that binds all
2770: 0a 74 68 65 20 69 6e 64 69 76 69 64 75 61 6c 20  .the individual 
2780: 70 72 6f 6a 65 63 74 73 20 74 6f 67 65 74 68 65  projects togethe
2790: 72 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20  r into a single 
27a0: 65 78 65 63 75 74 61 62 6c 65 2e 20 20 49 74 73  executable.  Its
27b0: 20 62 75 69 6c 64 20 73 63 72 69 70 74 0a 64 6f   build script.do
27c0: 65 73 20 6e 6f 74 20 63 72 65 61 74 65 20 61 6e  es not create an
27d0: 20 22 69 6e 73 74 22 20 6f 72 20 61 6e 20 22 6f   "inst" or an "o
27e0: 75 74 22 20 64 69 72 65 63 74 6f 72 79 20 62 65  ut" directory be
27f0: 63 61 75 73 65 20 69 74 20 69 73 20 6e 6f 74 20  cause it is not 
2800: 61 20 6c 69 62 72 61 72 79 2e 0a 49 6e 73 74 65  a library..Inste
2810: 61 64 2c 20 69 74 20 63 6f 6c 6c 65 63 74 73 20  ad, it collects 
2820: 61 6c 6c 20 74 68 65 20 6f 74 68 65 72 20 70 72  all the other pr
2830: 6f 6a 65 63 74 27 73 20 22 6f 75 74 22 20 64 69  oject's "out" di
2840: 72 65 63 74 6f 72 69 65 73 20 69 6e 74 6f 20 61  rectories into a
2850: 20 73 69 6e 67 6c 65 0a 64 69 72 65 63 74 6f 72   single.director
2860: 79 20 28 73 74 61 72 70 61 63 6b 2e 76 66 73 29  y (starpack.vfs)
2870: 2c 20 61 73 20 77 65 6c 6c 20 61 20 73 74 61 74  , as well a stat
2880: 69 63 20 66 69 6c 65 20 28 62 6f 6f 74 2e 74 63  ic file (boot.tc
2890: 6c 29 2e 20 49 74 20 74 68 65 6e 20 63 6f 6d 70  l). It then comp
28a0: 69 6c 65 73 0a 74 68 65 20 73 6f 75 72 63 65 20  iles.the source 
28b0: 63 6f 64 65 2c 20 61 6e 64 20 74 68 65 6e 20 69  code, and then i
28c0: 6e 73 74 61 6c 6c 73 20 74 68 65 20 56 46 53 20  nstalls the VFS 
28d0: 6f 6e 74 6f 20 74 68 65 20 72 65 73 75 6c 74 69  onto the resulti
28e0: 6e 67 20 65 78 65 63 75 74 61 62 6c 65 2e 0a 54  ng executable..T
28f0: 68 65 20 56 46 53 20 69 73 20 63 72 65 61 74 65  he VFS is create
2900: 64 20 62 79 20 74 68 65 20 22 69 6e 73 74 61 6c  d by the "instal
2910: 6c 76 66 73 2e 74 63 6c 22 20 73 63 72 69 70 74  lvfs.tcl" script
2920: 20 66 6f 72 20 4b 69 74 73 68 2e 20 20 46 6f 72   for Kitsh.  For
2930: 20 4b 69 74 44 4c 4c 20 74 68 65 0a 56 46 53 20   KitDLL the.VFS 
2940: 69 73 20 63 72 65 61 74 65 64 20 62 79 20 22 64  is created by "d
2950: 69 72 32 63 2e 74 63 6c 22 2e 0a 0a 49 66 20 74  ir2c.tcl"...If t
2960: 68 65 20 22 6d 6b 34 74 63 6c 22 20 70 72 6f 6a  he "mk4tcl" proj
2970: 65 63 74 20 66 61 69 6c 73 20 74 6f 20 62 75 69  ect fails to bui
2980: 6c 64 20 28 6f 72 20 69 73 20 6e 6f 74 20 72 65  ld (or is not re
2990: 71 75 65 73 74 65 64 20 74 6f 20 62 65 20 62 75  quested to be bu
29a0: 69 6c 74 29 2c 0a 74 68 65 20 72 65 73 74 20 6f  ilt),.the rest o
29b0: 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 77 69  f the project wi
29c0: 6c 6c 20 62 65 20 62 75 69 6c 74 20 75 73 69 6e  ll be built usin
29d0: 67 20 7a 69 70 20 66 69 6c 65 73 20 69 6e 73 74  g zip files inst
29e0: 65 61 64 20 6f 66 20 4d 65 74 61 6b 69 74 0a 64  ead of Metakit.d
29f0: 61 74 61 62 61 73 65 73 2e 0a 0a 54 6f 20 63 72  atabases...To cr
2a00: 65 61 74 65 20 74 68 65 20 73 74 6f 72 61 67 65  eate the storage
2a10: 20 64 61 74 61 62 61 73 65 2c 20 6f 6e 65 20 6f   database, one o
2a20: 66 20 74 77 6f 20 54 63 6c 6b 69 74 73 20 69 73  f two Tclkits is
2a30: 20 75 73 65 64 20 28 74 72 69 65 64 20 69 6e 20   used (tried in 
2a40: 74 68 69 73 0a 6f 72 64 65 72 29 3a 0a 09 31 2e  this.order):..1.
2a50: 20 54 68 65 20 54 63 6c 6b 69 74 20 73 70 65 63   The Tclkit spec
2a60: 69 66 69 65 64 20 62 79 20 74 68 65 20 54 43 4c  ified by the TCL
2a70: 4b 49 54 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  KIT environment 
2a80: 76 61 72 69 61 62 6c 65 20 28 6f 72 0a 09 20 20  variable (or..  
2a90: 20 22 74 63 6c 6b 69 74 22 20 69 66 20 74 68 61   "tclkit" if tha
2aa0: 74 20 76 61 72 69 61 62 6c 65 20 69 73 20 6e 6f  t variable is no
2ab0: 74 20 73 65 74 29 20 69 66 20 69 74 20 69 73 20  t set) if it is 
2ac0: 66 75 6e 63 74 69 6f 6e 61 6c 3b 20 6f 72 0a 09  functional; or..
2ad0: 32 2e 20 54 68 65 20 62 75 69 6c 74 20 54 63 6c  2. The built Tcl
2ae0: 6b 69 74 20 69 74 73 65 6c 66 0a 0a 54 68 65 20  kit itself..The 
2af0: 73 65 63 6f 6e 64 20 6d 65 74 68 6f 64 20 77 69  second method wi
2b00: 6c 6c 20 6e 6f 74 20 77 6f 72 6b 20 69 66 20 74  ll not work if t
2b10: 68 65 20 62 75 69 6c 74 20 54 63 6c 6b 69 74 20  he built Tclkit 
2b20: 69 73 20 6e 6f 74 20 65 78 65 63 75 74 61 62 6c  is not executabl
2b30: 65 20 6f 6e 20 74 68 65 0a 63 75 72 72 65 6e 74  e on the.current
2b40: 20 70 6c 61 74 66 6f 72 6d 20 28 69 2e 65 2e 2c   platform (i.e.,
2b50: 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20   in the case of 
2b60: 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 6f  cross-compilatio
2b70: 6e 29 20 61 6e 64 20 73 6f 20 69 74 20 6d 61 79  n) and so it may
2b80: 20 62 65 0a 6e 65 63 65 73 73 61 72 79 20 74 6f   be.necessary to
2b90: 20 62 6f 6f 74 73 74 72 61 70 20 61 20 72 75 6e   bootstrap a run
2ba0: 6e 61 62 6c 65 20 54 63 6c 6b 69 74 20 66 69 72  nable Tclkit fir
2bb0: 73 74 2e 0a 0a 4b 69 74 44 4c 4c 20 6d 6f 75 6e  st...KitDLL moun
2bc0: 74 73 20 74 68 65 20 56 46 53 20 66 6f 72 20 65  ts the VFS for e
2bd0: 76 65 72 79 20 69 6e 74 65 72 70 72 65 74 65 72  very interpreter
2be0: 20 74 68 61 74 20 63 61 6c 6c 73 20 54 63 6c 5f   that calls Tcl_
2bf0: 49 6e 69 74 28 29 2e 20 20 54 68 65 20 73 79 73  Init().  The sys
2c00: 74 65 6d 0a 56 46 53 20 74 68 61 74 20 69 73 20  tem.VFS that is 
2c10: 63 72 65 61 74 65 64 20 61 74 20 62 75 69 6c 64  created at build
2c20: 20 74 69 6d 65 20 69 73 20 6d 6f 75 6e 74 65 64   time is mounted
2c30: 20 61 74 20 2f 2e 4b 49 54 44 4c 4c 5f 54 43 4c   at /.KITDLL_TCL
2c40: 2e 20 20 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c  .  Additionally,
2c50: 0a 69 66 20 74 68 65 72 65 20 69 73 20 61 20 5a  .if there is a Z
2c60: 49 50 20 66 69 6c 65 20 61 70 70 65 6e 64 65 64  IP file appended
2c70: 20 74 6f 20 74 68 65 20 44 4c 4c 20 69 74 20 77   to the DLL it w
2c80: 69 6c 6c 20 62 65 20 6d 6f 75 6e 74 65 64 20 61  ill be mounted a
2c90: 74 20 2f 2e 4b 49 54 44 4c 4c 5f 55 53 45 52 0a  t /.KITDLL_USER.
2ca0: 61 6e 64 20 69 66 20 74 68 65 72 65 20 69 73 20  and if there is 
2cb0: 61 20 5a 49 50 20 66 69 6c 65 20 61 70 70 65 6e  a ZIP file appen
2cc0: 64 65 64 20 74 6f 20 74 68 65 20 65 78 65 63 75  ded to the execu
2cd0: 74 61 62 6c 65 20 69 74 20 77 69 6c 6c 20 62 65  table it will be
2ce0: 20 6d 6f 75 6e 74 65 64 20 61 74 0a 2f 2e 4b 49   mounted at./.KI
2cf0: 54 44 4c 4c 5f 41 50 50 2e 20 20 41 6c 6c 20 56  TDLL_APP.  All V
2d00: 46 53 65 73 20 74 68 61 74 20 61 72 65 20 6d 6f  FSes that are mo
2d10: 75 6e 74 65 64 20 68 61 76 65 20 74 68 65 20 22  unted have the "
2d20: 6c 69 62 22 20 73 75 62 2d 64 69 72 65 63 74 6f  lib" sub-directo
2d30: 72 79 20 61 70 70 65 6e 64 65 64 0a 74 6f 20 74  ry appended.to t
2d40: 68 65 20 69 6e 74 65 72 70 72 65 74 65 72 73 20  he interpreters 
2d50: 22 61 75 74 6f 5f 70 61 74 68 22 20 76 61 72 69  "auto_path" vari
2d60: 61 62 6c 65 2e 0a                                able..