File Annotation
Not logged in
0e265b0184 2007-08-01       drh: All of the source code for fossil is contained in the src/ subdirectory.
0e265b0184 2007-08-01       drh: But there is a lot of generated code, so you will probably want to
0e265b0184 2007-08-01       drh: use the Makefile.  To do a complete build, just type:
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh:    make
0e265b0184 2007-08-01       drh: 
fb1fa7f1a6 2009-12-09    Jeremy: That should work out-of-the-box on Macs and Linux systems. If you are
fb1fa7f1a6 2009-12-09    Jeremy: building on a Windows box, install MinGW as well as MinGW's make (or
fb1fa7f1a6 2009-12-09    Jeremy: MSYS). You can then type:
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:   make -f Makefile.w32
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy: If you have trouble, or you want to do something fancy, just look at
fb1fa7f1a6 2009-12-09    Jeremy: top level makefile. There are 5 configuration options that are all well
fb1fa7f1a6 2009-12-09    Jeremy: commented. Instead of editing the Makefile, create a new file named
fb1fa7f1a6 2009-12-09    Jeremy: config.mak (for Macs and Linux systems) or config.w32 (for Windows) and
fb1fa7f1a6 2009-12-09    Jeremy: override any settings you wish there.
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy: Out of source builds?
fb1fa7f1a6 2009-12-09    Jeremy: --------------------------------------------------------------------------
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy: An out of source build is pretty easy:
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:   1. Make a new directory to do the builds in.
fb1fa7f1a6 2009-12-09    Jeremy:   2. Create a config.mak (or .w32 ... explained above) and add something
fb1fa7f1a6 2009-12-09    Jeremy:   along the lines of:
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:     SRCDIR=../src
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:   3. From that directory, type:
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:     Macs and Linux:
fb1fa7f1a6 2009-12-09    Jeremy:       $ make -f ../Makefile
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy:     Windows:
fb1fa7f1a6 2009-12-09    Jeremy:       C:\fossil\build> make -f ../Makefile.w32
fb1fa7f1a6 2009-12-09    Jeremy: 
fb1fa7f1a6 2009-12-09    Jeremy: This will now keep all generates files seperate from the maintained
fb1fa7f1a6 2009-12-09    Jeremy: source code.
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh: --------------------------------------------------------------------------
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh: Here are some notes on what is happening behind the scenes:
0e265b0184 2007-08-01       drh: 
713b8be852 2009-08-28       drh: * The Makefile just sets up a few macros and then invokes the
0e265b0184 2007-08-01       drh:   real makefile in src/main.mk.  The src/main.mk makefile is
0e265b0184 2007-08-01       drh:   automatically generated by a TCL script found at src/makemake.tcl.
0e265b0184 2007-08-01       drh:   Do not edit src/main.mk directly.  Update src/makemake.tcl and
0e265b0184 2007-08-01       drh:   then rerun it.
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh: * The *.h header files are automatically generated using a program
0e265b0184 2007-08-01       drh:   called "makeheaders".  Source code to the makeheaders program is
0e265b0184 2007-08-01       drh:   found in src/makeheaders.c.  Documentation is found in
0e265b0184 2007-08-01       drh:   src/makeheaders.html.
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh: * Most *.c source files are preprocessed using a program called
0e265b0184 2007-08-01       drh:   "translate".  The sources to translate are found in src/translate.c.
0e265b0184 2007-08-01       drh:   A header comment in src/translate.c explains in detail what it does.
0e265b0184 2007-08-01       drh: 
0e265b0184 2007-08-01       drh: * The src/mkindex.c program generates some C code that implements
0e265b0184 2007-08-01       drh:   static lookup tables.  See the header comment in the source code
0e265b0184 2007-08-01       drh:   for details on what it does.