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 * If `outputDir` is not set, files will be output to the `./src`
42 * sub-directory of the directory containing the configuration script.
43 */
44 config String outputDir;
45
46 /*
47 * ======== toBuildDir ========
48 * Top-level build working directory
49 *
50 * This config parameter is the build working directory for the
51 * sources generated into `{@link #outputDir}` and is used to determine
52 * a relative path from the build directory to the output directory.
53 *
54 * The directory path can be either an absolute path, a path
55 * relative from the build working directory at the time source files
56 * are generated, or `undefined`.
57 *
58 * If `toBuildDir` and `outputDir` are `undefined`
59 * `toBuildDir` is set to be the parent of the build working directory
60 * at the time source files are generated; i.e., `"../"`
61 *
62 * If `toBuildDir` is `undefined` and `outputDir` is defined,
63 * `toBuildDir` is set to be the build working directory at the time
64 * source files are generated; i.e., `"./"`.
65 */
66 config String toBuildDir;
67
68 /*!
69 * ======== makefileName ========
70 * Top-level makfile name
71 *
72 * This name is the base name of the makefile which is created in
73 * `outputDir`.
74 */
75 config String makefileName = "makefile.libs";
76
77 /*!
78 * ======== verbose ========
79 * Output progress messages during a build
80 *
81 * Positive values cause additional progress messages to be displayed.
82 * The greater the value, the more information is displayed.
83 */
84 config Int verbose = 0;
85
86 /*!
87 * ======== getRelativePath ========
88 */
89 metaonly String getRelativePath(String fm, String to);
90
91 /*!
92 * ======== build ========
93 * Run make using the generated makefiles
94 */
95 metaonly Int build();
96
97 instance:
98 /*
99 * ======== create ========
100 */
101 create(String name);
102
103 /*!
104 * ======== getName ========
105 */
106 metaonly String getName();
107
108 /*!
109 * ======== getGenSourceDir ========
110 * Get name of the output directory for this set of source files
111 *
112 * The name is either an absolute path or a path relative to the
113 * build directory at the time configuration is run.
114 */
115 metaonly String getGenSourceDir();
116
117 /*!
118 * ======== getGenLibraryName ========
119 * Get name of the output library for this set of source files
120 *
121 * The name is either an absolute path or a path relative to the
122 * build directory at the time configuration is run.
123 */
124 metaonly String getGenLibraryName();
125
126 /*!
127 * ======== sourceDir ========
128 * Source directory for a specific "product's" generated sources
129 *
130 * This path must be relative to `outputDir`.
131 */
132 config String sourceDir;
133
134 /*!
135 * ======== libraryName ========
136 * Name of library of compiled sources in `sourceDir`
137 *
138 * This path must be relative to `outputDir`.
139 */
140 config String libraryName;
141 }
142 /*
143 * @(#) xdc.cfg; 1, 0, 2, 0,324; 4-29-2011 10:51:39; /db/ztree/library/trees/xdc/xdc-x03x/src/packages/
144 */
145