Line -... |
Line 1... |
- |
|
1 |
.:: 3/13/2002 ::.
|
- |
|
2 |
|
1 |
The Makefile, Project and Workspace Creator.
|
3 |
The Makefile, Project and Workspace Creator.
|
2 |
Designed by Justin Michel (michel_j@ociweb.com) and Chad Elliott.
|
4 |
Designed by Justin Michel (michel_j@ociweb.com) and Chad Elliott.
|
3 |
Implemented by Chad Elliott (elliott_c@ociweb.com).
|
5 |
Implemented by Chad Elliott (elliott_c@ociweb.com).
|
4 |
|
6 |
|
5 |
A single tool (MPC) can be used to generate tool specific input (i.e.
|
7 |
A single tool (MPC) can be used to generate tool specific input (i.e.
|
Line 105... |
Line 107... |
105 |
fileN.h
|
107 |
fileN.h
|
106 |
}
|
108 |
}
|
107 |
}
|
109 |
}
|
108 |
|
110 |
|
109 |
|
111 |
|
- |
|
112 |
MPC expects all files to be listed with forward slashes (/) if a file name
|
- |
|
113 |
contains a directory. Providing files with back slashes (\) can cause
|
- |
|
114 |
unexpected results during generation.
|
- |
|
115 |
|
110 |
When listing files within components (Source_Files, Header_Files, etc.), you
|
116 |
When listing files within components (Source_Files, Header_Files, etc.), you
|
111 |
can use wild cards (*?[]) to include groups of files as can be done in shells.
|
117 |
can use wild cards (*?[]) to include groups of files as can be done in shells.
|
112 |
You can exclude files by preceding the name (or wild card) with the '!', but
|
118 |
You can exclude files by preceding the name (or wild card) with the '!', but
|
113 |
this sort of exclusion only pertains to files that exist in the directory at
|
119 |
this sort of exclusion only pertains to files that exist in the directory at
|
114 |
the time of project generation. There is an additional syntax similar to
|
120 |
the time of project generation. There is an additional syntax similar to
|
Line 142... |
Line 148... |
142 |
Project Keywords
|
148 |
Project Keywords
|
143 |
----------------
|
149 |
----------------
|
144 |
exename Specifies the name of the executable that will be created
|
150 |
exename Specifies the name of the executable that will be created
|
145 |
sharedname Specifies the name of the shared library that will be created
|
151 |
sharedname Specifies the name of the shared library that will be created
|
146 |
staticname Specifies the name of the static library that will be created
|
152 |
staticname Specifies the name of the static library that will be created
|
- |
|
153 |
buildflags This keyword can only be used as a source component scoped
|
- |
|
154 |
setting (ie. inside the scope of Source_Files). It
|
- |
|
155 |
specifies additional build flags that will be passed to the
|
- |
|
156 |
compiler as the source files are being compiled.
|
147 |
dllout If defined, specifies where the dynamic libraries will be
|
157 |
dllout If defined, specifies where the dynamic libraries will be
|
148 |
placed. This overrides libout in the dynamic case.
|
158 |
placed. This overrides libout in the dynamic case.
|
149 |
libout Specifies where the dynamic and static libraries will be placed
|
159 |
libout Specifies where the dynamic and static libraries will be placed
|
150 |
install Specifies where executables will be installed
|
160 |
install Specifies where executables will be installed
|
151 |
pch_header Specifies the precompiled header file name
|
161 |
pch_header Specifies the precompiled header file name
|
Line 156... |
Line 166... |
156 |
this value to access template variables and functions of the
|
166 |
this value to access template variables and functions of the
|
157 |
template parser. In addition, the following pseudo variables
|
167 |
template parser. In addition, the following pseudo variables
|
158 |
can be used.
|
168 |
can be used.
|
159 |
|
169 |
|
160 |
<%cat%> - Platform non-specific command to cat a file.
|
170 |
<%cat%> - Platform non-specific command to cat a file.
|
- |
|
171 |
<%cmp%> - Platform non-specific compare command.
|
161 |
<%cp%> - Platform non-specific copy command.
|
172 |
<%cp%> - Platform non-specific copy command.
|
162 |
<%mkdir%> - Platform non-specific mkdir command.
|
173 |
<%mkdir%> - Platform non-specific mkdir command.
|
163 |
<%mv%> - Platform non-specific move command.
|
174 |
<%mv%> - Platform non-specific move command.
|
- |
|
175 |
<%os%> - Returns either win32 or unix.
|
164 |
<%rm%> - Platform non-specific delete command.
|
176 |
<%rm%> - Platform non-specific delete command.
|
165 |
<%nul%> - Platform non-specific null device.
|
177 |
<%nul%> - Platform non-specific null device.
|
166 |
<%gt%> - Project non-specific greater than sign.
|
178 |
<%gt%> - Project non-specific greater than sign.
|
167 |
<%lt%> - Project non-specific less than sign.
|
179 |
<%lt%> - Project non-specific less than sign.
|
168 |
<%and%> - Project non-specific and sign.
|
180 |
<%and%> - Project non-specific and sign.
|
169 |
<%or%> - Project non-specific or sign.
|
181 |
<%or%> - Project non-specific or sign.
|
170 |
<%quote%> - Project non-specific double quote.
|
182 |
<%quote%> - Project non-specific double quote.
|
171 |
|
- |
|
- |
|
183 |
prebuild This is similar to postbuild except that it will be
|
- |
|
184 |
performed before the build instead of after.
|
172 |
recurse If set to 1, MPC will recurse into directories listed under
|
185 |
recurse If set to 1, MPC will recurse into directories listed under
|
173 |
component listings and add any component corresponding files
|
186 |
component listings and add any component corresponding files
|
174 |
to the list. This keyword can be used as a global project
|
187 |
to the list. This keyword can be used as a global project
|
175 |
setting or a component scoped setting.
|
188 |
setting or a component scoped setting.
|
176 |
version Specifies the version number for the library or executable
|
189 |
version Specifies the version number for the library or executable
|
Line 232... |
Line 245... |
232 |
interpreted as a template value modifier. In this
|
245 |
interpreted as a template value modifier. In this
|
233 |
situation, this construct has the exact same restrictions as
|
246 |
situation, this construct has the exact same restrictions as
|
234 |
the -value_template command line option. See the USAGE file
|
247 |
the -value_template command line option. See the USAGE file
|
235 |
for more information.
|
248 |
for more information.
|
236 |
|
249 |
|
- |
|
250 |
expand This scope allows the specification for a variable that is
|
- |
|
251 |
found within $() to be expanded from the list of possible
|
- |
|
252 |
values. These possible values can contain environment
|
- |
|
253 |
variables (specified by $VAR_NAME) and plain text. If a
|
- |
|
254 |
possible value contains an environment variable and that
|
- |
|
255 |
variable is defined then this value is used to expand the
|
- |
|
256 |
$() variable. If the environment variable is not defined
|
- |
|
257 |
then this possible value is not used. The syntax is as
|
- |
|
258 |
follows:
|
- |
|
259 |
|
- |
|
260 |
expand(<variable name>) {
|
- |
|
261 |
<possible value 1>
|
- |
|
262 |
.
|
- |
|
263 |
.
|
- |
|
264 |
<possible value n>
|
- |
|
265 |
}
|
- |
|
266 |
|
237 |
conditional This scope allows addition of source files conditionally
|
267 |
conditional This scope allows addition of source files conditionally
|
238 |
based on a particular project type. The syntax is as
|
268 |
based on a particular project type. The syntax is as
|
239 |
follows:
|
269 |
follows:
|
240 |
|
270 |
|
241 |
conditional(<project type> [, <project type> ...]) {
|
271 |
conditional(<project type> [, <project type> ...]) {
|
Line 421... |
Line 451... |
421 |
only applies to template_outputext.
|
451 |
only applies to template_outputext.
|
422 |
resource_pre_extension This is the same as pre_extension except that it
|
452 |
resource_pre_extension This is the same as pre_extension except that it
|
423 |
only applies to resource_outputext.
|
453 |
only applies to resource_outputext.
|
424 |
documentation_pre_extension This is the same as pre_extension except that it
|
454 |
documentation_pre_extension This is the same as pre_extension except that it
|
425 |
only applies to documentation_outputext.
|
455 |
only applies to documentation_outputext.
|
- |
|
456 |
generic_pre_extension This is the same as pre_extension except that it
|
- |
|
457 |
only applies to generic_outputext.
|
426 |
pre_filename This is similar to pre_extension except that the values
|
458 |
pre_filename This is similar to pre_extension except that the values
|
427 |
are prepended to the file name instead of the extension.
|
459 |
are prepended to the file name instead of the extension.
|
428 |
source_pre_filename This is the same as pre_filename except that it
|
460 |
source_pre_filename This is the same as pre_filename except that it
|
429 |
only applies to source_outputext.
|
461 |
only applies to source files.
|
430 |
inline_pre_filename This is the same as pre_filename except that it
|
462 |
inline_pre_filename This is the same as pre_filename except that it
|
431 |
only applies to inline_outputext.
|
463 |
only applies to inline files.
|
432 |
header_pre_filename This is the same as pre_filename except that it
|
464 |
header_pre_filename This is the same as pre_filename except that it
|
433 |
only applies to header_outputext.
|
465 |
only applies to header files.
|
434 |
template_pre_filename This is the same as pre_filename except that it
|
466 |
template_pre_filename This is the same as pre_filename except that it
|
435 |
only applies to template_outputext.
|
467 |
only applies to template files.
|
436 |
resource_pre_filename This is the same as pre_filename except that it
|
468 |
resource_pre_filename This is the same as pre_filename except that it
|
437 |
only applies to resource_outputext.
|
469 |
only applies to resource files.
|
438 |
documentation_pre_filename This is the same as pre_filename except that it
|
470 |
documentation_pre_filename This is the same as pre_filename except that it
|
439 |
only applies to documentation_outputext.
|
471 |
only applies to documentation files.
|
- |
|
472 |
generic_pre_filename This is the same as pre_filename except that it
|
- |
|
473 |
only applies to generic files.
|
440 |
source_outputext This is a comma separated list of possible source file
|
474 |
source_outputext This is a comma separated list of possible source file
|
441 |
output extensions. If the command does not produce
|
475 |
output extensions. If the command does not produce
|
442 |
source files, then this can be omitted.
|
476 |
source files, then this can be omitted.
|
443 |
inline_outputext This is a comma separated list of possible inline file
|
477 |
inline_outputext This is a comma separated list of possible inline file
|
444 |
output extensions. If the command does not produce
|
478 |
output extensions. If the command does not produce
|
Line 662... |
Line 696... |
662 |
in the mpc file or a base project.
|
696 |
in the mpc file or a base project.
|
663 |
fornotlast Insert the text on every foreach iteration except the last.
|
697 |
fornotlast Insert the text on every foreach iteration except the last.
|
664 |
forlast Insert the text only on the last foreach iteration.
|
698 |
forlast Insert the text only on the last foreach iteration.
|
665 |
fornotfirst Insert the text on every foreach iteration except the first.
|
699 |
fornotfirst Insert the text on every foreach iteration except the first.
|
666 |
forfirst Insert the text only on the first foreach iteration.
|
700 |
forfirst Insert the text only on the first foreach iteration.
|
667 |
forcount A one based index number of the foreach iterations.
|
701 |
forcount By default, a one based index number of the foreach
|
- |
|
702 |
iterations. The base can be modified by providing a base
|
- |
|
703 |
number in the foreach as in the following examples:
|
- |
|
704 |
|
- |
|
705 |
<%foreach(4, includes)%>
|
- |
|
706 |
...
|
- |
|
707 |
<%endfor%>
|
- |
|
708 |
|
- |
|
709 |
|
- |
|
710 |
<%foreach(include, 4, includes)%>
|
- |
|
711 |
...
|
- |
|
712 |
<%endfor%>
|
668 |
|
713 |
|
669 |
Project Variable and Template Input Variable Interaction
|
714 |
Project Variable and Template Input Variable Interaction
|
670 |
--------------------------------------------------------
|
715 |
--------------------------------------------------------
|
671 |
Project variables and template input variables are separate entities and in
|
716 |
Project variables and template input variables are separate entities and in
|
672 |
the context of the TemplateParser, template input variables have precedence
|
717 |
the context of the TemplateParser, template input variables have precedence
|
Line 695... |
Line 740... |
695 |
currently only two assignments allowed.
|
740 |
currently only two assignments allowed.
|
696 |
|
741 |
|
697 |
The first is 'cmdline'. The values given to the cmdline assignment will be
|
742 |
The first is 'cmdline'. The values given to the cmdline assignment will be
|
698 |
processed as command line options, but only to the projects that are
|
743 |
processed as command line options, but only to the projects that are
|
699 |
contained within the workspace (or the scope of the assignment). The only
|
744 |
contained within the workspace (or the scope of the assignment). The only
|
700 |
valid command line options for cmdline are -base, -global, -include, -ti,
|
745 |
valid command line options for cmdline are -base, -genins, -global, -include,
|
701 |
-template, -static, -relative, -notoplevel, -value_template
|
746 |
-language, -ti, -template, -static, -relative, -notoplevel, -value_template
|
702 |
and -value_project.
|
747 |
and -value_project.
|
703 |
|
748 |
|
704 |
The second assignment is 'implicit'. This assignment takes two different
|
749 |
The second assignment is 'implicit'. This assignment takes two different
|
705 |
types of values. It takes a boolean value (0 or 1) to indicate that an
|
750 |
types of values. It takes a boolean value (0 or 1) to indicate that an
|
706 |
implicit project should be created in directories that contain no mpc file,
|
751 |
implicit project should be created in directories that contain no mpc file,
|