Artifact e7fed9d5b647337f8e7abf45981d10cdcc1555e2:
File
BUILD.txt
part of check-in
[0e265b0184]
- Documentation updates. Added Makefile.
by
drh on
2007-08-01 20:05:49.
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 20 kefile just set
02c0: 75 70 20 61 20 66 65 77 20 6d 61 63 72 6f 73 20 up a few macros
02d0: 61 6e 64 20 74 68 65 6e 20 69 6e 76 6f 6b 65 73 and then invokes
02e0: 20 74 68 65 0a 20 20 72 65 61 6c 20 6d 61 6b 65 the. real make
02f0: 66 69 6c 65 20 69 6e 20 73 72 63 2f 6d 61 69 6e file in src/main
0300: 2e 6d 6b 2e 20 20 54 68 65 20 73 72 63 2f 6d 61 .mk. The src/ma
0310: 69 6e 2e 6d 6b 20 6d 61 6b 65 66 69 6c 65 20 69 in.mk makefile i
0320: 73 0a 20 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c s. automaticall
0330: 79 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 y generated by a
0340: 20 54 43 4c 20 73 63 72 69 70 74 20 66 6f 75 6e TCL script foun
0350: 64 20 61 74 20 73 72 63 2f 6d 61 6b 65 6d 61 6b d at src/makemak
0360: 65 2e 74 63 6c 2e 0a 20 20 44 6f 20 6e 6f 74 20 e.tcl.. Do not
0370: 65 64 69 74 20 73 72 63 2f 6d 61 69 6e 2e 6d 6b edit src/main.mk
0380: 20 64 69 72 65 63 74 6c 79 2e 20 20 55 70 64 61 directly. Upda
0390: 74 65 20 73 72 63 2f 6d 61 6b 65 6d 61 6b 65 2e te src/makemake.
03a0: 74 63 6c 20 61 6e 64 0a 20 20 74 68 65 6e 20 72 tcl and. then r
03b0: 65 72 75 6e 20 69 74 2e 0a 0a 2a 20 54 68 65 20 erun it...* The
03c0: 2a 2e 68 20 68 65 61 64 65 72 20 66 69 6c 65 73 *.h header files
03d0: 20 61 72 65 20 61 75 74 6f 6d 61 74 69 63 61 6c are automatical
03e0: 6c 79 20 67 65 6e 65 72 61 74 65 64 20 75 73 69 ly generated usi
03f0: 6e 67 20 61 20 70 72 6f 67 72 61 6d 0a 20 20 63 ng a program. c
0400: 61 6c 6c 65 64 20 22 6d 61 6b 65 68 65 61 64 65 alled "makeheade
0410: 72 73 22 2e 20 20 53 6f 75 72 63 65 20 63 6f 64 rs". Source cod
0420: 65 20 74 6f 20 74 68 65 20 6d 61 6b 65 68 65 61 e to the makehea
0430: 64 65 72 73 20 70 72 6f 67 72 61 6d 20 69 73 0a ders program is.
0440: 20 20 66 6f 75 6e 64 20 69 6e 20 73 72 63 2f 6d found in src/m
0450: 61 6b 65 68 65 61 64 65 72 73 2e 63 2e 20 20 44 akeheaders.c. D
0460: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 73 20 ocumentation is
0470: 66 6f 75 6e 64 20 69 6e 20 0a 20 20 73 72 63 2f found in . src/
0480: 6d 61 6b 65 68 65 61 64 65 72 73 2e 68 74 6d 6c makeheaders.html
0490: 2e 0a 0a 2a 20 4d 6f 73 74 20 2a 2e 63 20 73 6f ...* Most *.c so
04a0: 75 72 63 65 20 66 69 6c 65 73 20 61 72 65 20 70 urce files are p
04b0: 72 65 70 72 6f 63 65 73 73 65 64 20 75 73 69 6e reprocessed usin
04c0: 67 20 61 20 70 72 6f 67 72 61 6d 20 63 61 6c 6c g a program call
04d0: 65 64 0a 20 20 22 74 72 61 6e 73 6c 61 74 65 22 ed. "translate"
04e0: 2e 20 20 54 68 65 20 73 6f 75 72 63 65 73 20 74 . The sources t
04f0: 6f 20 74 72 61 6e 73 6c 61 74 65 20 61 72 65 20 o translate are
0500: 66 6f 75 6e 64 20 69 6e 20 73 72 63 2f 74 72 61 found in src/tra
0510: 6e 73 6c 61 74 65 2e 63 2e 0a 20 20 41 20 68 65 nslate.c.. A he
0520: 61 64 65 72 20 63 6f 6d 6d 65 6e 74 20 69 6e 20 ader comment in
0530: 73 72 63 2f 74 72 61 6e 73 6c 61 74 65 2e 63 20 src/translate.c
0540: 65 78 70 6c 61 69 6e 73 20 69 6e 20 64 65 74 61 explains in deta
0550: 69 6c 20 77 68 61 74 20 69 74 20 64 6f 65 73 2e il what it does.
0560: 0a 0a 2a 20 54 68 65 20 73 72 63 2f 6d 6b 69 6e ..* The src/mkin
0570: 64 65 78 2e 63 20 70 72 6f 67 72 61 6d 20 67 65 dex.c program ge
0580: 6e 65 72 61 74 65 73 20 73 6f 6d 65 20 43 20 63 nerates some C c
0590: 6f 64 65 20 74 68 61 74 20 69 6d 70 6c 65 6d 65 ode that impleme
05a0: 6e 74 73 0a 20 20 73 74 61 74 69 63 20 6c 6f 6f nts. static loo
05b0: 6b 75 70 20 74 61 62 6c 65 73 2e 20 20 53 65 65 kup tables. See
05c0: 20 74 68 65 20 68 65 61 64 65 72 20 63 6f 6d 6d the header comm
05d0: 65 6e 74 20 69 6e 20 74 68 65 20 73 6f 75 72 63 ent in the sourc
05e0: 65 20 63 6f 64 65 0a 20 20 66 6f 72 20 64 65 74 e code. for det
05f0: 61 69 6c 73 20 6f 6e 20 77 68 61 74 20 69 74 20 ails on what it
0600: 64 6f 65 73 2e 0a does..