Fossil SCM

fossil-scm / BUILD.txt
Source Blame History 78 lines
75f0294… drh 1 To do a complete build, just type:
f476744… drh 2
f476744… drh 3 ./configure; make
f476744… drh 4
75f0294… drh 5 The ./configure script builds Makefile from Makefile.in based on
75f0294… drh 6 your system and any options you select (run "./configure --help"
75f0294… drh 7 for a listing of the available options.)
75f0294… drh 8
75f0294… drh 9 If you wish to use the original Makefile with no configuration, you can
75f0294… drh 10 instead use:
75f0294… drh 11
75f0294… drh 12 make -f Makefile.classic
723f8c2… drh 13
723f8c2… drh 14 On a windows box, use one of the Makefiles in the win/ subdirectory,
4e93e84… jan.nijtmans 15 according to your compiler and environment. If you have MinGW or
4e93e84… jan.nijtmans 16 MinGW-w64 installed on your system (Msys or Cygwin, or as
4e93e84… jan.nijtmans 17 cross-compile environment on Linux or Darwin), then consider:
2d50893… drh 18
2d50893… drh 19 make -f win/Makefile.mingw
2d50893… drh 20
2d50893… drh 21 If you have VC++ installed on your system, then consider:
723f8c2… drh 22
2d50893… drh 23 cd win; nmake /f Makefile.msc
fb1fa7f… jeremy_c 24
fb1fa7f… jeremy_c 25 If you have trouble, or you want to do something fancy, just look at
75f0294… drh 26 Makefile.classic. There are 6 configuration options that are all well
46459fd… jan.nijtmans 27 commented. Instead of editing the Makefile.classic, consider copying
75f0294… drh 28 Makefile.classic to an alternative name such as "GNUMakefile",
75f0294… drh 29 "BSDMakefile", or "makefile" and editing the copy.
723f8c2… drh 30
fb1fa7f… jeremy_c 31
723f8c2… drh 32 BUILDING OUTSIDE THE SOURCE TREE
fb1fa7f… jeremy_c 33
fb1fa7f… jeremy_c 34 An out of source build is pretty easy:
fb1fa7f… jeremy_c 35
75f0294… drh 36 1. Make and change to a new directory to do the builds in.
75f0294… drh 37 2. Run the "configure" script from this directory.
75f0294… drh 38 3. Type: "make"
75f0294… drh 39
75f0294… drh 40 For example:
75f0294… drh 41
75f0294… drh 42 mkdir build
75f0294… drh 43 cd build
75f0294… drh 44 ../configure
75f0294… drh 45 make
75f0294… drh 46
48d7f43… brickviking 47 This will now keep all generated files separate from the maintained
fb1fa7f… jeremy_c 48 source code.
0e265b0… drh 49
0e265b0… drh 50 --------------------------------------------------------------------------
0e265b0… drh 51
0e265b0… drh 52 Here are some notes on what is happening behind the scenes:
0e265b0… drh 53
75f0294… drh 54 * The configure script (if used) examines the options given
75f0294… drh 55 and runs various tests with the C compiler to create Makefile
75f0294… drh 56 from the Makefile.in template as well as autoconfig.h
75f0294… drh 57
713b8be… drh 58 * The Makefile just sets up a few macros and then invokes the
0e265b0… drh 59 real makefile in src/main.mk. The src/main.mk makefile is
def53f0… mistachkin 60 automatically generated by a TCL script found at tools/makemake.tcl.
def53f0… mistachkin 61 Do not edit src/main.mk directly. Update tools/makemake.tcl and
0e265b0… drh 62 then rerun it.
0e265b0… drh 63
0e265b0… drh 64 * The *.h header files are automatically generated using a program
0e265b0… drh 65 called "makeheaders". Source code to the makeheaders program is
def53f0… mistachkin 66 found in tools/makeheaders.c. Documentation is found in
def53f0… mistachkin 67 tools/makeheaders.html.
0e265b0… drh 68
0e265b0… drh 69 * Most *.c source files are preprocessed using a program called
def53f0… mistachkin 70 "translate". The sources to translate are found in tools/translate.c.
def53f0… mistachkin 71 A header comment in tools/translate.c explains in detail what it does.
0e265b0… drh 72
def53f0… mistachkin 73 * The tools/mkindex.c program generates some C code that implements
0e265b0… drh 74 static lookup tables. See the header comment in the source code
0e265b0… drh 75 for details on what it does.
75f0294… drh 76
75f0294… drh 77 Additional information on the build process is available from
09908ab… drh 78 http://fossil-scm.org/home/doc/trunk/www/makefile.wiki

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button