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
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
this writing) are C source code files that are subject to the
preprocessing steps described below. In the sequel, we will call these
other files "src.c" in order to have a convenient name. The reader
should understand that whenever "src.c" or "src.h" is used in the text
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
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
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
this writing) are C source code files that are subject to the
preprocessing steps described below. In the sequel, we will call these
other files "src.c" in order to have a convenient name. The reader
should understand that whenever "src.c" or "src.h" is used in the text
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 >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.
|