Specifying builds with metabld
tools.metabld
this chapter documents metabld to e32toolp release 222 level.
Overview
The metabld tool can be used to carry out a set of commands, usually abld commands, across several components. 
Metabld Invocation syntax
metabld [ metabld config file ] [ command ]

where
metabld config file	is a file which can optionally be used to control metabld	
command	is an optional command which will be passed on to abld for the relevant directories	
Type metabld without any parameters for a brief description of its usage.
metabld mostly makes use of two inputs: a set of commands, and a set of directories from which to carry out these commands.  Both these inputs can be specified in a metabld configuration (.mbc) file.  If a command is specified on the metabld command-line, then this command will be executed instead of any commands specified with a .mbc file.  If no directories are specified with a .mbc file, then the current drive will be searched for directories containing a bldmake configuration (bld.inf) file, and the specified commands will be carried out from the directories found.  For example, the command “metabld abld export” will carry out the abld export command from each of the directories containing a bld.inf file on the current drive.
metabld configuration files can be specified on the metabld command-line in one of two ways:
•	The base of the filename without a path can be specified when the file is in the directory specified by the EPOCROOT environment variable.  metabld always checks whether the first argument in it’s command line is the base-name of a file in the EPOCROOT directory.
•	The filename can be specified in full with either an absolute path or a path relative to the current directory (the inclusion of the .mbc extension is essential in this case).
Structure of metabld configuration files
A metabld configuration .mbc file has the form
wholefile :
	section-header
		section-data
sections :
|	section_commands
|	section_dirs

Each section header can appear any number of times in the file.  The section headers and their data are case-insensitive.
Note: a trailing backslash is used to indicate a line continuation.
Use the C++ style comment syntax for comments.  Since the files are preprocessed, they can #include other configuration files.  For this reason duplicate directories in the files are ignored.
Specifying commands
In the section_commands section, list the commands to be carried out.
section_commands :
	<command_1>
	<command_2>
	<command_3>
	…
	<command_n>
Each of the commands specified is carried out in the order specified.  If several directories are specified in the section_dirs section, then each command is carried out from each directory in turn before the next command is carried out.  Commands not to be carried out from each directory in turn can be carried out on a one-off basis by specifying them with the oneoff keyword in the section_commands section:
oneoff <start_directory> <command>
The start directory can be absolute (begin with a backslash) or relative to the configuration file directory.  It can be just “.”.
Specifying directories
In the section_dirs section, list the directories in which to carry out the commands.
section_dirs :
	 <start_directory_1>
	<start_directory_2>
	<start_directory_3>
	 …
	 <start_directory_n>
Directories can be relative to the configuration file or absolute, but they mustn’t begin with a drive letter.  They must not end in a backslash either, as this will be interpreted as a line continuation by the pre-processor.