- Timestamp:
- Dec 13, 2003 11:18:38 PM (21 years ago)
- Location:
- trunk/doc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/kBuilddocs.c
r59 r61 1 1 /* $Id$ */ 2 2 /** @file 3 * kBuild Documentation file with the sole purpose of giving doxygen3 * A kBuild Documentation file with the sole purpose of giving doxygen 4 4 * something to chew on. 5 5 */ 6 6 7 7 8 /** @ page kBuildkBuild9 * 10 * @section kBuild_intro Introduction8 /** @mainpage kBuild 9 * 10 * @section kBuild_intro Introduction 11 11 * 12 12 * kBuild is a build system which intention is to simplify your makefiles 13 * and to hide cross platform projects issues.13 * and to hide cross platform detail for projects. 14 14 * 15 15 * kBuild is layered in three tiers, first comes the instructions given in the … … 32 32 * and references to the tools to be used and such. The configuration will 33 33 * ask kBuild to load any tool configurations it needs. These configuration 34 * files are named on the form 'tool. <toolname>.kMk'.34 * files are named on the form 'tool.[toolname].kMk'. 35 35 * 36 36 * The tool configuration contains callable macros and definitions for … … 41 41 * 42 42 * 43 * @section kBuild_makeref Makefile Reference43 * @section kBuild_makeref Makefile Reference 44 44 * 45 45 * The make file must start with including a configuration file which sets up … … 67 67 * 68 68 * 69 * 70 * @subsection kBuild_attributes Target Attributes 71 * 72 * Target attributes are use to define how to build a target. Some attributes 73 * have several specializations, like the .INCS attribute, a rule of thum is 74 * that the more specialized attributes is given higher precedence when 75 * ordering the result on a commandline or when used internally by kBuild. 76 * For instance, concidering the gcc C compiler, kBuild will pass .CINCS 77 * before .INCS. 78 * 79 * kBuild defines a wide range of target attributes. They might apply 80 * differently to different main targets. See in the section for the main in 81 * question for details on which attributes applicable to targets of that type. 82 * 83 * The attributes can be used on levels with different scope: 84 * 85 * - The broadest scope is gained when using the attribute unqualified, 86 * applying it to all targets in that makefile. 87 * 88 * - Qualifying the attribute with a target name, for instance like 89 * hello.CDEFS, applies that attribute to a target and all it's 90 * dependencies. The target name does not have to be a main target, 91 * allthough for only the main targets may be used without care to 92 * tool or platform specific suffixes or prefixes. 93 * 94 * - Qualifying the attribute with a target name and a immediate 95 * dependant make that attribute apply to that dependant when 96 * made for that specific main target. 97 * 98 * 99 * Possible target attributes: 100 * <dl> 101 * <dt>.FLAGS 102 * <dd>Flags to pass to all tools. The flags are passed unchanged. 103 * 104 * <dt>.CFLAGS 105 * <dd>Flags to pass to the compiler of C source files. 106 * 107 * <dt>.CXXFLAGS 108 * <dd>Flags to pass to the compiler of C++ source files. 109 * 110 * <dt>.AFLAGS 111 * <dd>Flags to pass to the compiler of assembly source files. 112 * 113 * <dt>.JFLAGS 114 * <dd>Flags to pass to the compiler of java source files. 115 * 116 * <dt>.RCFLAGS 117 * <dd>Flags to pass to the compiler of resource source files. 118 * 119 * <dt>.HLPFLAGS 120 * <dd>Flags to pass to the compiler of help source files. 121 * 122 * <dt>.IPFFLAGS 123 * <dd>Flags to pass to the compiler of book (OS/2 IPF) source files. 124 * 125 * <dt>.LFLAGS 126 * <dd>Flags to pass to the linker. 127 * 128 * <dt>.ARFLAGS 129 * <dd>Flags to pass to the librarian. 130 * 131 * 132 * <dt>.OPTS 133 * <dd>Symbolic options passed to compilers and linkers. kBuild defines 134 * (or will soon) a set of generic options used among all the tools 135 * which can be used for better cross tool interoperability. 136 * 137 * Note that allthough generic symbolic options are a nice idea, tools 138 * have different capabilities, so only a very small subset might be 139 * valid for all tools or all tools in a tools group. kBuild will 140 * detect illegal options and complain about it. 141 * 142 * <dt>.COPTS 143 * <dd>Symbolic options passed to the compiler of C source files. 144 * 145 * <dt>.CXXOPTS 146 * <dd>Symbolic options passed to the compiler of C++ source files. 147 * 148 * <dt>.AOPTS 149 * <dd>Symbolic options passed to the compiler of assmebly source files. 150 * 151 * <dt>.JOPTS 152 * <dd>Symbolic options passed to the compiler of java source files. 153 * 154 * <dt>.RCOPTS 155 * <dd>Symbolic options passed to the compiler of resource source files. 156 * 157 * <dt>.HLPOPTS 158 * <dd>Symbolic options passed to the compiler of help source files. 159 * 160 * <dt>.IPFOPTS 161 * <dd>Symbolic options passed to the compiler of book (OS/2 IPF) source files. 162 * 163 * <dt>.LOPTS 164 * <dd>Symbolic options passed to the linker. 165 * 166 * <dt>.AROPTS 167 * <dd>Symbolic options passed to the librarian. 168 * 169 * 170 * <dt>.DEFS 171 * <dd>Definitions to pass to compilers. The attribute contains a list 172 * of definitions with no -D or any other compiler option in front. 173 * If the definition have an value assigned use follow it by and 174 * equal sign and the value, no spaces before or after the equal sign. 175 * 176 * <dt>.CDEFS 177 * <dd>Definitions to pass to the compiler of C source files. 178 * 179 * <dt>.CXXDEFS 180 * <dd>Definitions to pass to the compiler of C++ source files. 181 * 182 * <dt>.ADEFS 183 * <dd>Definitions to pass to the compiler of assmbly source files. 184 * 185 * <dt>.RCDEFS 186 * <dd>Definitions to pass to the compiler of resource source files. 187 * 188 * 189 * <dt>.INCS 190 * <dd>Include path directives passed to compilers. The attribute contains 191 * a list of paths to directory which are to be searched for included 192 * files. The paths shall not be prefixed with any compiler options 193 * like -I, neither shall they be separated with ':' or ';'. Use space 194 * as separator between paths. 195 * 196 * <dt>.CINCS 197 * <dd>Include path directives to pass to the compiler of C source files. 198 * 199 * <dt>.CXXINCS 200 * <dd>Include path directives to pass to the compiler of C++ source files. 201 * 202 * <dt>.AINCS 203 * <dd>Include path directives to pass to the compiler of assmbly source files. 204 * 205 * <dt>.RCINCS 206 * <dd>Include path directives to pass to the compiler of resource source files. 207 * 208 * 209 * <dt>.INS 210 * <dd>For targets which are by default private defining this attribute 211 * cause that target to be installed. 212 * 213 * Note! This attribute is not automatically inherited by subtargets, 214 * i.e. use on makefile scope means it applies to main targets, while 215 * using it on a target scope means that specific target and nothing 216 * else. 217 * 218 * <dt>.INSDIR 219 * <dd>Which subdirectory under the installation root to put the target. 220 * 221 * <dt>.PUB 222 * <dd>For targets which are by default private defining this attribute 223 * cause that target to be published. 224 * Note! Same as .INS note. 225 * 226 * <dt>.PUBDIR 227 * <dd>Which subdirectory under the publish root to put the target. 228 * 229 * 230 * <dt>.NAME 231 * <dd>Alternative name under which to publish and install the target. 232 * Note! Same as .INS note. 233 * 234 * <dt>.SUFF 235 * <dd>Suffix to append to the target name. Most subtargets have a default 236 * suffix and also some main targets do. This attribute set or 237 * overrides suffix of a target. 238 * Note! Same as .INS note. 239 * Note! Suffix differs from extension in that it includes any leading 240 * dot. 241 * 242 * <dt>.PREF 243 * <dd>Prefix to append to the target name. Some targets (libraries for 244 * instance) have a default prefix. This attribute sets or overrides 245 * the prefix. 246 * Note! Same as .INS note. 247 * </dl> 248 * 249 * 250 * 251 * @subsection kBuild_makerefclues Main Target Clues 252 * 253 * The main target clues are what tells kBuild what to do. This section will 254 * detail with each of them in some detail. 255 * 256 * 257 * @subsubsection kBuild_PROGRAMS The PROGRAMS Clue 258 * 259 * The PROGRAMS clue gives kBuild a list of executable image targets to be made. 260 * 261 * 262 * @subsubsection kBuild_DLLS The DLLS Clue 263 * 264 * The DLLS clue gives kBuild a list of dynamic link library and shared object 265 * library targets to be made 266 * 267 * 268 * @subsubsection kBuild_DRIVERS The DRIVERS Clue 269 * 270 * The DRIVERS clue gives kBuild a list of driver module targets (OS kernel 271 * modules) to be made. 272 * 273 * 274 * @subsubsection kBuild_LIBRARIES The LIBRARIES Clue 275 * 276 * The LIBRARIES clue gives kBuild a list of object library targets to be made. 277 * 278 * 279 * @subsubsection kBuild_OBJECTS The OBJECTS Clue 280 * 281 * The OBJECTS clue gives kBuild a list of object module targets to be made. 282 * 283 * 284 * @subsubsection kBuild_JARS The JARS Clue 285 * 286 * The JARS clue gives kBuild a list of java archive targets to be made. 287 * 288 * 289 * @subsubsection kBuild_CLASSES The CLASSES Clue 290 * 291 * The CLASSES clue gives kBuild a list of java class targets to be made. 292 * 293 * 294 * @subsubsection kBuild_OTHERS The OTHERS Clue 295 * 296 * The OTHERS clue gives kBuild a list of other targets to be made. 297 * 298 * 299 * 69 300 */ 70 301 -
trunk/doc/kmkdocs.c
r19 r61 48 48 * 49 49 * 50 * @subsection The Micro Shell51 *52 * The micro shell provides the basic shell functionality kBuild need - no more,53 * no less. It is intended to be as simple as possible.54 *55 * The shell commands are case sensitive - all lowercase.56 *57 * The shell environment variables are case sensitive or insensitive according to58 * host os.59 *60 *61 *62 * @subsubsection Command Separators63 *64 * There is one command separator '&&'. This works like splitting the command line65 * into several makefile lines. This splitting isn't done by the micro shell but66 * the makefile interpreter.67 *68 * You might thing this is limiting, but no, you can use all the makefile command69 * prefixes.70 *71 *72 *73 * @subsubsection Path Component Separator (/)74 *75 * The shell uses '/' as path component separator.76 * For host OSes with the notion of drive letters or similar, ':' is77 * used to separate the drive letter and the path.78 *79 *80 *81 * @subsubsection UNC paths82 *83 * For host OSes which supports UNC paths these are supported but for the chdir84 * command.85 *86 * The Path Component Separator is still '/' for UNC paths.87 *88 *89 *90 * @subsubsection Wildchars91 *92 * '*' and '?' are accepted as wildchars.93 *94 * '*' means 0 or more characters. <br>95 * '?' means 1 character.96 *97 * When the term 'pattern' is use in command description this means that98 * wildchars are accepted.99 *100 *101 *102 * @subsubsection Quoting103 *104 * Use double quotes (") to quote filenames or executables containing spaces.105 *106 *107 *108 * @subsubsection Execute Program109 *110 * If the first, possibly quoted, word of a commandline if not found as an111 * internal command will be tried executed. If no path it will be searched112 * for in the PATH environment variable.113 *114 *115 *116 * @subsubsection Commands117 *118 * This section will describe the commands implemented by the shell.119 *120 *121 *122 * @subsubsubsection copy123 * Copies one or more files to a target file or directory.124 *125 * <b>Syntax: copy <source file pattern> [more sources] <target> </b>126 *127 * Specify one or more source file patterns.128 *129 * Specify exactly one target. The target may be a directory or a file.130 * If it's a file and multiple source files specified either thru pattern or131 * multiple source file specifications, the target file will be a copy of the132 * last one.133 *134 * The command fails if a source file isn't found. It also fails on read or135 * write errors.136 *137 *138 *139 * @subsubsubsection copytree140 * Copies one or more files to a target file or directory.141 *142 * <b>Syntax: copytree <source directory> <target directory> </b>143 *144 * Specify exactly one source directory.145 *146 * Specify exactly one target directory. The target directory path will be147 * created if doesn't exist.148 *149 * The command fails if source directory isn't found. It also fails on read or150 * write errors.151 *152 *153 *154 * @subsubsubsection rm155 * Deletes one or more files.156 *157 * <b>Syntax: rm [file pattern] [more files] </b>158 *159 * Specify 0 or more file patterns for deletion.160 *161 * This command fails if it cannot delete a file. It will not fail if a file162 * doesn't exist. It will neither fail if no files are specified.163 *164 *165 *166 * @subsubsubsection rmtree167 * Deletes one or more directory trees.168 *169 * <b>Syntax: rmtree [directory pattern] [directories] </b>170 *171 * Specify 0 or more directory patterns for deletion.172 *173 * This command fails if it cannot delete a file or directory. It will not fail174 * if a directory doesn't exist. It will neither fail if no files are specified.175 *176 *177 *178 * @subsubsubsection chdir179 * Changes the current directory.180 *181 * This updates the .CWD macro to the new current directory path.182 *183 * <b>Syntax: chdir <directory> </b>184 *185 *186 *187 * @subsubsubsection mkdir188 * Create directory.189 *190 * <b>Syntax: mkdir <directory> </b>191 *192 * Specify one directory to create.193 *194 *195 *196 * @subsubsubsection rmdir197 * Remove directory.198 *199 * <b>Syntax: rmdir <directory> </b>200 *201 * Specify one directory to remove. The directory must be empty.202 *203 * This command failes if directory isn't empty. It will not fail if204 * the directory doesn't exist.205 *206 *207 *208 * @subsubsubsection set209 * Set environment variable.210 *211 * <b>Syntax: set <envvar>=<value> </b>212 *213 *214 *215 * @subsubsubsection unset216 * Unset enviornment variable(s).217 *218 * <b>Syntax: unset <envvar pattern> [more envvars] </b>219 *220 * Specify on or more environment variable patterns.221 *222 *223 *224 * @subsubsubsection pushenv225 * Pushes a set of environment variables onto the environment stack. The226 * variables can later be popped back using the popenv command.227 *228 * If '*' is specified as pattern the complete enviornment is pushed and229 * when popped it will <b>replace</b> the enviornment.230 *231 * <b>Syntax: pushenv <envvar pattern> [more envvars] </b>232 * <b>Syntax: pushenv * </b>233 *234 *235 *236 * @subsubsubsection popenv237 * Pop a set of environment variables from the environment stack. If a '*'238 * push was done, we'll replace the enviornment with the variables poped off239 * the stack.240 *241 * <b>Syntax: popenv </b>242 *243 *244 *245 * @subsubsubsection echo246 * Prints a message to stdout.247 *248 * <b>Syntax: echo <level> <message>249 *250 * Level is verbosity level of the message. This is compared with the251 * KBUILD_MSG_LEVEL environment variable. The message is suppressed if the252 * level is lower that KBUILD_MSG_LEVEL.253 *254 * The message can be empty. Then a blank line will be printed.255 *256 *257 50 * 258 51 */
Note:
See TracChangeset
for help on using the changeset viewer.