Hex Artifact Content
Not logged in

Artifact 334b80c5755c91dfe56874bfe07ec5d0fe276f4c:

File BUILD.txt part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file BUILD.txt part of check-in [713b8be852] - Deleted some obsolete "todo" files. Updated the FAQ. Modified the the "vinfo" page to show check-in differences and made "vinfo" the default display for check-ins instead of "vdiff". by drh on 2009-08-28 22:59:27.

0000: 41 6c 6c 20 6f 66 20 74 68 65 20 73 6f 75 72 63  All of the sourc
0010: 65 20 63 6f 64 65 20 66 6f 72 20 66 6f 73 73 69  e code for fossi
0020: 6c 20 69 73 20 63 6f 6e 74 61 69 6e 65 64 20 69  l is contained i
0030: 6e 20 74 68 65 20 73 72 63 2f 20 73 75 62 64 69  n the src/ subdi
0040: 72 65 63 74 6f 72 79 2e 0a 42 75 74 20 74 68 65  rectory..But the
0050: 72 65 20 69 73 20 61 20 6c 6f 74 20 6f 66 20 67  re is a lot of g
0060: 65 6e 65 72 61 74 65 64 20 63 6f 64 65 2c 20 73  enerated code, s
0070: 6f 20 79 6f 75 20 77 69 6c 6c 20 70 72 6f 62 61  o you will proba
0080: 62 6c 79 20 77 61 6e 74 20 74 6f 0a 75 73 65 20  bly want to.use 
0090: 74 68 65 20 4d 61 6b 65 66 69 6c 65 2e 20 20 54  the Makefile.  T
00a0: 6f 20 64 6f 20 61 20 63 6f 6d 70 6c 65 74 65 20  o do a complete 
00b0: 62 75 69 6c 64 2c 20 6a 75 73 74 20 74 79 70 65  build, just type
00c0: 3a 0a 0a 20 20 20 6d 61 6b 65 0a 0a 54 68 61 74  :..   make..That
00d0: 20 73 68 6f 75 6c 64 20 77 6f 72 6b 20 6f 75 74   should work out
00e0: 2d 6f 66 2d 74 68 65 2d 62 6f 78 20 6f 6e 20 4d  -of-the-box on M
00f0: 61 63 73 20 61 6e 64 20 4c 69 6e 75 78 20 73 79  acs and Linux sy
0100: 73 74 65 6d 73 2e 20 20 49 66 0a 79 6f 75 20 68  stems.  If.you h
0110: 61 76 65 20 74 72 6f 75 62 6c 65 2c 20 6f 72 20  ave trouble, or 
0120: 79 6f 75 20 77 61 6e 74 20 74 6f 20 64 6f 20 73  you want to do s
0130: 6f 6d 65 74 68 69 6e 67 20 66 61 6e 63 79 2c 20  omething fancy, 
0140: 6a 75 73 74 20 65 64 69 74 0a 74 68 65 20 4d 61  just edit.the Ma
0150: 6b 65 66 69 6c 65 20 69 6e 20 74 68 65 20 74 6f  kefile in the to
0160: 70 2d 6c 65 76 65 6c 20 66 6f 6c 64 65 72 2e 20  p-level folder. 
0170: 20 54 68 65 72 65 20 61 72 65 20 35 20 74 68 69   There are 5 thi
0180: 6e 67 73 20 79 6f 75 0a 6d 69 67 68 74 20 77 61  ngs you.might wa
0190: 6e 74 20 74 6f 20 63 68 61 6e 67 65 20 69 6e 20  nt to change in 
01a0: 74 68 65 20 4d 61 6b 65 66 69 6c 65 2e 20 20 41  the Makefile.  A
01b0: 6c 6c 20 35 20 74 68 69 6e 67 73 20 61 72 65 20  ll 5 things are 
01c0: 77 65 6c 6c 0a 63 6f 6d 6d 65 6e 74 65 64 2e 20  well.commented. 
01d0: 20 54 68 65 20 63 6f 6d 70 6c 65 74 65 20 4d 61   The complete Ma
01e0: 6b 65 66 69 6c 65 20 69 73 20 6f 6e 6c 79 20 61  kefile is only a
01f0: 20 66 65 77 20 64 6f 7a 65 6e 20 6c 69 6e 65 73   few dozen lines
0200: 20 6c 6f 6e 67 2e 0a 44 6f 20 6e 6f 74 20 62 65   long..Do not be
0210: 20 69 6e 74 69 6d 69 64 61 74 65 64 2e 0a 0a 2d   intimidated...-
0220: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0230: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0240: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0250: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 48 65 72 65 20  ---------..Here 
0270: 61 72 65 20 73 6f 6d 65 20 6e 6f 74 65 73 20 6f  are some notes o
0280: 6e 20 77 68 61 74 20 69 73 20 68 61 70 70 65 6e  n what is happen
0290: 69 6e 67 20 62 65 68 69 6e 64 20 74 68 65 20 73  ing behind the s
02a0: 63 65 6e 65 73 3a 0a 0a 2a 20 54 68 65 20 4d 61  cenes:..* The Ma
02b0: 6b 65 66 69 6c 65 20 6a 75 73 74 20 73 65 74 73  kefile just sets
02c0: 20 75 70 20 61 20 66 65 77 20 6d 61 63 72 6f 73   up a few macros
02d0: 20 61 6e 64 20 74 68 65 6e 20 69 6e 76 6f 6b 65   and then invoke
02e0: 73 20 74 68 65 0a 20 20 72 65 61 6c 20 6d 61 6b  s the.  real mak
02f0: 65 66 69 6c 65 20 69 6e 20 73 72 63 2f 6d 61 69  efile in src/mai
0300: 6e 2e 6d 6b 2e 20 20 54 68 65 20 73 72 63 2f 6d  n.mk.  The src/m
0310: 61 69 6e 2e 6d 6b 20 6d 61 6b 65 66 69 6c 65 20  ain.mk makefile 
0320: 69 73 0a 20 20 61 75 74 6f 6d 61 74 69 63 61 6c  is.  automatical
0330: 6c 79 20 67 65 6e 65 72 61 74 65 64 20 62 79 20  ly generated by 
0340: 61 20 54 43 4c 20 73 63 72 69 70 74 20 66 6f 75  a TCL script fou
0350: 6e 64 20 61 74 20 73 72 63 2f 6d 61 6b 65 6d 61  nd at src/makema
0360: 6b 65 2e 74 63 6c 2e 0a 20 20 44 6f 20 6e 6f 74  ke.tcl..  Do not
0370: 20 65 64 69 74 20 73 72 63 2f 6d 61 69 6e 2e 6d   edit src/main.m
0380: 6b 20 64 69 72 65 63 74 6c 79 2e 20 20 55 70 64  k directly.  Upd
0390: 61 74 65 20 73 72 63 2f 6d 61 6b 65 6d 61 6b 65  ate src/makemake
03a0: 2e 74 63 6c 20 61 6e 64 0a 20 20 74 68 65 6e 20  .tcl and.  then 
03b0: 72 65 72 75 6e 20 69 74 2e 0a 0a 2a 20 54 68 65  rerun it...* The
03c0: 20 2a 2e 68 20 68 65 61 64 65 72 20 66 69 6c 65   *.h header file
03d0: 73 20 61 72 65 20 61 75 74 6f 6d 61 74 69 63 61  s are automatica
03e0: 6c 6c 79 20 67 65 6e 65 72 61 74 65 64 20 75 73  lly generated us
03f0: 69 6e 67 20 61 20 70 72 6f 67 72 61 6d 0a 20 20  ing a program.  
0400: 63 61 6c 6c 65 64 20 22 6d 61 6b 65 68 65 61 64  called "makehead
0410: 65 72 73 22 2e 20 20 53 6f 75 72 63 65 20 63 6f  ers".  Source co
0420: 64 65 20 74 6f 20 74 68 65 20 6d 61 6b 65 68 65  de to the makehe
0430: 61 64 65 72 73 20 70 72 6f 67 72 61 6d 20 69 73  aders program is
0440: 0a 20 20 66 6f 75 6e 64 20 69 6e 20 73 72 63 2f  .  found in src/
0450: 6d 61 6b 65 68 65 61 64 65 72 73 2e 63 2e 20 20  makeheaders.c.  
0460: 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 73  Documentation is
0470: 20 66 6f 75 6e 64 20 69 6e 20 0a 20 20 73 72 63   found in .  src
0480: 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e 68 74 6d  /makeheaders.htm
0490: 6c 2e 0a 0a 2a 20 4d 6f 73 74 20 2a 2e 63 20 73  l...* Most *.c s
04a0: 6f 75 72 63 65 20 66 69 6c 65 73 20 61 72 65 20  ource files are 
04b0: 70 72 65 70 72 6f 63 65 73 73 65 64 20 75 73 69  preprocessed usi
04c0: 6e 67 20 61 20 70 72 6f 67 72 61 6d 20 63 61 6c  ng a program cal
04d0: 6c 65 64 0a 20 20 22 74 72 61 6e 73 6c 61 74 65  led.  "translate
04e0: 22 2e 20 20 54 68 65 20 73 6f 75 72 63 65 73 20  ".  The sources 
04f0: 74 6f 20 74 72 61 6e 73 6c 61 74 65 20 61 72 65  to translate are
0500: 20 66 6f 75 6e 64 20 69 6e 20 73 72 63 2f 74 72   found in src/tr
0510: 61 6e 73 6c 61 74 65 2e 63 2e 0a 20 20 41 20 68  anslate.c..  A h
0520: 65 61 64 65 72 20 63 6f 6d 6d 65 6e 74 20 69 6e  eader comment in
0530: 20 73 72 63 2f 74 72 61 6e 73 6c 61 74 65 2e 63   src/translate.c
0540: 20 65 78 70 6c 61 69 6e 73 20 69 6e 20 64 65 74   explains in det
0550: 61 69 6c 20 77 68 61 74 20 69 74 20 64 6f 65 73  ail what it does
0560: 2e 0a 0a 2a 20 54 68 65 20 73 72 63 2f 6d 6b 69  ...* The src/mki
0570: 6e 64 65 78 2e 63 20 70 72 6f 67 72 61 6d 20 67  ndex.c program g
0580: 65 6e 65 72 61 74 65 73 20 73 6f 6d 65 20 43 20  enerates some C 
0590: 63 6f 64 65 20 74 68 61 74 20 69 6d 70 6c 65 6d  code that implem
05a0: 65 6e 74 73 0a 20 20 73 74 61 74 69 63 20 6c 6f  ents.  static lo
05b0: 6f 6b 75 70 20 74 61 62 6c 65 73 2e 20 20 53 65  okup tables.  Se
05c0: 65 20 74 68 65 20 68 65 61 64 65 72 20 63 6f 6d  e the header com
05d0: 6d 65 6e 74 20 69 6e 20 74 68 65 20 73 6f 75 72  ment in the sour
05e0: 63 65 20 63 6f 64 65 0a 20 20 66 6f 72 20 64 65  ce code.  for de
05f0: 74 61 69 6c 73 20 6f 6e 20 77 68 61 74 20 69 74  tails on what it
0600: 20 64 6f 65 73 2e 0a                              does..