1 /*
2 * Copyright (c) 2008 Texas Instruments and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Texas Instruments - initial implementation
10 *
11 * */
12 /*!
13 * ======== SourceDir ========
14 * Manage config generated source directories
15 *
16 * Every "product" can generate a collection of source files that
17 * must be compiled into a single library and linked with the
18 * application. Each collection of source files is placed in a
19 * subdirectory of a top-level directory and contains a GNU make file,
20 * named makefile, which builds the library.
21 *
22 * This module generates a top-level makefile that builds all "product"
23 * libraries, the top-level directory that houses the "product"
24 * sub-directories, and any files necessary for integration with eclipse/CDT
25 * managed make. The generated "product" files need only ensure their
26 * sources can be built via their generated makefile (from their
27 * sub-directory).
28 */
29 @Template("./SourceDir.xdt")
30 metaonlymodule SourceDir
31 {
32 /*!
33 * ======== outputDir ========
34 * Top-level directory for config generated sources and makefiles
35 *
36 * This directory path can be either an absolute path or a path
37 * relative to the build working directory at the time source files
38 * are generated (this is NOT necessarily the same as the build
39 * directory at the time the generated sources are built!)
40 *
41 * This parameter must never be set to an existing directory with source
42 * files in it. The directory referenced by this parameter can be
43 * deleted when a CCS project or a RTSC package containing the
44 * configuration is cleaned.
45 *
46 * If `outputDir` is not set, files will be output to the `./src`
47 * sub-directory of the directory containing the configuration script.
48 */
49 config String outputDir;
50
51 /*
52 * ======== toBuildDir ========
53 * Top-level build working directory
54 *
55 * This config parameter is the build working directory for the
56 * sources generated into `{@link #outputDir}` and is used to determine
57 * a relative path from the build directory to the output directory.
58 *
59 * The directory path can be either an absolute path, a path
60 * relative from the build working directory at the time source files
61 * are generated, or `undefined`.
62 *
63 * If `toBuildDir` and `outputDir` are `undefined`
64 * `toBuildDir` is set to be the parent of the build working directory
65 * at the time source files are generated; i.e., `"../"`
66 *
67 * If `toBuildDir` is `undefined` and `outputDir` is defined,
68 * `toBuildDir` is set to be the build working directory at the time
69 * source files are generated; i.e., `"./"`.
70 */
71 config String toBuildDir;
72
73 /*!
74 * ======== makefileName ========
75 * Top-level makfile name
76 *
77 * This name is the base name of the makefile which is created in
78 * `outputDir`.
79 */
80 config String makefileName = "makefile.libs";
81
82 /*!
83 * ======== verbose ========
84 * Output progress messages during a build
85 *
86 * Positive values cause additional progress messages to be displayed.
87 * The greater the value, the more information is displayed.
88 * @p(dlist) 89 * - 0
90 * no build progress output
91 * - 1
92 * output a message when the build is started and when it
93 * completes
94 * - 2
95 * output build progrss output (both stdout and stderr) as well
96 * all level 1 output
97 * - 3
98 * output the build commands used as well as all level 2 output
99 * @p 100 */
101 config Int verbose = 0;
102
103 /*!
104 * ======== getRelativePath ========
105 */
106 metaonly String getRelativePath(String fm, String to);
107
108 /*!
109 * ======== build ========
110 * Run make using the generated makefiles
111 */
112 metaonly Int build();
113
114 instance:
115 /*
116 * ======== create ========
117 */
118 create(String name);
119
120 /*!
121 * ======== getName ========
122 */
123 metaonly String getName();
124
125 /*!
126 * ======== getGenSourceDir ========
127 * Get name of the output directory for this set of source files
128 *
129 * The name is either an absolute path or a path relative to the
130 * build directory at the time configuration is run.
131 */
132 metaonly String getGenSourceDir();
133
134 /*!
135 * ======== getGenLibraryName ========
136 * Get name of the output library for this set of source files
137 *
138 * The name is either an absolute path or a path relative to the
139 * build directory at the time configuration is run.
140 */
141 metaonly String getGenLibraryName();
142
143 /*!
144 * ======== sourceDir ========
145 * Source directory for a specific "product's" generated sources
146 *
147 * This path must be relative to `outputDir`.
148 */
149 config String sourceDir;
150
151 /*!
152 * ======== libraryName ========
153 * Name of library of compiled sources in `sourceDir`
154 *
155 * This path must be relative to `outputDir`.
156 */
157 config String libraryName;
158
159 /*!
160 * ======== buildLibs ========
161 * Build generated library sources
162 *
163 * If set to `false`, the configuration step will not attempt to
164 * build the generated library sources.
165 */
166 config Bool buildLibs = true;
167 }
168 /*
169 * @(#) xdc.cfg; 1, 0, 2, 0,344; 9-14-2011 15:36:07; /db/ztree/library/trees/xdc/xdc-x20x/src/packages/
170 */
171