metaonly module xdc.cfg.SourceDir |
|
|
Manage config generated source directories
Every "product" can generate a collection of source files that
must be compiled into a single library and linked with the
application. Each collection of source files is placed in a
subdirectory of a top-level directory and contains a GNU make file,
named makefile, which builds the library.
[
more ... ]
var SourceDir = xdc.useModule('xdc.cfg.SourceDir');
module-wide config parameters
module-wide functions
per-instance config parameters
per-instance creation
per-instance functions
DETAILS
Every "product" can generate a collection of source files that
must be compiled into a single library and linked with the
application. Each collection of source files is placed in a
subdirectory of a top-level directory and contains a GNU make file,
named makefile, which builds the library.
This module generates a top-level makefile that builds all "product"
libraries, the top-level directory that houses the "product"
sub-directories, and any files necessary for integration with eclipse/CDT
managed make. The generated "product" files need only ensure their
sources can be built via their generated makefile (from their
sub-directory).
config SourceDir.makefileName // module-wide |
|
Top-level makfile name
XDCscript usage |
meta-domain |
SourceDir.makefileName = String "makefile.libs";
DETAILS
This name is the base name of the makefile which is created in
outputDir.
config SourceDir.outputDir // module-wide |
|
Top-level directory for config generated sources and makefiles
XDCscript usage |
meta-domain |
SourceDir.outputDir = String undefined;
DETAILS
This directory path can be either an absolute path or a path
relative to the build working directory at the time source files
are generated (this is NOT necessarily the same as the build
directory at the time the generated sources are built!)
This parameter must never be set to an existing directory with source
files in it. The directory referenced by this parameter can be
deleted when a CCS project or a RTSC package containing the
configuration is cleaned.
If outputDir is not set, files will be output to the ./src
sub-directory of the directory containing the configuration script.
config SourceDir.toBuildDir // module-wide |
|
XDCscript usage |
meta-domain |
SourceDir.toBuildDir = String undefined;
config SourceDir.verbose // module-wide |
|
Output progress messages during a build
XDCscript usage |
meta-domain |
SourceDir.verbose = Int 0;
DETAILS
Positive values cause additional progress messages to be displayed.
The greater the value, the more information is displayed.
- 0
-
no build progress output
- 1
-
output a message when the build is started and when it
completes
- 2
-
output build progrss output (both stdout and stderr) as well
all level 1 output
- 3
-
output the build commands used as well as all level 2 output
SourceDir.build() // module-wide |
|
Run make using the generated makefiles
XDCscript usage |
meta-domain |
SourceDir.build() returns Int
SourceDir.getRelativePath() // module-wide |
|
XDCscript usage |
meta-domain |
SourceDir.getRelativePath(String fm, String to) returns String
Instance Config Parameters |
|
XDCscript usage |
meta-domain |
var params = new SourceDir.Params;
// Instance config-params object
params.buildLibs = Bool true;
// Build generated library sources
params.libraryName = String undefined;
// Name of library of compiled sources in sourceDir
params.sourceDir = String undefined;
// Source directory for a specific "product's" generated sources
config SourceDir.buildLibs // instance |
|
Build generated library sources
XDCscript usage |
meta-domain |
var params = new SourceDir.Params;
...
params.buildLibs = Bool true;
DETAILS
If set to false, the configuration step will not attempt to
build the generated library sources.
config SourceDir.libraryName // instance |
|
Name of library of compiled sources in sourceDir
XDCscript usage |
meta-domain |
var params = new SourceDir.Params;
...
params.libraryName = String undefined;
DETAILS
This path must be relative to outputDir.
config SourceDir.sourceDir // instance |
|
Source directory for a specific "product's" generated sources
XDCscript usage |
meta-domain |
var params = new SourceDir.Params;
...
params.sourceDir = String undefined;
DETAILS
This path must be relative to outputDir.
Instance Creation |
|
XDCscript usage |
meta-domain |
var params =
new SourceDir.
Params;
// Allocate instance config-params
params.config = ...
// Assign individual configs
var inst = SourceDir.create(String name, params);
// Create an instance-object
SourceDir.getGenLibraryName() // instance |
|
Get name of the output library for this set of source files
XDCscript usage |
meta-domain |
inst.getGenLibraryName() returns String
DETAILS
The name is either an absolute path or a path relative to the
build directory at the time configuration is run.
SourceDir.getGenSourceDir() // instance |
|
Get name of the output directory for this set of source files
XDCscript usage |
meta-domain |
inst.getGenSourceDir() returns String
DETAILS
The name is either an absolute path or a path relative to the
build directory at the time configuration is run.
SourceDir.getName() // instance |
|
XDCscript usage |
meta-domain |
inst.getName() returns String
generated on Thu, 27 Sep 2012 23:21:18 GMT