Subversion Repositories gelsvn

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 bj 1
The Makefile, Project and Workspace Creator.
2
Designed by Justin Michel (michel_j@ociweb.com) and Chad Elliott.
3
Implemented by Chad Elliott (elliott_c@ociweb.com).
4
 
5
 
6
A single tool (MPC) can be used to generate tool specific input (i.e.
7
Makefile, dsp, vcproj, etc).  The generator takes platform and building
8
tool generic files (mpc files) as input which describe basic information
9
needed to generate a "project" file for various build tools.  These tools
10
include Make, NMake, Visual C++ 6, Visual C++ 7, etc.
11
 
12
One of the many unique and useful features of the Makefile, Project and
13
Workspace Creator is that the project definition files can employ the idea
14
of inheritance.  This feature allows a user to set up a basic base project
15
(mpb file) that can contain information that is applicable to all
16
sub-projects.  Things such as include paths, library paths and inter-project
17
dependencies could be described in this base project and any project that
18
inherits from it would contain this information as well.
19
 
20
Another set of files, known as template input files (mpd files), provides
21
the generator with the necessary information to fill platform and build
22
tool specific information for dynamic and static library and binary
23
executable projects.
24
 
25
Together, the generic input files and the template input files are applied
26
toward a platform and build specific template (mpt file) to create the final
27
product (a build tool specific input file).  These templates contain
28
"variables" that are filled in by the project creator with information
29
gathered through the mpc and mpd files and possibly by default values set
30
within the template itself.
31
 
32
Workspaces are defined by providing a list of mpc files in a single (mwc)
33
file.  For each mpc file specified, the workspace creator (mwc.pl) calls
34
upon the project creator to generate the project.  After all of the projects
35
are successfully generated, the tool specific workspace is generated
36
containing the projects and any defined inter-project dependency information
37
(if supported by the build tool).  If no workspace files are provided to the
38
workspace creator, then the current directory is traversed and any mpc files
39
located will be part of the workspace that is generated.
40
 
41
 
42
Workspace Declarations
43
----------------------
44
 
45
workspace(workspace_name) {
46
  file.mpc
47
  directory
48
  relative/path/to/another/mwc_file
49
}
50
 
51
Workspaces can contain individual mpc files, directories or other mwc files.
52
In the case of a directory, the workspace creator will traverse it and use
53
any mpc files that are found.  If another workspace file is listed in the
54
workspace files, it will be aggregated into the workspace with paths relative
55
to the directory in which the main workspace is found.  These "aggregated"
56
workspaces should not inherit from any other base workspace.  The workspace
57
files should have an 'mwc' extension.
58
 
59
You can exclude directories from a workspace using the 'exclude' scope
60
operator:
61
 
62
workspace {
63
  dir1
64
  dir2
65
 
66
  // exclude this_dir for all project types
67
  exclude {
68
    dir2/this_dir
69
  }
70
 
71
  // exclude other_dir for vc6, vc71 and vc8 types
72
  exclude(vc6, vc71, vc8) {
73
    dir2/other_dir
74
  }
75
 
76
  // exclude unix_only for every type except gnuace and make
77
  exclude(!gnuace, !make) {
78
    dir2/unix_only
79
  }
80
 
81
  dir3
82
}
83
 
84
 
85
Project Declarations
86
--------------------
87
 
88
project(project_name) : baseproject, anotherbaseproject {
89
  exename   = foo
90
  includes += "."
91
  libpaths  = directory
92
 
93
  Source_Files {
94
    file1.cpp
95
    file2.cpp
96
    .
97
    .
98
    fileN.cpp
99
  }
100
 
101
  Header_Files {
102
    file1.h
103
    file2.h
104
    .
105
    .
106
    fileN.h
107
  }
108
}
109
 
110
 
111
When listing files within components (Source_Files, Header_Files, etc.), you
112
can use wild cards (*?[]) to include groups of files as can be done in shells.
113
You can exclude files by preceding the name (or wild card) with the '!', but
114
this sort of exclusion only pertains to files that exist in the directory at
115
the time of project generation.  There is an additional syntax similar to
116
the '!' ('^') which works the same as the '!' except that after all of the
117
source files are added to the list (after automatic custom generated files
118
are added) these files are explicitly removed from the list.
119
 
120
The (project_name) part of the project declaration is optional.  If it is
121
left off, the project name will default to the name of the mpc file without
122
the extension.  Inheritance is optional.
123
 
124
If the project name or workspace name contains an asterisk (*) then the
125
default project (workspace) name will be used in its place.  For example, if
126
the mpc file is named example.mpc and it contains the following:
127
 
128
project(*client) {
129
 
130
The project name will be example_client.  If the any part of the modified
131
project (workspace) name contains a capital letter then each word will be
132
capitalized.  For instance, if the above mpc file example was named
133
Example.mpc, then the modified project name would be Example_Client.
134
 
135
If the value set for exename contains an asterisk then the asterisk portion
136
of the name will be replaced with the current project name.  The same logic
137
applies to sharedname and staticname.
138
 
139
If multiple projects are going to be contained within a single workspace
140
(using mwc.pl), there can be no duplication of project names.  This is
141
disallowed due to limitations of some workspace tools.
142
 
143
Project Keywords
144
----------------
145
exename         Specifies the name of the executable that will be created
146
sharedname      Specifies the name of the shared library that will be created
147
staticname      Specifies the name of the static library that will be created
148
dllout          If defined, specifies where the dynamic libraries will be
149
                placed.  This overrides libout in the dynamic case.
150
libout          Specifies where the dynamic and static libraries will be placed
151
install         Specifies where executables will be installed
152
pch_header      Specifies the precompiled header file name
153
pch_source      Specifies the precompiled source file name
154
postbuild       If this is defined in the project, the value will be
155
                interpreted as commands to run after the project has been
156
                successfully built.  The <%..%> construct can be used within
157
                this value to access template variables and functions of the
158
                template parser. In addition, the following pseudo variables
159
                can be used.
160
 
161
                  <%cat%>   - Platform non-specific command to cat a file.
162
                  <%cp%>    - Platform non-specific copy command.
163
                  <%mkdir%> - Platform non-specific mkdir command.
164
                  <%mv%>    - Platform non-specific move command.
165
                  <%rm%>    - Platform non-specific delete command.
166
                  <%nul%>   - Platform non-specific null device.
167
                  <%gt%>    - Project non-specific greater than sign.
168
                  <%lt%>    - Project non-specific less than sign.
169
                  <%and%>   - Project non-specific and sign.
170
                  <%or%>    - Project non-specific or sign.
171
                  <%quote%> - Project non-specific double quote.
172
 
173
recurse         If set to 1, MPC will recurse into directories listed under
174
                component listings and add any component corresponding files
175
                to the list.  This keyword can be used as a global project
176
                setting or a component scoped setting.
177
version         Specifies the version number for the library or executable
178
macros          These values will be passed as macros to the compiler.
179
libpaths        Specifies 1 or more locations to find libraries
180
includes        Specifies 1 or more locations to find include files
181
libs            Specifies 1 or more libraries to link into the exe or library
182
lit_libs        Specifies 1 or more libraries to link into the exe or library.
183
                If libraries receive a library decorator, then these will not.
184
pure_libs       Specifies 1 or more libraries to link into the exe or library.
185
                If libraries receive a library decorator, then these will not.
186
                If libraries receive a file extension, then these will not.
187
after           Specifies that this project must be built after 1 or more
188
                project names listed.
189
custom_only     Create a project that contains only custom generation
190
                targets (any file type described by a Define_Custom section).
191
dynamicflags    Specifies preprocessor flags needed for dynamic libraries
192
staticflags     Specifies preprocessor flags needed for static libraries
193
 
194
verbatim        This allows arbitrary information to be place in a generated
195
                project file.  The syntax is as follows:
196
 
197
                verbatim(<project type>, <location>) {
198
                  ..
199
                  ..
200
                }
201
 
202
                When MPC is generating a project of type <project type> and
203
                comes upon a marker that matches the <location> name, it
204
                will place the text found inside the construct directly into
205
                the generated project.  If you need to preserve white space,
206
                the line or lines should be placed inside double quotes.
207
 
208
specific        This scope allows assignments that are specific to a
209
                particular project type.  The syntax is as follows:
210
 
211
                specific(<project type> [, <project type> ...]) {
212
                  lit_libs += c
213
                  ...
214
                }
215
 
216
                or
217
 
218
                specific(<project type> [, <project type> ...]) {
219
                  lit_libs += c
220
                  ...
221
                } else {
222
                  list_libs += c_other
223
                  ...
224
                }
225
 
226
                Due to limited parsing capabilities, the else is required to
227
                be on the same line as the closing curly brace.
228
 
229
                If a keyword is not recognized as a valid MPC keyword, it is
230
                interpreted as a template value modifier.  In this
231
                situation, this construct has the exact same restrictions as
232
                the -value_template command line option.  See the USAGE file
233
                for more information.
234
 
235
conditional     This scope allows addition of source files conditionally
236
                based on a particular project type.  The syntax is as
237
                follows:
238
 
239
                conditional(<project type> [, <project type> ...]) {
240
                  source1.cpp
241
                  ...
242
                }
243
 
244
                or
245
 
246
                conditional(<project type> [, <project type> ...]) {
247
                  source1.cpp
248
                  ...
249
                } else {
250
                  source2.cpp
251
                  ...
252
                }
253
 
254
                Due to limited parsing capabilities, the else is required to
255
                be on the same line as the closing curly brace.
256
 
257
requires        Specifies which features should be enabled in order to
258
                generate the project file.
259
avoids          Specifies which features should be disabled in order to
260
                generate the project file.
261
 
262
Custom File Definitions
263
-----------------------
264
In order to support a variety of custom build rules, MPC allows you to
265
define your own custom file types.  Below is an example of a custom
266
definition.
267
 
268
project {
269
  Define_Custom(MOC) {
270
    automatic        = 0
271
    command          = $(QTDIR)/bin/moc
272
    postcommand      = echo "#include <some.h>" > <%temporary%> && \
273
                       <%cat%> <%output%> >> <%temporary%> && \
274
                       <%mv%> <%temporary%> <%output%>
275
    output_option    = -o
276
    inputext         = .h
277
    pre_extension    = _moc
278
    source_outputext = .cpp
279
  }
280
 
281
  MOC_Files {
282
    QtReactor.h
283
  }
284
 
285
  Source_Files {
286
    QtReactor_moc.cpp
287
  }
288
}
289
 
290
The above example defines a custom file type "MOC" which describes basic
291
information about how to process the input files and what output files are
292
created.  Once the custom file type is defined, MOC_Files can be defined in
293
order to specify the input files for this new file type.
294
 
295
Here is a list of keywords that can be used within the scope of
296
Define_Custom:
297
 
298
automatic           If set to 1, then attempt to automatically determine
299
                    which files belong to the set of input files for the
300
                    custom type.  If set to 0, then no files are
301
                    automatically added to the input files.  If omitted,
302
                    then automatic is assumed to be 1.  Custom file types
303
                    that are automatic will have the side effect of possibly
304
                    adding files to Source_Files, Inline_Files, Header_Files
305
                    Template_Files, Resource_Files and Documentation_Files
306
                    depending on which extension types the command generates.
307
dependent           If this is given a value, then a dependency upon that
308
                    value will be placed upon all of the generated files.
309
                    The default for this is unset and no dependency will be
310
                    generated.
311
command             The name of the command that should be used to process
312
                    the input files for the custom type.
313
commandflags        Any options that should be passed to the command go here.
314
inputext            This is a comma separated list of input file extensions
315
                    that belong to the command.
316
keyword             This is a special assignment that takes the form of the
317
                    following:
318
 
319
                    keyword newname = existing_custom_name
320
 
321
                    This has the effect of mapping newname to be the
322
                    same as existing_custom_name.  existing_custom_name,
323
                    which is optional, corresponds to one of the keywords
324
                    available within a Define_Custom scope (except for
325
                    keyword).  This function puts newname into the project
326
                    level scope such that it can be used outside of the
327
                    scope of the particular custom file type being defined.
328
                    It should be noted that the mapped keywords can not be
329
                    used within the scope of a 'specific' clause.  It does
330
                    not cause an error, but it has absolutely no affect.
331
                    If existing_custom_name is not supplied, then the only
332
                    way to utilize the newname value is from within the
333
                    template code. ex. <%newname%>
334
libpath             If the command requires an additional library path, add
335
                    it here.
336
output_option       If the command takes an option to specify only a single
337
                    file output name, then set it here.  Otherwise, this
338
                    should be omitted.
339
pch_postrule        If this is set to 1, then a rule will be added to the
340
                    custom rule that will modify the source output files to
341
                    include the precompiled header file.
342
postcommand         Allows a user to execute arbitrary commands after
343
                    the main command is run to generate the output file.
344
                    The following pseudo variables can be accessed from
345
                    within the postcommand assignment:
346
                    <%input%>     - The input file for the original command.
347
                    <%output%>    - The output created by the original command.
348
                    <%input_basename%>  - The basename of the input file.
349
                    <%input_noext%>     - The input file with no extension.
350
                    <%output_basename%> - The basename of the output file.
351
                    <%output_noext%>    - The output file with no extension.
352
                      The output file can be referenced as a generic output
353
                      file using <%output%> or can be referenced as a
354
                      component file (if it matches the particular type)
355
                      using one of the following:
356
 
357
                        <%source_file%>
358
                        <%template_file%>
359
                        <%header_file%>
360
                        <%inline_file%>
361
                        <%documentation_file%>
362
                        <%resource_file%>
363
 
364
                      The output file without an extension can be referenced
365
                      as a generic output file using <%output_noext%> or can
366
                      be referenced as a component file (if it matches the
367
                      particular type) using one of the following:
368
 
369
                        <%source_file_noext%>
370
                        <%template_file_noext%>
371
                        <%header_file_noext%>
372
                        <%inline_file_noext%>
373
                        <%documentation_file_noext%>
374
                        <%resource_file_noext%>
375
 
376
                      The following are also available for use within the
377
                      postcommand setting.  They return the extension (if
378
                      there is any) of the input and output files
379
                      respectively:
380
 
381
                        <%input_ext%>
382
                        <%output_ext%>
383
 
384
                    The following pseudo template variables are valid for
385
                    use within the command, commandflags, dependent,
386
                    postcommand and output_option settings:
387
 
388
                    <%temporary%> - A temporary file name.
389
                    <%cat%>       - Platform non-specific command to cat a file.
390
                    <%cp%>        - Platform non-specific copy command.
391
                    <%mkdir%>     - Platform non-specific mkdir command.
392
                    <%mv%>        - Platform non-specific move command.
393
                    <%rm%>        - Platform non-specific delete command.
394
                    <%nul%>       - Platform non-specific null device.
395
                    <%gt%>        - Project non-specific greater than sign.
396
                    <%lt%>        - Project non-specific less than sign.
397
                    <%and%>       - Project non-specific and sign.
398
                    <%or%>        - Project non-specific or sign.
399
                    <%quote%>     - Project non-specific double quote.
400
 
401
                    If any referenced pseudo template variable does
402
                    not contain a value, then the particular setting
403
                    (command, commandflags, dependent, postcommand or
404
                    output_option) will not be used.
405
pre_extension       If the command produces multiple files of the same
406
                    extension, this comma separated list can be used to
407
                    specify them.  For example, tao_idl creates two types of
408
                    files per extension (C.h, S.h, C.cpp, S.cpp, etc).
409
source_pre_extension        This is the same as pre_extension except that it
410
                            only applies to source_outputext.
411
inline_pre_extension        This is the same as pre_extension except that it
412
                            only applies to inline_outputext.
413
header_pre_extension        This is the same as pre_extension except that it
414
                            only applies to header_outputext.
415
template_pre_extension      This is the same as pre_extension except that it
416
                            only applies to template_outputext.
417
resource_pre_extension      This is the same as pre_extension except that it
418
                            only applies to resource_outputext.
419
documentation_pre_extension This is the same as pre_extension except that it
420
                            only applies to documentation_outputext.
421
pre_filename        This is similar to pre_extension except that the values
422
                    are prepended to the file name instead of the extension.
423
source_pre_filename         This is the same as pre_filename except that it
424
                            only applies to source_outputext.
425
inline_pre_filename         This is the same as pre_filename except that it
426
                            only applies to inline_outputext.
427
header_pre_filename         This is the same as pre_filename except that it
428
                            only applies to header_outputext.
429
template_pre_filename       This is the same as pre_filename except that it
430
                            only applies to template_outputext.
431
resource_pre_filename       This is the same as pre_filename except that it
432
                            only applies to resource_outputext.
433
documentation_pre_filename  This is the same as pre_filename except that it
434
                            only applies to documentation_outputext.
435
source_outputext    This is a comma separated list of possible source file
436
                    output extensions.  If the command does not produce
437
                    source files, then this can be omitted.
438
inline_outputext    This is a comma separated list of possible inline file
439
                    output extensions.  If the command does not produce
440
                    inline files, then this can be omitted.
441
header_outputext    This is a comma separated list of possible header file
442
                    output extensions.  If the command does not produce
443
                    header files, then this can be omitted.
444
template_outputext  This is a comma separated list of possible template file
445
                    output extensions.  If the command does not produce
446
                    template files, then this can be omitted.
447
resource_outputext  This is a comma separated list of possible resource file
448
                    output extensions.  If the command does not produce
449
                    resource files, then this can be omitted.
450
documentation_outputext  This is a comma separated list of possible
451
                         documentation file output extensions.  If the
452
                         command does not produce documentation files, then
453
                         this can be omitted.
454
generic_outputext   If the command does not generate any of the other output
455
                    types listed above, then the extensions should be listed
456
                    under this.
457
 
458
If the custom output can not be represented with the above output extension
459
keywords (*_outputext) and you have knowledge of the output files a priori,
460
you can represent them with the '>>' construct.
461
 
462
Below is an example that demonstrates the use of '>>'.  The command takes an
463
input file name of foo.prp and produces two files that have a completely
464
unrelated filename (i.e. foo !~ hello).
465
 
466
project {
467
  Define_Custom(Quogen) {
468
    automatic               = 0
469
    command                 = perl quogen.pl
470
    commandflags            = --debuglevel=1 --language=c++ \
471
                              --kernel_language=c++
472
    inputext                = .prp
473
    keyword quogenflags     = commandflags
474
  }
475
 
476
  Quogen_Files {
477
    foo.prp >> hello.h hello.cpp
478
  }
479
 
480
  Source_Files {
481
    hello.cpp
482
  }
483
}
484
 
485
There is a new construct that can be used within a Define_Custom section.
486
It is called 'optional' and can be used to represent optional custom output
487
dependent upon particular command line parameters passed to the custom
488
command.
489
 
490
project {
491
  Define_Custom(TEST) {
492
    optional(keyword) {
493
      flag_keyword(option) += value [, value]
494
    }
495
  }
496
}
497
 
498
In the above example, keyword can be any of the pre_extension, pre_filename
499
or keywords that end in _outputext.  flag_keyword can be any of the custom
500
definition keywords, however only commandflags really make any sense.
501
Inside the parenthesis, the flag_keyword value is searched for the 'option'
502
value.  If it is found, then the 'value' after the += is added to the list
503
specified by 'keyword'.  This can also be negated by prefixing 'option' with
504
an exclamation point (!).
505
 
506
project {
507
  Define_Custom(IDL) {
508
    source_pre_extension = C, S
509
    optional(source_pre_extension) {
510
      commandflags(-GA) += A
511
    }
512
  }
513
}
514
 
515
In the preceding example, the source_pre_extension contains C and S.  The
516
optional clause can be read as follows: If 'commandflags' contains -GA then
517
add A to source_pre_extension.
518
 
519
Particular output extensions are not required.  However at least one output
520
extension type is required in order for MPC to generate a target.  Within
521
graphical build environments, the custom input file will be listed
522
regardless of the presence of an extension definition.  In this case, the
523
input file will be "excluded" from the build.
524
 
525
For custom file types, there are a few keywords that can be used within the
526
custom file type input lists: command, commandflags, dependent, gendir and
527
postcommand.  These keywords (except for gendir) can be used to augment or
528
override the values of the same name defined in a Define_Custom section.
529
gendir can be used to specify the directory in which the generated
530
output will go.  Below is an example:
531
 
532
  MOC_Files {
533
    commandflags += -nw
534
    gendir = moc_generated
535
    QtReactor.h
536
  }
537
 
538
  Source_Files {
539
    moc_generated/QtReactor_moc.cpp
540
  }
541
 
542
In the above example, the generated file (QtReactor_moc.cpp) is placed in
543
the moc_generated directory and the -nw option is added to commandflags.
544
It should be noted that if the custom file definition does not set the
545
output_option then you must provide the necessary options in
546
commandflags to ensure that the generated output goes into the directory
547
specified by gendir.
548
 
549
The following example illustrates the use of the keyword mapping capability
550
of the Define_Custom:
551
 
552
project {
553
  Define_Custom(CIDL) {
554
    automatic         = 0;
555
    command           =  $(CIAO_ROOT)/bin/cidlc
556
    commandflags      = -I$(TAO_ROOT)/tao -I$(TAO_ROOT)/orbsvcs/orbsvcs --
557
    inputext          = .cidl
558
    source_outputext  = _svnt.cpp
559
    generic_outputext = E.idl
560
 
561
    // Allow cidlflags to be used outside the scope of CIDL_Files
562
    keyword cidlflags = commandflags
563
  }
564
 
565
  // This will get added to all commandflags for CIDL_Files
566
  cidlflags += --some_option
567
 
568
  CIDL_Files {
569
    // This will have a combination of the original commandflags plus
570
    // the value added to cidlflags above.
571
    file.cidl
572
  }
573
 
574
  CIDL_Files {
575
    // This will have a combination of the original commandflags plus
576
    // the value added to cidlflags above plus the value added to
577
    // cidlflags here.
578
    cidlflags += --another_option
579
    another_file.cidl
580
  }
581
}
582
 
583
Special type of feature project
584
-------------------------------
585
A feature project contains information as a project would, but can only
586
be a base project and will only be added to a sub project if the features
587
that it requires (or avoids) are present.
588
 
589
A feature definition requires at least one feature name.  A name by itself
590
specifies that the feature is required.  A '!' in front of the feature name
591
indicates that the feature must be disabled.  There may be more than one
592
feature listed between the parenthesis and they must be comma separated.
593
 
594
The following feature definition requires that the qt feature be enabled.
595
 
596
feature(qt) {
597
  Define_Custom(MOC) {
598
    automatic        = 0
599
    command          = $(QTDIR)/bin/moc
600
    output_option    = -o
601
    inputext         = .h
602
    pre_extension    = _moc
603
    source_outputext = .cpp
604
  }
605
 
606
  MOC_Files {
607
    QtSpecific.h
608
  }
609
 
610
  Source_Files {
611
    QtSpecific_moc.cpp
612
  }
613
}
614
 
615
Assuming that the above feature definition is stored in a file named
616
qt_specific.mpb, an mpc project could inherit from it and would only receive
617
the feature definition if the qt feature was enabled.
618
 
619
project: qt_specific {
620
  ...
621
}
622
 
623
 
624
Special Keywords Available to Templates
625
---------------------------------------
626
project_name    This contains the name of the project.
627
project_file    This contains the name of the output file.
628
guid            This is used by the VC7 project and workspace creator.
629
configurations  When used within a foreach context, this info (each
630
                configuration) is gathered for use with the VC7 workspace
631
                creator.
632
flag_overrides  Used to determine flags that have been overridden on a per
633
                file basis.
634
custom_types    The list of custom file types that may have been defined
635
                in the mpc file or a base project.
636
fornotlast      Insert the text on every foreach iteration except the last.
637
forlast         Insert the text only on the last foreach iteration.
638
fornotfirst     Insert the text on every foreach iteration except the first.
639
forfirst        Insert the text only on the first foreach iteration.
640
forcount        A one based index number of the foreach iterations.
641
 
642
Project Variable and Template Input Variable Interaction
643
--------------------------------------------------------
644
Project variables and template input variables are separate entities and in
645
the context of the TemplateParser, template input variables have precedence
646
over project variables.
647
 
648
This means that if the project keyword 'libout' is set in an MPC project and
649
is set as a template input variable, the template input variable value will
650
be used.  There are exceptions to this rule.  The following list shows the
651
project keywords that have their MPC project value appended to the template
652
input value (if there is a template input value).
653
 
654
libpaths
655
includes
656
libs
657
lit_libs
658
pure_libs
659
dynamicflags
660
staticflags
661
requires
662
avoids
663
macros
664
 
665
Workspaces
666
----------
667
Workspaces (mwc files) can have assignments similar to projects.  There are
668
currently only two assignments allowed.
669
 
670
The first is 'cmdline'.  The values given to the cmdline assignment will be
671
processed as command line options, but only to the projects that are
672
contained within the workspace (or the scope of the assignment).  The only
673
valid command line options for cmdline are -base, -global, -include, -ti,
674
-template, -static, -relative, -notoplevel, -value_template
675
and -value_project.
676
 
677
The second assignment is 'implicit'.  This assignment takes two different
678
types of values.  It takes a boolean value (0 or 1) to indicate that an
679
implicit project should be created in directories that contain no mpc file,
680
but contain project related files (source, headers, etc.).  The default
681
value for implicit is 0.  It also takes a character string that represents a
682
base project (similar to the -base option).  In this case, implicit is
683
enabled and each implicitly generate project file will have the base project
684
or base projects (when addition is used) when the project is created.
685
 
686
Defaulting Behavior
687
-------------------
688
1) If a project name is not specified
689
 
690
   it will be defaulted to the name of the mpc file without the extension
691
 
692
2) If a particular list is not specified (Source_Files, Header_Files, etc.)
693
 
694
   all of the files in the directory will be added to the corresponding list
695
   by extension
696
 
697
3) If custom files (ex. idl files) exist in the directory and
698
   the custom files components (ex. IDL_Files) are left defaulted (i.e. not
699
   listed) or the custom files components are specified and none of the
700
   custom generated files are listed in the corresponding lists
701
 
702
   the custom files are added to the custom files component list if they
703
   weren't specified and all of the (would be) generated files will be added
704
   to the front of the corresponding lists (source, inline and header lists)
705
 
706
4) If files are listed in the Source_Files list and
707
   a corresponding header or inline file exists
708
 
709
   the corresponding file will be added to the corresponding list (if it
710
   isn't already there)
711
 
712
5) If a sharedname is specified and staticname is not
713
 
714
   staticname is assigned the sharedname value (the same applies if
715
   staticname is specified and sharedname is not)
716
 
717
6) If exename is specified then the project target is considered an
718
   executable.  If neither exename, sharedname or staticname are used and
719
   any of the source files listed contains a "main", then the project target
720
   is considered an executable, otherwise it is considered a library.
721
 
722
7) If pch_header is not specified and a header file matches *_pch.h
723
 
724
   it is assumed to be the precompiled header file (the same applies to
725
   pch_source)
726
 
727
Processing Order
728
----------------
729
1) Project file is read
730
2) Template input file is read
731
3) Template file is read
732
4) Output project is written