43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
write code.
<h2>3.0 Adding New Source Code Files</h2>
New source code files are added in the "src/" subdirectory of the Fossil
source tree. Suppose one wants to add a new source code file named
"xyzzy.c". The first step is to add this file to the various makefiles.
Do so by editing the file src/makemake.tcl and adding "xyzzy" (without
the final ".c") to the list of source modules at the top of that script.
Save the result and then run the makemake.tcl script using a TCL
interpreter. The command to run the makemake.tcl script is:
<b>tclsh makemake.tcl</b>
The working directory must be src/ when the command above is run.
|
|
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
write code.
<h2>3.0 Adding New Source Code Files</h2>
New source code files are added in the "src/" subdirectory of the Fossil
source tree. Suppose one wants to add a new source code file named
"xyzzy.c". The first step is to add this file to the various makefiles.
Do so by editing the file tools/makemake.tcl and adding "xyzzy" (without
the final ".c") to the list of source modules at the top of that script.
Save the result and then run the makemake.tcl script using a TCL
interpreter. The command to run the makemake.tcl script is:
<b>tclsh makemake.tcl</b>
The working directory must be src/ when the command above is run.
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
exceptions to this rule. Don't worry about those exceptions. The
files you write will require this #include line.)
The "#if INTERFACE ... #endif" section is optional and is only needed
if there are structure definitions or typedefs or macros that need to
be used by other source code files. The makeheaders preprocessor
uses definitions in the INTERFACE section to help it generate header
files. See [../src/makeheaders.html | makeheaders.html] for additional
information.
After creating a template file such as shown above, and after updating
the makefiles, you should be able to recompile Fossil and have it include
your new source file, even before you source file contains any code.
It is recommended that you try this.
|
|
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
exceptions to this rule. Don't worry about those exceptions. The
files you write will require this #include line.)
The "#if INTERFACE ... #endif" section is optional and is only needed
if there are structure definitions or typedefs or macros that need to
be used by other source code files. The makeheaders preprocessor
uses definitions in the INTERFACE section to help it generate header
files. See [../tools/makeheaders.html | makeheaders.html] for additional
information.
After creating a template file such as shown above, and after updating
the makefiles, you should be able to recompile Fossil and have it include
your new source file, even before you source file contains any code.
It is recommended that you try this.
|