Hex Artifact Content

Artifact 6e4626570937a0ab8b22c2abf133216303ac32d2:


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 4b 69 74 44 4c 4c 20 77 69 74 68 6f 75 74 20   KitDLL without 
0740: 4d 65 74 61 6b 69 74 20 73 75 70 70 6f 72 74 20  Metakit support 
0750: 28 77 69 6c 6c 20 6e 6f 74 20 63 72 65 61 74 65  (will not create
0760: 20 61 20 54 63 6c 6b 69 74 0a 09 20 20 20 20 62   a Tclkit..    b
0770: 69 6e 61 72 79 2c 20 6a 75 73 74 20 74 68 65 20  inary, just the 
0780: 6c 69 62 72 61 72 79 29 3a 0a 09 09 61 2e 20 24  library):...a. $
0790: 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53   KITCREATOR_PKGS
07a0: 3d 27 74 6b 20 69 74 63 6c 20 6b 69 74 64 6c 6c  ='tk itcl kitdll
07b0: 27 0a 09 09 62 2e 20 24 20 65 78 70 6f 72 74 20  '...b. $ export 
07c0: 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a  KITCREATOR_PKGS.
07d0: 09 09 63 2e 20 24 20 2e 2f 6b 69 74 63 72 65 61  ..c. $ ./kitcrea
07e0: 74 6f 72 0a 0a 45 6e 76 69 72 6f 6e 6d 65 6e 74  tor..Environment
07f0: 20 76 61 72 69 61 62 6c 65 73 3a 0a 09 31 2e 20   variables:..1. 
0800: 4d 41 4b 45 0a 09 09 53 70 65 63 69 66 69 65 73  MAKE...Specifies
0810: 20 74 68 65 20 74 6f 6f 6c 20 79 6f 75 20 77 69   the tool you wi
0820: 73 68 20 74 6f 20 62 65 20 63 61 6c 6c 65 64 20  sh to be called 
0830: 74 6f 20 62 75 69 6c 64 20 74 61 72 67 65 74 73  to build targets
0840: 0a 09 09 66 72 6f 6d 20 61 20 4d 61 6b 65 66 69  ...from a Makefi
0850: 6c 65 2e 20 20 54 68 69 73 20 73 63 72 69 70 74  le.  This script
0860: 20 69 73 20 67 65 6e 65 72 61 6c 6c 79 20 6d 6f   is generally mo
0870: 72 65 20 77 65 6c 6c 20 74 65 73 74 65 64 0a 09  re well tested..
0880: 09 77 69 74 68 20 47 4e 55 20 4d 61 6b 65 2e 0a  .with GNU Make..
0890: 0a 09 32 2e 20 50 41 54 43 48 0a 09 09 53 70 65  ..2. PATCH...Spe
08a0: 63 69 66 69 65 73 20 74 68 65 20 74 6f 6f 6c 20  cifies the tool 
08b0: 79 6f 75 20 77 69 73 68 20 74 6f 20 62 65 20 63  you wish to be c
08c0: 61 6c 6c 65 64 20 74 6f 20 61 70 70 6c 79 20 75  alled to apply u
08d0: 6e 69 66 69 65 64 0a 09 09 64 69 66 66 20 70 61  nified...diff pa
08e0: 74 63 68 65 73 2e 20 20 54 68 69 73 20 73 63 72  tches.  This scr
08f0: 69 70 74 20 69 73 20 67 65 6e 65 72 61 6c 6c 79  ipt is generally
0900: 20 6d 6f 72 65 20 77 65 6c 6c 20 74 65 73 74 65   more well teste
0910: 64 20 77 69 74 68 0a 09 09 47 4e 55 20 50 61 74  d with...GNU Pat
0920: 63 68 2e 20 0a 0a 09 33 2e 20 54 43 4c 4b 49 54  ch. ...3. TCLKIT
0930: 0a 09 09 53 70 65 63 69 66 79 20 74 68 65 20 70  ...Specify the p
0940: 61 74 68 20 74 6f 20 61 20 54 63 6c 6b 69 74 20  ath to a Tclkit 
0950: 74 68 61 74 20 69 73 20 72 75 6e 6e 61 62 6c 65  that is runnable
0960: 20 6f 6e 20 74 68 65 20 63 75 72 72 65 6e 74 0a   on the current.
0970: 09 09 73 79 73 74 65 6d 2e 20 20 54 68 65 20 64  ..system.  The d
0980: 65 66 61 75 6c 74 20 69 73 20 22 74 63 6c 6b 69  efault is "tclki
0990: 74 22 2e 20 20 41 20 77 6f 72 6b 69 6e 67 20 74  t".  A working t
09a0: 63 6c 6b 69 74 20 69 73 20 72 65 71 75 69 72 65  clkit is require
09b0: 64 0a 09 09 66 6f 72 20 63 72 6f 73 73 2d 63 6f  d...for cross-co
09c0: 6d 70 69 6c 69 6e 67 20 54 63 6c 6b 69 74 73 2e  mpiling Tclkits.
09d0: 0a 0a 09 34 2e 20 53 54 41 54 49 43 54 4b 0a 09  ...4. STATICTK..
09e0: 09 53 70 65 63 69 66 79 20 74 68 69 73 20 61 73  .Specify this as
09f0: 20 22 31 22 20 74 6f 20 73 74 61 74 69 63 61 6c   "1" to statical
0a00: 6c 79 20 6c 69 6e 6b 20 74 6f 20 54 6b 2e 20 20  ly link to Tk.  
0a10: 54 68 65 20 64 65 66 61 75 6c 74 0a 09 09 61 63  The default...ac
0a20: 74 69 6f 6e 20 6f 6e 20 6d 6f 73 74 20 70 6c 61  tion on most pla
0a30: 74 66 6f 72 6d 73 20 69 73 20 74 6f 20 64 79 6e  tforms is to dyn
0a40: 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 6f  amically link to
0a50: 20 54 6b 2e 20 20 57 68 65 6e 0a 09 09 62 75 69   Tk.  When...bui
0a60: 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 2c 20 53 54  lding KitDLL, ST
0a70: 41 54 49 43 54 4b 20 69 73 20 22 31 22 20 62 79  ATICTK is "1" by
0a80: 20 64 65 66 61 75 6c 74 2e 20 20 49 66 20 79 6f   default.  If yo
0a90: 75 20 77 61 6e 74 20 74 6f 0a 09 09 65 6e 61 62  u want to...enab
0aa0: 6c 65 20 64 79 6e 61 6d 69 63 20 6c 69 6e 6b 69  le dynamic linki
0ab0: 6e 67 20 6f 66 20 54 6b 20 77 69 74 68 20 4b 69  ng of Tk with Ki
0ac0: 74 44 4c 4c 20 79 6f 75 20 77 69 6c 6c 20 68 61  tDLL you will ha
0ad0: 76 65 20 74 6f 0a 09 09 73 70 65 63 69 66 79 20  ve to...specify 
0ae0: 74 68 69 73 20 61 73 20 22 2d 31 22 2e 0a 0a 09  this as "-1"....
0af0: 35 2e 20 53 54 41 54 49 43 4d 4b 34 0a 09 09 53  5. STATICMK4...S
0b00: 70 65 63 69 66 79 20 74 68 69 73 20 61 73 20 22  pecify this as "
0b10: 30 22 20 74 6f 20 61 74 74 65 6d 70 74 20 74 6f  0" to attempt to
0b20: 20 63 72 65 61 74 65 20 63 72 65 61 74 65 20 74   create create t
0b30: 68 65 20 22 6d 6b 34 74 63 6c 22 0a 09 09 70 72  he "mk4tcl"...pr
0b40: 6f 6a 65 63 74 20 61 73 20 61 20 73 68 61 72 65  oject as a share
0b50: 64 20 6f 62 6a 65 63 74 2e 20 20 49 66 20 74 68  d object.  If th
0b60: 69 73 20 66 61 69 6c 73 2c 20 69 74 20 77 69 6c  is fails, it wil
0b70: 6c 20 66 61 6c 6c 20 62 61 63 6b 0a 09 09 74 6f  l fall back...to
0b80: 20 62 75 69 6c 64 69 6e 67 20 73 74 61 74 69 63   building static
0b90: 61 6c 6c 79 2e 20 20 53 70 65 63 69 66 79 20 69  ally.  Specify i
0ba0: 74 20 61 73 20 22 2d 31 22 20 74 6f 20 66 6f 72  t as "-1" to for
0bb0: 63 65 20 62 75 69 6c 64 69 6e 67 0a 09 09 69 74  ce building...it
0bc0: 20 61 73 20 61 20 73 68 61 72 65 64 20 6f 62 6a   as a shared obj
0bd0: 65 63 74 2e 20 20 41 6e 79 20 6f 74 68 65 72 20  ect.  Any other 
0be0: 76 61 6c 75 65 2c 20 69 6e 63 6c 75 64 69 6e 67  value, including
0bf0: 20 62 65 69 6e 67 20 75 6e 73 65 74 0a 09 09 72   being unset...r
0c00: 65 73 75 6c 74 73 20 69 6e 20 22 6d 6b 34 74 63  esults in "mk4tc
0c10: 6c 22 20 62 65 69 6e 67 20 62 75 69 6c 74 20 61  l" being built a
0c20: 6e 64 20 6c 69 6e 6b 65 64 20 73 74 61 74 69 63  nd linked static
0c30: 61 6c 6c 79 2e 20 20 4b 69 74 44 49 4c 4c 0a 09  ally.  KitDILL..
0c40: 09 73 65 74 73 20 74 68 69 73 20 74 6f 20 76 61  .sets this to va
0c50: 72 69 61 62 6c 65 20 74 6f 20 22 30 22 2e 20 20  riable to "0".  
0c60: 49 66 20 4d 65 74 61 6b 69 74 34 20 69 73 20 62  If Metakit4 is b
0c70: 75 69 6c 74 20 73 68 61 72 65 64 2c 20 69 74 0a  uilt shared, it.
0c80: 09 09 63 61 6e 6e 6f 74 20 62 65 20 75 73 65 64  ..cannot be used
0c90: 20 66 6f 72 20 74 68 65 20 6b 69 74 20 73 74 6f   for the kit sto
0ca0: 72 61 67 65 20 66 6f 72 20 54 63 6c 6b 69 74 2e  rage for Tclkit.
0cb0: 0a 0a 09 36 2e 20 53 54 52 49 50 0a 09 09 53 70  ...6. STRIP...Sp
0cc0: 65 63 69 66 69 65 73 20 74 68 65 20 74 6f 6f 6c  ecifies the tool
0cd0: 20 79 6f 75 20 77 69 73 68 20 74 6f 20 62 65 20   you wish to be 
0ce0: 63 61 6c 6c 65 64 20 74 6f 20 73 74 72 69 70 20  called to strip 
0cf0: 6f 62 6a 65 63 74 20 66 69 6c 65 73 2c 0a 09 09  object files,...
0d00: 61 72 63 68 69 76 65 73 2c 20 61 6e 64 20 73 68  archives, and sh
0d10: 61 72 65 64 20 6f 62 6a 65 63 74 73 2e 20 20 54  ared objects.  T
0d20: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 22 73  he default is "s
0d30: 74 72 69 70 22 2e 20 20 59 6f 75 0a 09 09 73 68  trip".  You...sh
0d40: 6f 75 6c 64 20 70 72 6f 62 61 62 6c 79 20 73 65  ould probably se
0d50: 74 20 74 68 69 73 20 69 66 20 79 6f 75 20 61 72  t this if you ar
0d60: 65 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 6e  e cross-compilin
0d70: 67 2e 0a 0a 09 37 2e 20 4b 49 54 43 52 45 41 54  g....7. KITCREAT
0d80: 4f 52 5f 50 4b 47 53 0a 09 09 53 70 65 63 69 66  OR_PKGS...Specif
0d90: 79 20 77 68 69 63 68 20 6e 6f 6e 2d 72 65 71 75  y which non-requ
0da0: 69 72 65 64 20 70 61 63 6b 61 67 65 73 20 74 6f  ired packages to
0db0: 20 62 75 69 6c 64 2e 20 20 54 68 65 20 64 65 66   build.  The def
0dc0: 61 75 6c 74 20 6c 69 73 74 0a 09 09 69 73 3a 0a  ault list...is:.
0dd0: 09 09 09 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63  ...tk itcl mk4tc
0de0: 6c 0a 0a 09 09 49 66 20 6d 6b 34 74 63 6c 20 69  l....If mk4tcl i
0df0: 73 20 6e 6f 74 20 70 72 65 73 65 6e 74 20 61 20  s not present a 
0e00: 5a 69 70 2d 62 61 73 65 64 20 73 74 6f 72 61 67  Zip-based storag
0e10: 65 20 6d 65 63 68 61 6e 69 73 6d 20 77 69 6c 6c  e mechanism will
0e20: 20 62 65 0a 09 09 75 73 65 64 20 69 6e 73 74 65   be...used inste
0e30: 61 64 2e 20 20 54 6f 20 73 70 65 63 69 66 79 20  ad.  To specify 
0e40: 74 68 61 74 20 74 68 65 20 64 65 66 61 75 6c 74  that the default
0e50: 20 62 65 20 75 73 65 64 2c 20 64 6f 20 6e 6f 74   be used, do not
0e60: 20 73 65 74 0a 09 09 74 68 69 73 20 6f 72 20 73   set...this or s
0e70: 65 74 20 69 74 20 74 6f 20 74 68 65 20 65 6d 70  et it to the emp
0e80: 74 79 20 73 74 72 69 6e 67 2e 20 20 54 6f 20 73  ty string.  To s
0e90: 70 65 63 69 66 79 20 74 68 61 74 20 6e 6f 0a 09  pecify that no..
0ea0: 09 6e 6f 6e 2d 72 65 71 75 69 72 65 64 20 70 61  .non-required pa
0eb0: 63 6b 61 67 65 73 20 62 65 20 62 75 69 6c 74 2c  ckages be built,
0ec0: 20 73 65 74 20 69 74 20 74 6f 20 61 20 73 74 72   set it to a str
0ed0: 69 6e 67 20 74 68 61 74 0a 09 09 63 6f 6e 74 61  ing that...conta
0ee0: 69 6e 73 20 6f 6e 6c 79 20 77 68 69 74 65 20 73  ins only white s
0ef0: 70 61 63 65 2e 0a 0a 09 09 49 66 20 22 6b 69 74  pace.....If "kit
0f00: 64 6c 6c 22 20 69 73 20 73 70 65 63 69 66 69 65  dll" is specifie
0f10: 64 20 69 6e 20 74 68 65 20 6c 69 73 74 20 74 68  d in the list th
0f20: 65 20 74 61 72 67 65 74 20 62 65 63 6f 6d 65 73  e target becomes
0f30: 20 4b 69 74 44 4c 4c 0a 09 09 61 6e 64 20 6e 6f   KitDLL...and no
0f40: 20 54 63 6c 6b 69 74 20 77 69 6c 6c 20 62 75 69   Tclkit will bui
0f50: 6c 74 2c 20 62 75 74 20 69 6e 73 74 65 61 64 20  lt, but instead 
0f60: 6c 69 62 74 63 6c 6b 69 74 2e 0a 0a 09 38 2e 20  libtclkit....8. 
0f70: 4b 49 54 43 52 45 41 54 4f 52 5f 4d 49 4e 45 4e  KITCREATOR_MINEN
0f80: 43 4f 44 49 4e 47 53 0a 09 09 53 65 74 20 74 68  CODINGS...Set th
0f90: 69 73 20 76 61 72 69 61 62 6c 65 20 74 6f 20 61  is variable to a
0fa0: 20 6e 6f 6e 2d 65 6d 70 74 79 20 73 74 72 69 6e   non-empty strin
0fb0: 67 20 74 6f 20 67 65 6e 65 72 61 74 65 20 61 20  g to generate a 
0fc0: 54 63 6c 6b 69 74 0a 09 09 77 69 74 68 6f 75 74  Tclkit...without
0fd0: 20 61 6c 6c 20 65 6e 63 6f 64 69 6e 67 73 2c 20   all encodings, 
0fe0: 6f 6e 6c 79 20 69 6e 63 6c 75 64 69 6e 67 20 74  only including t
0ff0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 09 09  he following:...
1000: 09 61 73 63 69 69 2e 65 6e 63 20 63 70 31 32 35  .ascii.enc cp125
1010: 32 2e 65 6e 63 20 69 73 6f 38 38 35 39 2d 31 2e  2.enc iso8859-1.
1020: 65 6e 63 20 69 73 6f 38 38 35 39 2d 31 35 2e 65  enc iso8859-15.e
1030: 6e 63 0a 09 09 09 69 73 6f 38 38 35 39 2d 32 2e  nc....iso8859-2.
1040: 65 6e 63 20 6b 6f 69 38 2d 72 2e 65 6e 63 20 6d  enc koi8-r.enc m
1050: 61 63 52 6f 6d 61 6e 2e 65 6e 63 0a 0a 09 39 2e  acRoman.enc...9.
1060: 20 4b 49 54 43 52 45 41 54 4f 52 5f 4d 49 4e 42   KITCREATOR_MINB
1070: 55 49 4c 44 0a 09 09 53 65 74 20 74 68 69 73 20  UILD...Set this 
1080: 76 61 72 69 61 62 6c 65 20 74 6f 20 61 20 6e 6f  variable to a no
1090: 6e 2d 65 6d 70 74 79 20 73 74 72 69 6e 67 20 74  n-empty string t
10a0: 6f 20 65 78 63 6c 75 64 65 20 75 6e 6e 65 63 65  o exclude unnece
10b0: 73 73 61 72 79 0a 09 09 70 61 63 6b 61 67 65 73  ssary...packages
10c0: 20 66 72 6f 6d 20 54 63 6c 20 62 75 69 6c 64 2e   from Tcl build.
10d0: 20 20 54 68 69 73 20 65 78 63 6c 75 64 65 73 20    This excludes 
10e0: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61  the following pa
10f0: 63 6b 61 67 65 73 3a 0a 09 09 09 74 63 6c 74 65  ckages:....tclte
1100: 73 74 0a 0a 09 09 41 64 64 69 74 69 6f 6e 61 6c  st....Additional
1110: 6c 79 2c 20 61 6e 79 20 62 75 6e 64 6c 65 64 20  ly, any bundled 
1120: 70 61 63 6b 61 67 65 73 20 28 69 6e 20 74 68 65  packages (in the
1130: 20 22 70 6b 67 73 22 20 64 69 72 65 63 74 6f 72   "pkgs" director
1140: 79 29 0a 09 09 61 72 65 20 65 78 63 6c 75 64 65  y)...are exclude
1150: 64 2e 20 20 54 68 69 73 20 74 79 70 69 63 61 6c  d.  This typical
1160: 6c 79 20 69 6e 63 6c 75 64 65 73 20 28 61 73 20  ly includes (as 
1170: 6f 66 20 54 63 6c 20 38 2e 36 29 3a 0a 09 09 09  of Tcl 8.6):....
1180: 69 74 63 6c 20 74 68 72 65 61 64 0a 0a 4b 69 74  itcl thread..Kit
1190: 73 68 20 43 6f 6e 66 69 67 75 72 65 20 4f 70 74  sh Configure Opt
11a0: 69 6f 6e 73 3a 0a 09 31 2e 20 2d 2d 65 6e 61 62  ions:..1. --enab
11b0: 6c 65 2d 6b 69 74 2d 73 74 6f 72 61 67 65 3d 7b  le-kit-storage={
11c0: 7a 69 70 7c 6d 6b 34 7c 61 75 74 6f 7d 0a 09 09  zip|mk4|auto}...
11d0: 53 70 65 63 69 66 79 20 77 68 69 63 68 20 74 79  Specify which ty
11e0: 70 65 20 6f 66 20 73 74 6f 72 61 67 65 20 74 6f  pe of storage to
11f0: 20 75 73 65 20 77 69 74 68 20 74 68 65 20 54 63   use with the Tc
1200: 6c 6b 69 74 2e 20 20 54 68 65 0a 09 09 64 65 66  lkit.  The...def
1210: 61 75 6c 74 20 69 73 20 74 6f 20 61 75 74 6f 2d  ault is to auto-
1220: 64 65 74 65 63 74 2e 20 20 41 75 74 6f 2d 64 65  detect.  Auto-de
1230: 74 65 63 74 69 6f 6e 20 75 73 65 73 20 4d 6b 34  tection uses Mk4
1240: 20 69 66 0a 09 09 61 76 61 69 6c 61 62 6c 65 20   if...available 
1250: 61 6e 64 20 62 75 69 6c 74 20 73 74 61 74 69 63  and built static
1260: 61 6c 6c 79 2c 20 6f 74 68 65 72 77 69 73 65 20  ally, otherwise 
1270: 69 74 20 66 61 6c 6c 73 20 62 61 63 6b 20 74 6f  it falls back to
1280: 20 5a 69 70 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d   Zip...---------
1290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 4d 65 74 68 6f  ----------.Metho
12a0: 64 20 6f 66 20 4f 70 65 72 61 74 69 6f 6e 0a 2d  d of Operation.-
12b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12c0: 2d 2d 0a 53 75 6d 6d 61 72 79 3a 0a 09 31 2e 20  --.Summary:..1. 
12d0: 22 6b 69 74 63 72 65 61 74 6f 72 22 20 63 61 6c  "kitcreator" cal
12e0: 6c 73 20 2a 2f 62 75 69 6c 64 2e 73 68 0a 09 32  ls */build.sh..2
12f0: 2e 20 2a 2f 62 75 69 6c 64 2e 73 68 20 64 6f 77  . */build.sh dow
1300: 6e 6c 6f 61 64 73 20 61 6e 64 20 63 6f 6d 70 69  nloads and compi
1310: 6c 65 73 20 61 70 70 72 6f 70 72 69 61 74 65 20  les appropriate 
1320: 73 6f 66 74 77 61 72 65 0a 09 33 2e 20 2a 2f 62  software..3. */b
1330: 75 69 6c 64 2e 73 68 20 69 6e 73 74 61 6c 6c 73  uild.sh installs
1340: 20 73 6f 66 74 77 61 72 65 20 69 6e 74 6f 20 22   software into "
1350: 69 6e 73 74 22 20 28 72 75 6e 2d 74 69 6d 65 20  inst" (run-time 
1360: 2b 20 63 6f 6d 70 69 6c 65 2d 74 69 6d 65 29 0a  + compile-time).
1370: 09 34 2e 20 2a 2f 62 75 69 6c 64 2e 73 68 20 69  .4. */build.sh i
1380: 6e 73 74 61 6c 6c 73 20 72 75 6e 2d 74 69 6d 65  nstalls run-time
1390: 20 73 6f 66 74 77 61 72 65 20 69 6e 74 6f 20 22   software into "
13a0: 6f 75 74 22 2c 20 74 68 69 73 20 77 69 6c 6c 20  out", this will 
13b0: 62 65 0a 09 20 20 20 69 6e 63 6c 75 64 65 64 20  be..   included 
13c0: 69 6e 20 74 68 65 20 54 63 6c 6b 69 74 20 61 73  in the Tclkit as
13d0: 20 69 66 20 69 74 20 77 65 72 65 20 74 68 65 20   if it were the 
13e0: 72 6f 6f 74 20 64 69 72 65 63 74 6f 72 79 20 6f  root directory o
13f0: 66 20 74 68 65 0a 09 20 20 20 54 63 6c 6b 69 74  f the..   Tclkit
1400: 20 28 63 6f 6d 62 69 6e 65 64 20 77 69 74 68 20   (combined with 
1410: 6f 74 68 65 72 20 22 6f 75 74 22 20 64 69 72 65  other "out" dire
1420: 63 74 6f 72 69 65 73 29 0a 09 35 2e 20 6b 69 74  ctories)..5. kit
1430: 73 68 2f 62 75 69 6c 64 2e 73 68 20 63 6f 6d 70  sh/build.sh comp
1440: 69 6c 65 73 20 61 20 22 6d 61 69 6e 22 20 66 75  iles a "main" fu
1450: 6e 63 74 69 6f 6e 20 61 6e 64 20 6c 69 6e 6b 73  nction and links
1460: 20 61 6c 6c 20 74 68 65 20 62 75 69 6c 74 0a 09   all the built..
1470: 20 20 20 6c 69 62 72 61 72 69 65 73 20 74 6f 67     libraries tog
1480: 65 74 68 65 72 20 69 6e 74 6f 20 61 6e 20 65 78  ether into an ex
1490: 65 63 75 74 61 62 6c 65 0a 09 36 2e 20 6b 69 74  ecutable..6. kit
14a0: 73 68 2f 62 75 69 6c 64 2e 73 68 20 63 6f 6d 62  sh/build.sh comb
14b0: 69 6e 65 73 20 61 6c 6c 20 74 68 65 20 22 6f 75  ines all the "ou
14c0: 74 22 20 64 69 72 65 63 74 6f 72 69 65 73 20 69  t" directories i
14d0: 6e 74 6f 20 6f 6e 65 0a 09 37 2e 20 6b 69 74 73  nto one..7. kits
14e0: 68 2f 62 75 69 6c 64 2e 73 68 20 63 72 65 61 74  h/build.sh creat
14f0: 65 73 20 61 20 4d 65 74 61 6b 69 74 20 6f 72 20  es a Metakit or 
1500: 5a 69 70 20 64 61 74 61 62 61 73 65 20 66 72 6f  Zip database fro
1510: 6d 20 74 68 65 20 63 6f 6d 62 69 6e 65 64 0a 09  m the combined..
1520: 20 20 20 64 69 72 65 63 74 6f 72 69 65 73 20 61     directories a
1530: 6e 64 20 61 70 70 65 6e 64 73 20 74 68 61 74 20  nd appends that 
1540: 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65 64 20  to the compiled 
1550: 65 78 65 63 75 74 61 62 6c 65 20 75 73 69 6e 67  executable using
1560: 3a 0a 09 09 61 2e 20 41 20 54 63 6c 6b 69 74 20  :...a. A Tclkit 
1570: 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 65 6e 76  found in the env
1580: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
1590: 65 20 22 54 43 4c 4b 49 54 22 20 28 74 63 6c 6b  e "TCLKIT" (tclk
15a0: 69 74 0a 09 09 20 20 20 69 66 20 75 6e 73 65 74  it...   if unset
15b0: 29 20 69 66 20 69 74 20 69 73 20 66 75 6e 63 74  ) if it is funct
15c0: 69 6f 6e 61 6c 3b 20 6f 72 0a 09 09 62 2e 20 54  ional; or...b. T
15d0: 68 65 20 62 75 69 6c 74 20 6b 69 74 20 69 74 73  he built kit its
15e0: 65 6c 66 20 28 64 6f 65 73 20 6e 6f 74 20 77 6f  elf (does not wo
15f0: 72 6b 20 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d  rk for cross-com
1600: 70 69 6c 69 6e 67 29 0a 0a 44 65 74 61 69 6c 73  piling)..Details
1610: 3a 0a 09 54 68 65 20 67 65 6e 65 72 61 6c 20 6d  :..The general m
1620: 65 63 68 61 6e 69 73 6d 20 74 68 61 74 20 65 6e  echanism that en
1630: 61 62 6c 65 73 20 61 20 54 63 6c 6b 69 74 20 74  ables a Tclkit t
1640: 6f 20 6f 70 65 72 61 74 65 20 69 73 20 61 20 73  o operate is a s
1650: 6d 61 6c 6c 20 54 63 6c 0a 69 6e 69 74 69 61 6c  mall Tcl.initial
1660: 69 7a 61 74 69 6f 6e 20 72 6f 75 74 69 6e 65 20  ization routine 
1670: 6c 69 6e 6b 65 64 20 73 74 61 74 69 63 61 6c 6c  linked staticall
1680: 79 20 74 6f 20 74 68 65 20 63 6f 72 65 20 6c 69  y to the core li
1690: 62 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 74  braries needed t
16a0: 6f 0a 6f 70 65 72 61 74 65 20 61 20 54 63 6c 20  o.operate a Tcl 
16b0: 69 6e 74 65 72 70 72 65 74 65 72 2c 20 74 68 65  interpreter, the
16c0: 20 54 63 6c 20 56 46 53 20 4c 61 79 65 72 2c 20   Tcl VFS Layer, 
16d0: 61 6e 64 20 61 20 64 61 74 61 62 61 73 65 2d 62  and a database-b
16e0: 61 63 6b 65 64 20 28 4d 65 74 61 6b 69 74 29 0a  acked (Metakit).
16f0: 56 69 72 74 75 61 6c 20 46 69 6c 65 20 53 79 73  Virtual File Sys
1700: 74 65 6d 20 74 68 61 74 20 69 73 20 61 70 70 65  tem that is appe
1710: 6e 64 65 64 20 74 6f 20 74 68 65 20 65 6e 64 20  nded to the end 
1720: 6f 66 20 74 68 65 20 65 78 65 63 75 74 61 62 6c  of the executabl
1730: 65 2e 0a 0a 54 68 69 73 20 70 72 6f 6a 65 63 74  e...This project
1740: 20 62 72 69 6e 67 73 20 74 6f 67 65 74 68 65 72   brings together
1750: 20 61 6c 6c 20 6f 66 20 74 68 65 20 72 65 71 75   all of the requ
1760: 69 72 65 64 20 70 69 65 63 65 73 2c 20 70 6c 75  ired pieces, plu
1770: 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61  s some additiona
1780: 6c 0a 70 69 65 63 65 73 20 74 68 61 74 20 77 65  l.pieces that we
1790: 72 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20  re found in the 
17a0: 6f 72 69 67 69 6e 61 6c 20 54 63 6c 6b 69 74 3a  original Tclkit:
17b0: 0a 09 31 2e 20 54 6b 20 28 64 79 6e 61 6d 69 63  ..1. Tk (dynamic
17c0: 61 6c 6c 79 20 6c 69 6e 6b 65 64 29 0a 09 32 2e  ally linked)..2.
17d0: 20 49 74 63 6c 20 28 64 79 6e 61 6d 69 63 61 6c   Itcl (dynamical
17e0: 6c 79 20 6c 69 6e 6b 65 64 29 0a 0a 54 68 65 20  ly linked)..The 
17f0: 73 6f 75 72 63 65 20 63 6f 64 65 20 66 6f 72 20  source code for 
1800: 74 68 65 73 65 20 70 69 65 63 65 73 20 61 72 65  these pieces are
1810: 20 64 6f 77 6e 6c 6f 61 64 65 64 2c 20 63 6f 6d   downloaded, com
1820: 70 69 6c 65 64 2c 20 61 6e 64 20 6c 69 6e 6b 65  piled, and linke
1830: 64 2c 20 61 6e 64 20 74 68 65 0a 64 61 74 61 62  d, and the.datab
1840: 61 73 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74  ase containing t
1850: 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 66  he appropriate f
1860: 69 6c 65 73 79 73 74 65 6d 20 64 61 74 61 20 69  ilesystem data i
1870: 73 20 63 72 65 61 74 65 64 2e 20 20 57 68 61 74  s created.  What
1880: 20 73 65 74 73 0a 74 68 69 73 20 70 72 6f 6a 65   sets.this proje
1890: 63 74 20 61 70 61 72 74 20 66 72 6f 6d 20 6f 74  ct apart from ot
18a0: 68 65 72 20 73 69 6d 69 6c 61 72 20 70 72 6f 6a  her similar proj
18b0: 65 63 74 73 20 69 73 20 74 68 61 74 3a 0a 09 31  ects is that:..1
18c0: 2e 20 49 74 20 61 74 74 65 6d 70 74 73 20 74 6f  . It attempts to
18d0: 20 62 65 20 6d 6f 64 75 6c 61 72 3b 0a 09 32 2e   be modular;..2.
18e0: 20 49 74 20 73 75 70 70 6f 72 74 73 20 63 72 6f   It supports cro
18f0: 73 73 2d 63 6f 6d 70 69 6c 69 6e 67 3b 0a 09 33  ss-compiling;..3
1900: 2e 20 49 74 20 64 6f 77 6e 6c 6f 61 64 73 20 74  . It downloads t
1910: 68 65 20 73 6f 75 72 63 65 20 66 72 6f 6d 20 74  he source from t
1920: 68 65 69 72 20 6f 72 69 67 69 6e 61 6c 20 72 65  heir original re
1930: 70 6f 73 69 74 6f 72 69 65 73 3b 0a 09 34 2e 20  positories;..4. 
1940: 49 74 20 61 6c 6c 6f 77 73 20 79 6f 75 20 74 6f  It allows you to
1950: 20 73 70 65 63 69 66 79 20 61 6e 20 61 72 62 69   specify an arbi
1960: 74 72 61 72 79 20 76 65 72 73 69 6f 6e 20 6f 66  trary version of
1970: 20 54 63 6c 20 28 69 6e 63 6c 75 64 69 6e 67 0a   Tcl (including.
1980: 09 20 20 20 43 56 53 29 3b 20 61 6e 64 0a 09 35  .   CVS); and..5
1990: 2e 20 49 74 20 75 73 65 73 20 47 4e 55 20 41 75  . It uses GNU Au
19a0: 74 6f 63 6f 6e 66 20 73 63 72 69 70 74 73 20 66  toconf scripts f
19b0: 6f 72 20 63 6f 6d 70 69 6c 69 6e 67 20 74 68 65  or compiling the
19c0: 20 70 61 72 74 20 6f 66 20 74 68 65 20 54 63 6c   part of the Tcl
19d0: 6b 69 74 0a 09 20 20 20 74 68 61 74 20 62 72 69  kit..   that bri
19e0: 6e 67 73 20 74 68 65 20 77 68 6f 6c 65 20 74 68  ngs the whole th
19f0: 69 6e 67 20 74 6f 67 65 74 68 65 72 20 28 74 68  ing together (th
1a00: 65 20 4b 69 74 73 68 29 0a 0a 54 6f 20 61 63 63  e Kitsh)..To acc
1a10: 6f 6d 70 6c 69 73 68 20 74 68 65 73 65 20 67 6f  omplish these go
1a20: 61 6c 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  als the followin
1a30: 67 20 6d 65 63 68 61 6e 69 73 6d 73 20 61 72 65  g mechanisms are
1a40: 20 69 6e 20 70 6c 61 63 65 3a 0a 09 31 2e 20 54   in place:..1. T
1a50: 68 65 20 74 6f 70 2d 6c 65 76 65 6c 20 22 6b 69  he top-level "ki
1a60: 74 63 72 65 61 74 6f 72 22 20 73 63 72 69 70 74  tcreator" script
1a70: 3b 20 61 6e 64 0a 09 32 2e 20 50 65 72 2d 70 72  ; and..2. Per-pr
1a80: 6f 6a 65 63 74 20 73 75 62 64 69 72 65 63 74 6f  oject subdirecto
1a90: 72 69 65 73 2c 20 65 61 63 68 20 63 6f 6e 74 61  ries, each conta
1aa0: 69 6e 69 6e 67 20 61 20 22 62 75 69 6c 64 2e 73  ining a "build.s
1ab0: 68 22 20 73 63 72 69 70 74 0a 0a 54 68 65 20 74  h" script..The t
1ac0: 6f 70 2d 6c 65 76 65 6c 20 22 6b 69 74 63 72 65  op-level "kitcre
1ad0: 61 74 6f 72 22 20 73 63 72 69 70 74 20 69 73 20  ator" script is 
1ae0: 76 65 72 79 20 73 69 6d 70 6c 65 2e 20 20 49 74  very simple.  It
1af0: 73 20 6f 6e 6c 79 20 6a 6f 62 20 69 73 20 74 6f  s only job is to
1b00: 0a 69 6e 74 65 72 70 72 65 74 20 63 6f 6d 6d 61  .interpret comma
1b10: 6e 64 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74  nd line argument
1b20: 73 2c 20 61 6e 64 20 63 61 6c 6c 20 74 68 65 20  s, and call the 
1b30: 70 65 72 2d 70 72 6f 6a 65 63 74 20 22 62 75 69  per-project "bui
1b40: 6c 64 2e 73 68 22 20 73 63 72 69 70 74 73 2e 0a  ld.sh" scripts..
1b50: 46 6f 72 20 74 68 65 20 22 74 63 6c 22 20 70 72  For the "tcl" pr
1b60: 6f 6a 65 63 74 20 69 74 20 61 6c 73 6f 20 66 69  oject it also fi
1b70: 6e 64 73 20 74 68 65 20 61 70 70 72 6f 70 72 69  nds the appropri
1b80: 61 74 65 20 22 74 63 6c 43 6f 6e 66 69 67 2e 73  ate "tclConfig.s
1b90: 68 22 20 28 61 6e 64 20 73 74 6f 72 65 73 0a 74  h" (and stores.t
1ba0: 68 69 73 20 70 61 74 68 20 69 6e 20 54 43 4c 43  his path in TCLC
1bb0: 4f 4e 46 49 47 44 49 52 29 20 74 6f 20 65 6e 61  ONFIGDIR) to ena
1bc0: 62 6c 65 20 73 75 62 73 65 71 75 65 6e 74 20 62  ble subsequent b
1bd0: 75 69 6c 64 20 73 63 72 69 70 74 73 20 74 6f 20  uild scripts to 
1be0: 66 69 6e 64 20 74 68 65 0a 61 70 70 72 6f 70 72  find the.appropr
1bf0: 69 61 74 65 20 54 63 6c 20 74 6f 20 6c 69 6e 6b  iate Tcl to link
1c00: 20 61 67 61 69 6e 73 74 2e 0a 0a 54 68 65 20 70   against...The p
1c10: 65 72 2d 70 72 6f 6a 65 63 74 20 22 62 75 69 6c  er-project "buil
1c20: 64 2e 73 68 22 20 73 63 72 69 70 74 73 20 61 72  d.sh" scripts ar
1c30: 65 20 65 6e 74 69 72 65 6c 79 20 61 75 74 6f 6e  e entirely auton
1c40: 6f 6d 6f 75 73 2e 20 20 54 68 65 79 20 61 72 65  omous.  They are
1c50: 0a 72 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72  .responsible for
1c60: 20 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 74 68 65   downloading the
1c70: 20 73 6f 75 72 63 65 20 63 6f 64 65 20 66 6f 72   source code for
1c80: 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65   the appropriate
1c90: 20 76 65 72 73 69 6f 6e 20 74 68 61 74 0a 77 69   version that.wi
1ca0: 6c 6c 20 63 6f 6d 70 69 6c 65 20 61 6e 64 20 6c  ll compile and l
1cb0: 69 6e 6b 20 61 67 61 69 6e 73 74 20 74 68 65 20  ink against the 
1cc0: 63 75 72 72 65 6e 74 20 76 65 72 73 69 6f 6e 20  current version 
1cd0: 6f 66 20 54 63 6c 20 28 75 73 65 72 20 72 65 71  of Tcl (user req
1ce0: 75 65 73 74 65 64 0a 76 65 72 73 69 6f 6e 20 63  uested.version c
1cf0: 61 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 22  an be found in "
1d00: 54 43 4c 56 45 52 53 22 2c 20 77 68 69 6c 65 20  TCLVERS", while 
1d10: 74 68 65 20 61 63 74 75 61 6c 20 76 65 72 73 69  the actual versi
1d20: 6f 6e 20 6d 75 73 74 20 62 65 20 72 65 71 75 65  on must be reque
1d30: 73 74 65 64 0a 66 72 6f 6d 20 74 68 65 20 22 74  sted.from the "t
1d40: 63 6c 43 6f 6e 66 69 67 2e 73 68 22 20 73 63 72  clConfig.sh" scr
1d50: 69 70 74 29 2c 20 63 6f 6d 70 69 6c 69 6e 67 20  ipt), compiling 
1d60: 69 74 2c 20 69 6e 73 74 61 6c 6c 69 6e 67 20 61  it, installing a
1d70: 20 66 75 6e 63 74 69 6f 6e 61 6c 20 63 6f 70 79   functional copy
1d80: 0a 69 6e 74 6f 20 74 68 65 20 70 65 72 2d 70 72  .into the per-pr
1d90: 6f 6a 65 63 74 20 22 69 6e 73 74 22 20 64 69 72  oject "inst" dir
1da0: 65 63 74 6f 72 79 2c 20 61 6e 64 20 69 6e 73 74  ectory, and inst
1db0: 61 6c 6c 69 6e 67 20 61 6e 79 74 68 69 6e 67 20  alling anything 
1dc0: 74 68 61 74 20 6e 65 65 64 73 20 74 6f 0a 62 65  that needs to.be
1dd0: 20 69 6e 20 74 68 65 20 54 63 6c 6b 69 74 27 73   in the Tclkit's
1de0: 20 56 46 53 20 72 6f 6f 74 20 69 6e 74 6f 20 74   VFS root into t
1df0: 68 65 20 70 65 72 2d 70 72 6f 6a 65 63 74 20 22  he per-project "
1e00: 6f 75 74 22 20 64 69 72 65 63 74 6f 72 79 2e 0a  out" directory..
1e10: 0a 54 68 65 20 65 78 63 65 70 74 69 6f 6e 20 74  .The exception t
1e20: 6f 20 74 68 69 73 20 69 73 20 74 68 65 20 22 6b  o this is the "k
1e30: 69 74 73 68 22 20 61 6e 64 20 22 6b 69 74 64 6c  itsh" and "kitdl
1e40: 6c 22 20 70 72 6f 6a 65 63 74 73 2e 20 20 54 68  l" projects.  Th
1e50: 65 79 20 61 72 65 20 74 68 65 20 67 6c 75 65 0a  ey are the glue.
1e60: 74 68 61 74 20 62 69 6e 64 73 20 61 6c 6c 20 74  that binds all t
1e70: 68 65 20 69 6e 64 69 76 69 64 75 61 6c 20 70 72  he individual pr
1e80: 6f 6a 65 63 74 73 20 74 6f 67 65 74 68 65 72 20  ojects together 
1e90: 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20 65 78  into a single ex
1ea0: 65 63 75 74 61 62 6c 65 2e 20 20 49 74 73 0a 62  ecutable.  Its.b
1eb0: 75 69 6c 64 20 73 63 72 69 70 74 20 64 6f 65 73  uild script does
1ec0: 20 6e 6f 74 20 63 72 65 61 74 65 20 61 6e 20 22   not create an "
1ed0: 69 6e 73 74 22 20 6f 72 20 61 6e 20 22 6f 75 74  inst" or an "out
1ee0: 22 20 64 69 72 65 63 74 6f 72 79 20 62 65 63 61  " directory beca
1ef0: 75 73 65 20 69 74 20 69 73 20 6e 6f 74 0a 61 20  use it is not.a 
1f00: 6c 69 62 72 61 72 79 2e 20 20 49 6e 73 74 65 61  library.  Instea
1f10: 64 2c 20 69 74 20 63 6f 6c 6c 65 63 74 73 20 61  d, it collects a
1f20: 6c 6c 20 74 68 65 20 6f 74 68 65 72 20 70 72 6f  ll the other pro
1f30: 6a 65 63 74 27 73 20 22 6f 75 74 22 20 64 69 72  ject's "out" dir
1f40: 65 63 74 6f 72 69 65 73 0a 69 6e 74 6f 20 61 20  ectories.into a 
1f50: 73 69 6e 67 6c 65 20 64 69 72 65 63 74 6f 72 79  single directory
1f60: 20 28 73 74 61 72 70 61 63 6b 2e 76 66 73 29 2c   (starpack.vfs),
1f70: 20 61 73 20 77 65 6c 6c 20 61 20 73 74 61 74 69   as well a stati
1f80: 63 20 66 69 6c 65 20 28 62 6f 6f 74 2e 74 63 6c  c file (boot.tcl
1f90: 29 2e 0a 49 74 20 74 68 65 6e 20 63 6f 6d 70 69  )..It then compi
1fa0: 6c 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 63  les the source c
1fb0: 6f 64 65 2c 20 61 6e 64 20 74 68 65 6e 20 69 6e  ode, and then in
1fc0: 73 74 61 6c 6c 73 20 74 68 65 20 56 46 53 20 6f  stalls the VFS o
1fd0: 6e 74 6f 20 74 68 65 20 72 65 73 75 6c 74 69 6e  nto the resultin
1fe0: 67 0a 65 78 65 63 75 74 61 62 6c 65 2e 20 20 54  g.executable.  T
1ff0: 68 65 20 56 46 53 20 69 73 20 63 72 65 61 74 65  he VFS is create
2000: 64 20 62 79 20 74 68 65 20 22 69 6e 73 74 61 6c  d by the "instal
2010: 6c 76 66 73 2e 74 63 6c 22 20 73 63 72 69 70 74  lvfs.tcl" script
2020: 20 66 6f 72 20 4b 69 74 73 68 2e 20 20 46 6f 72   for Kitsh.  For
2030: 0a 4b 69 74 44 4c 4c 20 74 68 65 20 56 46 53 20  .KitDLL the VFS 
2040: 69 73 20 63 72 65 61 74 65 64 20 62 79 20 22 64  is created by "d
2050: 69 72 32 63 2e 74 63 6c 22 2e 0a 0a 49 66 20 74  ir2c.tcl"...If t
2060: 68 65 20 22 6d 6b 34 74 63 6c 22 20 70 72 6f 6a  he "mk4tcl" proj
2070: 65 63 74 20 66 61 69 6c 73 20 74 6f 20 62 75 69  ect fails to bui
2080: 6c 64 20 28 6f 72 20 69 73 20 6e 6f 74 20 72 65  ld (or is not re
2090: 71 75 65 73 74 65 64 20 74 6f 20 62 65 20 62 75  quested to be bu
20a0: 69 6c 74 29 2c 0a 74 68 65 20 72 65 73 74 20 6f  ilt),.the rest o
20b0: 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 77 69  f the project wi
20c0: 6c 6c 20 62 65 20 62 75 69 6c 74 20 75 73 69 6e  ll be built usin
20d0: 67 20 7a 69 70 20 66 69 6c 65 73 20 69 6e 73 74  g zip files inst
20e0: 65 61 64 20 6f 66 20 4d 65 74 61 6b 69 74 0a 64  ead of Metakit.d
20f0: 61 74 61 62 61 73 65 73 2e 0a 0a 54 6f 20 63 72  atabases...To cr
2100: 65 61 74 65 20 74 68 65 20 73 74 6f 72 61 67 65  eate the storage
2110: 20 64 61 74 61 62 61 73 65 2c 20 6f 6e 65 20 6f   database, one o
2120: 66 20 74 77 6f 20 54 63 6c 6b 69 74 73 20 69 73  f two Tclkits is
2130: 20 75 73 65 64 20 28 74 72 69 65 64 20 69 6e 20   used (tried in 
2140: 74 68 69 73 0a 6f 72 64 65 72 29 3a 0a 09 31 2e  this.order):..1.
2150: 20 54 68 65 20 54 63 6c 6b 69 74 20 73 70 65 63   The Tclkit spec
2160: 69 66 69 65 64 20 62 79 20 74 68 65 20 54 43 4c  ified by the TCL
2170: 4b 49 54 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  KIT environment 
2180: 76 61 72 69 61 62 6c 65 20 28 6f 72 0a 09 20 20  variable (or..  
2190: 20 22 74 63 6c 6b 69 74 22 20 69 66 20 74 68 61   "tclkit" if tha
21a0: 74 20 76 61 72 69 61 62 6c 65 20 69 73 20 6e 6f  t variable is no
21b0: 74 20 73 65 74 29 20 69 66 20 69 74 20 69 73 20  t set) if it is 
21c0: 66 75 6e 63 74 69 6f 6e 61 6c 3b 20 6f 72 0a 09  functional; or..
21d0: 32 2e 20 54 68 65 20 62 75 69 6c 74 20 54 63 6c  2. The built Tcl
21e0: 6b 69 74 20 69 74 73 65 6c 66 0a 0a 54 68 65 20  kit itself..The 
21f0: 73 65 63 6f 6e 64 20 6d 65 74 68 6f 64 20 77 69  second method wi
2200: 6c 6c 20 6e 6f 74 20 77 6f 72 6b 20 69 66 20 74  ll not work if t
2210: 68 65 20 62 75 69 6c 74 20 54 63 6c 6b 69 74 20  he built Tclkit 
2220: 69 73 20 6e 6f 74 20 65 78 65 63 75 74 61 62 6c  is not executabl
2230: 65 20 6f 6e 20 74 68 65 0a 63 75 72 72 65 6e 74  e on the.current
2240: 20 70 6c 61 74 66 6f 72 6d 20 28 69 2e 65 2e 2c   platform (i.e.,
2250: 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20   in the case of 
2260: 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 6f  cross-compilatio
2270: 6e 29 20 61 6e 64 20 73 6f 20 69 74 20 6d 61 79  n) and so it may
2280: 20 62 65 0a 6e 65 63 65 73 73 61 72 79 20 74 6f   be.necessary to
2290: 20 62 6f 6f 74 73 74 72 61 70 20 61 20 72 75 6e   bootstrap a run
22a0: 6e 61 62 6c 65 20 54 63 6c 6b 69 74 20 66 69 72  nable Tclkit fir
22b0: 73 74 2e 0a 0a 4b 69 74 44 4c 4c 20 6d 6f 75 6e  st...KitDLL moun
22c0: 74 73 20 74 68 65 20 56 46 53 20 66 6f 72 20 65  ts the VFS for e
22d0: 76 65 72 79 20 69 6e 74 65 72 70 72 65 74 65 72  very interpreter
22e0: 20 74 68 61 74 20 63 61 6c 6c 73 20 54 63 6c 5f   that calls Tcl_
22f0: 49 6e 69 74 28 29 2e 20 20 54 68 65 20 73 79 73  Init().  The sys
2300: 74 65 6d 0a 56 46 53 20 74 68 61 74 20 69 73 20  tem.VFS that is 
2310: 63 72 65 61 74 65 64 20 61 74 20 62 75 69 6c 64  created at build
2320: 20 74 69 6d 65 20 69 73 20 6d 6f 75 6e 74 65 64   time is mounted
2330: 20 61 74 20 2f 2e 4b 49 54 44 4c 4c 5f 54 43 4c   at /.KITDLL_TCL
2340: 2e 20 20 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c  .  Additionally,
2350: 0a 69 66 20 74 68 65 72 65 20 69 73 20 61 20 5a  .if there is a Z
2360: 49 50 20 66 69 6c 65 20 61 70 70 65 6e 64 65 64  IP file appended
2370: 20 74 6f 20 74 68 65 20 44 4c 4c 20 69 74 20 77   to the DLL it w
2380: 69 6c 6c 20 62 65 20 6d 6f 75 6e 74 65 64 20 61  ill be mounted a
2390: 74 20 2f 2e 4b 49 54 44 4c 4c 5f 55 53 45 52 0a  t /.KITDLL_USER.
23a0: 61 6e 64 20 69 66 20 74 68 65 72 65 20 69 73 20  and if there is 
23b0: 61 20 5a 49 50 20 66 69 6c 65 20 61 70 70 65 6e  a ZIP file appen
23c0: 64 65 64 20 74 6f 20 74 68 65 20 65 78 65 63 75  ded to the execu
23d0: 74 61 62 6c 65 20 69 74 20 77 69 6c 6c 20 62 65  table it will be
23e0: 20 6d 6f 75 6e 74 65 64 20 61 74 0a 2f 2e 4b 49   mounted at./.KI
23f0: 54 44 4c 4c 5f 41 50 50 2e 20 20 41 6c 6c 20 56  TDLL_APP.  All V
2400: 46 53 65 73 20 74 68 61 74 20 61 72 65 20 6d 6f  FSes that are mo
2410: 75 6e 74 65 64 20 68 61 76 65 20 74 68 65 20 22  unted have the "
2420: 6c 69 62 22 20 73 75 62 2d 64 69 72 65 63 74 6f  lib" sub-directo
2430: 72 79 20 61 70 70 65 6e 64 65 64 0a 74 6f 20 74  ry appended.to t
2440: 68 65 20 69 6e 74 65 72 70 72 65 74 65 72 73 20  he interpreters 
2450: 22 61 75 74 6f 5f 70 61 74 68 22 20 76 61 72 69  "auto_path" vari
2460: 61 62 6c 65 2e 0a                                able..