Fossil

Check-in [2d50893d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a "Contributing" link to the homepage. Update the build documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2d50893dd8653fa68fe29e1f6c7c5b473549f21b
User & Date: drh 2011-06-18 18:06:56
Context
2011-06-18
18:30
Update the release-test document. Add a Change Log. check-in: a992b276 user: drh tags: trunk
18:06
Add a "Contributing" link to the homepage. Update the build documentation. check-in: 2d50893d user: drh tags: trunk
17:02
Fixes to the windows makefiles to support sequential version numbers. check-in: 30b0986d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to BUILD.txt.

1
2
3
4
5
6
7
8

9
10




11
12
13
14
15
16
17
All of the source code for fossil is contained in the src/ subdirectory.
But there is a lot of generated code, so you will probably want to
use the Makefile.  To do a complete build on unix, just type:

   make

On a windows box, use one of the Makefiles in the win/ subdirectory,
according to your compiler and environment.  For example:


   make -f win/Makefile.w32





If you have trouble, or you want to do something fancy, just look at
top level makefile. There are 6 configuration options that are all well
commented. Instead of editing the Makefile, consider copying the Makefile
to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
and editing the copy.








|
>

|
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
All of the source code for fossil is contained in the src/ subdirectory.
But there is a lot of generated code, so you will probably want to
use the Makefile.  To do a complete build on unix, just type:

   make

On a windows box, use one of the Makefiles in the win/ subdirectory,
according to your compiler and environment.  If you have GCC and MSYS
installed on your system, the consider:

   make -f win/Makefile.mingw

If you have VC++ installed on your system, then consider:

   cd win; nmake /f Makefile.msc

If you have trouble, or you want to do something fancy, just look at
top level makefile. There are 6 configuration options that are all well
commented. Instead of editing the Makefile, consider copying the Makefile
to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
and editing the copy.

Changes to www/build.wiki.

31
32
33
34
35
36
37
38

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69











70
71
72
73
74
75
76
<a href="http://www.fossil-scm.org/fossil/leaves">Leaves</a> link at
the top of the page.</p></li>

<li><p>Select a version of of fossil you want to download.  Click on its
link.  Note that you must successfully log in as "anonymous" in step 1
above in order to see the link to the detailed version information.</p></li>

<li><p>Finally, click on the

"Zip Archive" link.  This link will build a ZIP archive of the 
complete source code and download it to your browser.
</ol>

<h2>2.0 Compiling</h2>

<p>Follow these steps to compile on a unix platform
(Linux, *BSD, MacOS, etc):</p>

<ol>
<li value="6">
<p>Create a directory to hold the source code.  Then unzip the
ZIP archive you downloaded into that directory.  You should be
in the top-level folder of that directory</p></li>

<li><p><b>(Optional:)</b>
Edit the Makefile to set it up like you want.  You probably do not
need to do anything.  Do not be intimidated:  There are less than 10
variables in the makefile that can be changed.  The whole Makefile
is only a few dozen lines long and most of those lines are comments.</p>

<li><p>Type "<b>make</b>"
</ol>

<p>To build on windows, use an alternative makefile suitable for your
particular build environment.  The alternative windows makefiles are
all found in the win/ subdirectory of the source tree.  So, for example,
if you want build using the 
[http://www.mingw.org/ | mingw/msys compiler package] for windows, then
run "<b>make -f win/Makefile.mingw</b>" instead of just "<b>make</b>"
in step 8 above.</p>












<h2>3.0 Installing</h2>

<ol>
<li value="9">
<p>The finished binary is named "fossil" (or "fossil.exe" on windows).  
Put this binary in a 







|
>
|





<
<
<


|
|








|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<a href="http://www.fossil-scm.org/fossil/leaves">Leaves</a> link at
the top of the page.</p></li>

<li><p>Select a version of of fossil you want to download.  Click on its
link.  Note that you must successfully log in as "anonymous" in step 1
above in order to see the link to the detailed version information.</p></li>

<li><p>Finally, click on one of the
"Zip Archive" or "Tarball" links, according to your preference.
These link will build a ZIP archive or a gzip-compressed tarball of the 
complete source code and download it to your browser.
</ol>

<h2>2.0 Compiling</h2>




<ol>
<li value="6">
<p>Create a directory to hold the source code.  Then unarchive the
ZIP or tarball you downloaded into that directory.  You should be
in the top-level folder of that directory</p></li>

<li><p><b>(Optional:)</b>
Edit the Makefile to set it up like you want.  You probably do not
need to do anything.  Do not be intimidated:  There are less than 10
variables in the makefile that can be changed.  The whole Makefile
is only a few dozen lines long and most of those lines are comments.</p>

<li><p>Run make to build the "fossil" or "fossil.exe" executable.  The
details depend on your platform and compiler:

<ol type="a">
<li><p><i>Unix</i> &rarr; the default Makefile works on most unix and
unix-like systems.  Simply type "<b>make</b>".

<li><p><i>Msys/MinGW</i> &rarr; Use the
mingw makefile: "<b>make -f win/Makefile.mingw</b>"

<li><p><i>VC++</i> &rarr; Use the msc makefile.  First
change to the "win/" subdirectory ("<b>cd win</b>") then run
"<b>nmake /f Makefile.msc</b>".
</ol>
</ol>

<p>Note that Fossil requires the "zlib" compression library.  This library
is available by default on most unix systems, but it will typically have to
be installed separately on windows systems.  For windows builds, you may
need to edit the makefile to tell it exactly where zlib is located on your
system.</p>

<h2>3.0 Installing</h2>

<ol>
<li value="9">
<p>The finished binary is named "fossil" (or "fossil.exe" on windows).  
Put this binary in a 

Changes to www/index.wiki.

18
19
20
21
22
23
24

25
26
27
28
29
30
31
<ul>
<li> [http://www.fossil-scm.org/download.html | Download]
<li> [./quickstart.wiki | Quick Start]
<li> [./build.wiki | Install]
<li> [../COPYRIGHT-BSD2.txt | License]
<li> [/timeline | Recent changes]
<li> [./faq.wiki | FAQ]

<li> [./permutedindex.wiki | Doc Index]
<li> Mailing list
     <ul>
     <li> [http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users | sign-up]
     <li> [http://www.mail-archive.com/fossil-users@lists.fossil-scm.org | archives]
     <ul>
</ul>







>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<ul>
<li> [http://www.fossil-scm.org/download.html | Download]
<li> [./quickstart.wiki | Quick Start]
<li> [./build.wiki | Install]
<li> [../COPYRIGHT-BSD2.txt | License]
<li> [/timeline | Recent changes]
<li> [./faq.wiki | FAQ]
<li> [./contribute.wiki | Contributing]
<li> [./permutedindex.wiki | Doc Index]
<li> Mailing list
     <ul>
     <li> [http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users | sign-up]
     <li> [http://www.mail-archive.com/fossil-users@lists.fossil-scm.org | archives]
     <ul>
</ul>

Changes to www/makefile.wiki.

50
51
52
53
54
55
56





57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
..
87
88
89
90
91
92
93
94
95

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

113
114
115
116
117
118
119
120
121
The TH1 script engine is implemented using files:

  7.  th.c
  8.  th.h

These two files are imports like the SQLite source files, 
and so are not preprocessed.






The src/ subdirectory also contains documentation about the
makeheaders preprocessor program:

  9.  [../src/makeheaders.html | makeheaders.html]

Click on the link to read this documentation.  In addition there is
a [http://www.tcl.tk/ | Tcl] script used to build the various makefiles:

  10.  makemake.tcl

Running this Tcl script will automatically regenerate all makefiles.
In order to add a new source file to the Fossil implementation, simply
edit makemake.tcl to add the new filename, then rerun the script, and
all of the makefiles for all targets will be rebuild.

Finally, there is one of the makefiles generated by makemake.tcl:

  11.  main.mk

The main.mk makefile is invoked from the Makefile in the top-level
directory.  The main.mk is generated by makemake.tcl and should not
be hand edited.  Other makefiles generated by makemake.tcl are in 
other subdirectories (currently all in the win/ subdirectory).

All the other files in the src/ subdirectory (79 files at the time of
................................................................................
that follows, we really mean all (79) other source files other than
the exceptions described above.

<h1>3.0 Automatically generated files</h1>

The "VERSION.h" header file contains some C preprocessor macros that
identify the version of Fossil that is to be build.  The VERSION.h file is
generated automatically from information extracted from the "manifest"
and "manifest.uuid" source files in the root directory of the source tree.

(The "manifest" and "manifest.uuid" files are automatically generated and
updated by Fossil itself.  See the [/help/setting | fossil set manifest]
command for additional information.)

Under unix, there is an AWK script that converts manifest and manifest.uuid
into VERSION.h.  For windows, there is a C program: win/version.c.  
(Unix builds could also used the version.c convert, if desired, but AWK
seems easier there.)  To run the VERSION.h generator, first compile
the win/version.c source file into a command-line program (named "version.exe")
than run:

<blockquote><pre>
version.exe manifest.uuid manifest VERSION.h
</pre></blockquote>

The pathnames in the above command might need to be adjusted to get the
directories right.  The point is that the manifest.uuid and manifest files

in the root of the source tree are the first two arguments and the name of
the generated VERSION.h file is the third and final argument.

<h1>4.0 Preprocessing</h1>

There are three preprocessors for the Fossil sources.  The mkindex
and translate preprocessors can be run in any order.  The makeheaders
preprocessor must be run after translate.








>
>
>
>
>




|




|








|







 







|
|
>




|
|
<
|
|



|



|
>
|
|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
The TH1 script engine is implemented using files:

  7.  th.c
  8.  th.h

These two files are imports like the SQLite source files, 
and so are not preprocessed.

The VERSION.h header file is generated from other information sources
using a small program called:

  9.  mkversion.c

The src/ subdirectory also contains documentation about the
makeheaders preprocessor program:

  10.  [../src/makeheaders.html | makeheaders.html]

Click on the link to read this documentation.  In addition there is
a [http://www.tcl.tk/ | Tcl] script used to build the various makefiles:

  11.  makemake.tcl

Running this Tcl script will automatically regenerate all makefiles.
In order to add a new source file to the Fossil implementation, simply
edit makemake.tcl to add the new filename, then rerun the script, and
all of the makefiles for all targets will be rebuild.

Finally, there is one of the makefiles generated by makemake.tcl:

  12.  main.mk

The main.mk makefile is invoked from the Makefile in the top-level
directory.  The main.mk is generated by makemake.tcl and should not
be hand edited.  Other makefiles generated by makemake.tcl are in 
other subdirectories (currently all in the win/ subdirectory).

All the other files in the src/ subdirectory (79 files at the time of
................................................................................
that follows, we really mean all (79) other source files other than
the exceptions described above.

<h1>3.0 Automatically generated files</h1>

The "VERSION.h" header file contains some C preprocessor macros that
identify the version of Fossil that is to be build.  The VERSION.h file is
generated automatically from information extracted from the "manifest",
"manifest.uuid", and "VERSION" source files in the root directory of the
source tree.
(The "manifest" and "manifest.uuid" files are automatically generated and
updated by Fossil itself.  See the [/help/setting | fossil set manifest]
command for additional information.)

The VERSION.h header file is generated by
a C program: src/mkversion.c.  

To run the VERSION.h generator, first compile the src/mkversion.c
 source file into a command-line program (named "mkversion.exe")
than run:

<blockquote><pre>
mkversion.exe manifest.uuid manifest VERSION &gt;VERSION.h
</pre></blockquote>

The pathnames in the above command might need to be adjusted to get the
directories right.  The point is that the manifest.uuid, manifest, and
VERSION files
in the root of the source tree are the three arguments and
the generated VERSION.h file appears on standard output.

<h1>4.0 Preprocessing</h1>

There are three preprocessors for the Fossil sources.  The mkindex
and translate preprocessors can be run in any order.  The makeheaders
preprocessor must be run after translate.