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 ... ]
Configuration settings sourced in xdc/cfg/SourceDir.xdc
var SourceDir = xdc.useModule('xdc.cfg.SourceDir');
module-wide config parameters
    SourceDir.makefileName// Top-level makfile name = String "makefile.libs";
module-wide functions
    SourceDir.getRelativePath// (String fm, String to) returns String
per-instance config parameters
    var params = new SourceDir.Params// Instance config-params object;
        params.buildLibs// Build generated library sources = Bool true;
        params.libraryName// Name of library of compiled sources in sourceDir = String undefined;
per-instance creation
    var inst = SourceDir.create// Create an instance-object(String name, params);
per-instance functions
    inst.getName// () returns String
 
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

Configuration settings
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

Configuration settings
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 package containing the configuration script 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.verbose  // module-wide

Output progress messages during a build

Configuration settings
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 progress 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

Configuration settings
SourceDir.build() returns Int
 
 
SourceDir.getRelativePath()  // module-wide
Configuration settings
SourceDir.getRelativePath(String fm, String to) returns String
 
Instance Config Parameters

Configuration settings
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.Params.buildLibs  // instance

Build generated library sources

Configuration settings
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.Params.libraryName  // instance

Name of library of compiled sources in sourceDir

Configuration settings
var params = new SourceDir.Params;
  ...
params.libraryName = String undefined;
 
DETAILS
This path must be relative to outputDir.
 
config SourceDir.Params.sourceDir  // instance

Source directory for a specific "product's" generated sources

Configuration settings
var params = new SourceDir.Params;
  ...
params.sourceDir = String undefined;
 
DETAILS
This path must be relative to outputDir.
Static Instance Creation

Configuration settings
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

Configuration settings
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

Configuration settings
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
Configuration settings
inst.getName() returns String
 
generated on Fri, 28 Feb 2014 04:57:03 GMT