aegis -Build(1) General Commands Manual aegis -Build(1) NNAAMMEE aegis build - build a change SSYYNNOOPPSSIISS aaeeggiiss --BBuuiilldd [ _o_p_t_i_o_n... ][ _f_i_l_e_n_a_m_e... ] aaeeggiiss --BBuuiilldd --LLiisstt [ _o_p_t_i_o_n... ] aaeeggiiss --BBuuiilldd --HHeellpp DDEESSCCRRIIPPTTIIOONN The _a_e_g_i_s _-_B_u_i_l_d command is used to build a project. The project con- figuration file is consulted for the appropriate build command, and that command is executed (see the _b_u_i_l_d__ _c_o_m_m_a_n_d and _i_n_t_e_g_r_a_t_i_o_n___- _b_u_i_l_d___c_o_m_m_a_n_d fields in _a_e_p_c_o_n_f(5) for more information.) Output of the command is automatically logged to the _a_e_g_i_s_._l_o_g file at the root of the development directory tree. The build command will be executed with its current directory being the root of the development direc- tory, irrespective of there the _a_e_g_i_s _-_B_u_i_l_d command was executed. If the change is in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state, references to the development directory, above, should be read as the integration direc- tory. Integration build commands are executed with the user and group set to the project's owning user and group. That is, it is not neces- sary for an integrator to log in as someone else, the project account for instance, in order to do an integration. NNoo BBuuiilldd RReeqquuiirreedd It is possible to configure your project so that no build is required. To do this, set the following build_command = "exit 0"; in the project configuration file. PPrroocceessss SSiiddee EEffffeeccttss This command will cancel any test registrations, because building the project logically invalidates them. If the project configuration file was deleted, any diff registration will also be canceled. NNoottiiffiiccaattiioonn The actions of the command are controlled by the _b_u_i_l_d__ _c_o_m_m_a_n_d and _i_n_t_e_g_r_a_t_i_o_n___b_u_i_l_d___c_o_m_m_a_n_d fields of the project _c_o_n_f_i_g file. See _a_e_p_- _c_o_n_f(5) for more information. FFiillee AAccttiioonn AAddjjuussttmmeenntt When this command runs, it first checks the change files against the projects files. If there are inconsistencies, the file actions will be adjusted as follows: create If a file is being created, but another change set is inte- grated which also creates the file, the file action in the change set still being developed will be adjusted to "modify". modify If a file is being modified, but another change set is inte- grated which removes the file, the file action in the change set still being developed will be adjusted to "create". remove If a file is being removed, but another change set is inte- grated which removes the file, the file will be dropped from the change set still being developed. PPAARRTTIIAALL BBUUIILLDD If files are named on the command line, these files are appended to the build command. This is known as a partial build. Partial builds are not legal in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state, but can often be useful in the _b_e_i_n_g _d_e_v_e_l_o_p_e_d state. Partial builds are not recorded in the change status, because builds are decoupled from aegis it is not pos- sible for aegis to know if any set of partial builds is equivalent to a full build. Warning: no change state lock is taken for a partial build, only a baseline read lock. FFiillee NNaammee IInntteerrpprreettaattiioonn The aegis program will attempt to determine the project file names from the file names given on the command line. All file names are stored within aegis projects as relative to the root of the baseline directory tree. The development directory and the integration direc- tory are shadows of this baseline directory, and so these relative names apply here, too. Files named on the command line are first con- verted to absolute paths if necessary. They are then compared with the baseline path, the development directory path, and the integration directory path, to determine a baseline-relative name. It is an error if the file named is outside one of these directory trees. The --BBAAssee__RREEllaattiivvee option may be used to cause relative filenames to be interpreted as relative to the baseline path; absolute filenames will still be compared with the various paths in order to determine a baseline-relative name. The _r_e_l_a_t_i_v_e___f_i_l_e_n_a_m_e___p_r_e_f_e_r_e_n_c_e in the user configuration file may be used to modify this default behavior. See _a_e_u_c_o_n_f(5) for more infor- mation. SSYYMMBBOOLLIICC LLIINNKKSS Many dependency maintenance tools, and indeed some compilers, have little or no support for include file search paths, and thus for the concept of the two-level directory hierarchy employed by Aegis. (It becomes multi-level when Aegis' branching functionality is used.) To allow these tools to be used, Aegis provides the ability to maintain a set of symbolic links between the development directory of a change and the baseline of a project, so it appears to these tools that all of the project's files are present in the development directory. PPrroojjeecctt CCoonnffiigguurraattiioonn The _d_e_v_e_l_o_p_m_e_n_t___d_i_r_e_c_t_o_r_y___s_t_y_l_e field of the project configuration file controls the appearance of the development directory. See _a_e_p_- _c_o_n_f(5) for more information. By using a setting such as development_directory_style = { source_file_symlink = true; during_build_only = true; }; the user never sees the symbolic links, because they are added purely for the benefit of the dependency maintenance tool during the execu- tion of the _a_e_b(1) command. By using a setting such as development_directory_style = { source_file_symlink = true; }; (the other will default to false) the symbolic links will be created at develop begin time (see _a_e_d_b(1) for more information) and also maintained by each _a_e_b(1) invocation. Note that the symbolic links are only maintained at these times, so project integrations during the course of editing change sourec files may leave the symbolic links in an inconsistent state until the next build. When files are copied from the baseline into a change, using the _a_e_c_p(1) command, the symbolic link pointing into the baseline, if any, will be removed before the file is copied. NNoottee:: Using this functionality in either form has implications for how the rules file of the dependency maintenance tool is written. Rules must _r_e_m_o_v_e their targets before creating them (usually with an _r_m _-_f command) if you use any of the link sub-fields (both hard links and symbolic links). This is to avoid attempting to write the result on the symbolic link, which will point at a read-only file in the project baseline. This is similar to the same requirement for using the _l_i_n_k___i_n_t_e_g_r_a_t_i_o_n___d_i_r_e_c_t_o_r_y field of the project configuration file. UUsseerr CCoonnffiigguurraattiioonn There is a _s_y_m_b_o_l_i_c___l_i_n_k___p_r_e_f_e_r_e_n_c_e field in the user configuration file (see _a_e_u_c_o_n_f(5) for more information). This controls whether _a_e_b(1) will verify the symbolic links before the build (default) or whether it will assume they are up-to-date. (This field is only rele- vant if _d_e_v_e_l_o_p_m_e_n_t___d_i_r_e_c_t_o_r_y_____s_t_y_l_e_._s_o_u_r_c_e___f_i_l_e___s_y_m_l_i_n_k is true.) For medium-to-large projects, verifying the symbolic links can take as long as the build itself. Assuming the symbolic links are up-to-date can be a large time-saving for these projects. It may be advisable to review your choice of DMT in such a situation. The _a_e_d_b(1) command ddooeess nnoott consult this preference. Thus, in most situations, the symbolic links will be up-to-date when the build is performed. The only Aegis function which may result in the symbolic links becoming out-of-date is the integration of another change, as this may alter the presence or absence of files in the baseline. In this situation, the default _a_e_b(1) action is to ignore the user pref- erence and the verify symbolic links. There are two command line options which modify _a_e_b(1) behavior fur- ther: the --VVeerriiffyy--SSyymmbboolliicc--LLiinnkkss option says to verify the symbolic links; and the --AAssssuummee--SSyymmbboolliicc--LLiinnkkss option says to assume the sym- bolic links are up-to-date. In each case the option over-rides the default and the user preference. It is possible to obtain behaviour similar to Tom Lord'a Arch by using a setting such as: development_directory_style = { source_file_link = true; source_file_symlink = true; }; It is possible to obtain behaviour similar to CVS by using a setting such as: development_directory_style = { source_file_copy = true; }; There are many more possible configurations of the _d_e_v_e_l_o_p_m_e_n_t___- _d_i_r_e_c_t_o_r_y___s_t_y_l_e, usually with helpful build side-effects. See _a_e_p_- _c_o_n_f(1) and the _D_e_p_e_n_e_d_e_n_c_y _M_a_i_n_t_e_n_a_n_c_e _T_o_o_l chapter of the User Guide for more information. The symbolic link command line options and preferences apply equally to hard links and file copies (the names have historical origins). TTHHEE BBAASSEELLIINNEE LLOOCCKK The baseline lock is used to ensure that the baseline remains in a consistent state for the duration of commands which need to read the contents of files in the baseline. The commands which require the baseline to be consistent (these include the _a_e_b(1), _a_e_c_p(1) and _a_e_d(1) commands) take a baseline _r_e_a_d lock. This is a non-exclusive lock, so the concurrent development of changes is not hindered. The command which modifies the baseline, _a_e_i_p_a_s_s(1), takes a baseline _w_r_i_t_e lock. This is an exclusive lock, forcing _a_e_i_p_a_s_s(1) to block until there are no active baseline read locks. It is possible that one of the above development commands will block until an in-progress _a_e_g_i_s _-_I_n_t_e_g_r_a_t_e___P_A_S_S completes. This is usually of short duration while the project history is updated. The delay is essential so that these commands receive a consistent view of the baseline. No other integration command will cause the above develop- ment commands to block. When aegis' branch functionality is in use, a read (non-exclusive) lock is taken on the branch baseline and also each of the "parent" baselines. However, a baseline write (exclusive) lock is only taken on the branch baseline; the "parent" baselines are only read (non- exclusive) locked. MMEETTRRIICCSS Aegis is capable of recording metrics as part of the file attributes of a change. This allows various properties of files to be recorded for later trend analysis, or other uses. The specific metrics are not dictated by Aegis. It is expected that the integration build will create a metrics file for each of the source files the change. These metrics files must be in the format specified by _a_e_m_e_t_r_i_c_s(5). The name of the metrics file defaults to "_f_i_l_e_n_a_m_e,,SS", however it may be varied, by setting the _m_e_t_r_i_c_s___f_i_l_e_n_a_m_e___p_a_t_t_e_r_n field of the project _c_o_n_f_i_g file. See _a_e_p_c_o_n_f(5) for more information. If such a metrics file exists, for each source file in a change, it will be read and remembered at integrate pass time. If it does not exist, Aegis assumes there are no relevant metrics for that file, and proceeds silently; it is not an error. OOPPTTIIOONNSS The following options are understood: _n_a_m_e==_v_a_l_u_e Command line arguments of this form are assumed to be variable assignments for the build tool. They are passed through unchanged. They imply a partial build. --BBAAssee__RREEllaattiivvee This option may be used to cause relative filenames to be con- sidered relative to the base of the source tree. See _a_e_u_- _c_o_n_f(5) for the corresponding user preference. --CCUUrrrreenntt__RREEllaattiivvee This option may be used to cause relative filenames to be con- sidered relative to the current directory. This is usually the default. See _a_e_u_c_o_n_f(5) for the corresponding user pref- erence. --CChhaannggee _n_u_m_b_e_r This option may be used to specify a particular change within a project. See _a_e_g_i_s(1) for a complete description of this option. --HHeellpp This option may be used to obtain more information about how to use the _a_e_g_i_s program. --LLiisstt This option may be used to obtain a list of suitable subjects for this command. The list may be more general than expected. --MMIINNIImmuumm This option may be used to request a source-only _d_e_v_e_l_o_p_m_e_n_t___- _d_i_r_e_c_t_o_r_y___s_t_y_l_e. This is useful if you want to simulate some- thing like _a_e_i_b _-_m_i_n_i_m_u_m in the development directory. This option is only meaningful if _d_e_v_e_l_o_p_m_e_n_t___d_i_r_e_c_t_o_r_y___s_t_y_l_e is being used. If the change is in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state, and the developer specified --MMIINNIImmuumm when issuing the _a_e_g_i_s _-_I_n_t_e_g_r_a_t_e___B_e_g_i_n command, then this option is set by default. --NNoott__LLooggggiinngg This option may be used to disable the automatic logging of output and errors to a file. This is often useful when sev- eral aegis commands are combined in a shell script. --PPrroojjeecctt _n_a_m_e This option may be used to select the project of interest. When no --PPrroojjeecctt option is specified, the _A_E_G_I_S___P_R_O_J_E_C_T envi- ronment variable is consulted. If that does not exist, the user's _$_H_O_M_E_/_._a_e_g_i_s_r_c file is examined for a default project field (see _a_e_u_c_o_n_f(5) for more information). If that does not exist, when the user is only working on changes within a sin- gle project, the project name defaults to that project. Oth- erwise, it is an error. --TTEERRssee This option may be used to cause listings to produce the bare minimum of information. It is usually useful for shell scripts. --VVeerrbboossee This option may be used to cause aegis to produce more output. By default aegis only produces output on errors. When used with the --LLiisstt option this option causes column headings to be added. --VVeerriiffyy__SSyymmbboolliicc__LLiinnkkss This option may be used to request that the symbolic links, or hard links, or file copies, in the work area be updated to reflect the current state of the baseline. This is controlled by the _d_e_v_e_l_o_p_m_e_n_t___d_i_r_e_c_t_o_r_y___s_t_y_l_e field of the project con- figuration file. Only files which are not involved in the change are updated. See also the "symbolic_links_preference" field of _a_e_u_c_o_n_f(5). This option is the default, if meaning- ful for your configuration. The name is an historical acci- dent, hard links and file copies are included. --AAssssuummee__SSyymmbboolliicc__LLiinnkkss This option may be used to request that no update of baseline mirror files take place. This options is useful when you _d_e_f_- _i_n_i_t_e_l_y _k_n_o_w the files' up-to-date-ness isn't important right now; incorrect use of this option may have unanticipated build side-effects. See also the "symbolic_links_preference" field of _a_e_u_c_o_n_f(5). This option is the default, if not meaningful for your configuration. The name is an historical accident, hard links and file copies are included. --WWaaiitt This option may be used to require Aegis commands to wait for access locks, if they cannot be obtained immediately. Defaults to the user's _l_o_c_k___w_a_i_t___p_r_e_f_e_r_e_n_c_e if not specified, see _a_e_u_c_o_n_f(5) for more information. --NNoo__WWaaiitt This option may be used to require Aegis commands to emit a fatal error if access locks cannot be obtained immediately. Defaults to the user's _l_o_c_k___w_a_i_t___p_r_e_f_e_r_e_n_c_e if not specified, see _a_e_u_c_o_n_f(5) for more information. See also _a_e_g_i_s(1) for options common to all aegis commands. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-project", "-PROJ" and "-p" are all inter- preted to mean the --PPrroojjeecctt option. The argument "-prj" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line, after the function selectors. The GNU long option names are understood. Since all option names for _a_e_g_i_s are long, this means ignoring the extra leading '-'. The "----_o_p_t_i_o_n==_v_a_l_u_e" convention is also understood. RREECCOOMMMMEENNDDEEDD AALLIIAASS The recommended alias for this command is csh% alias aeb 'aegis -b \!* -v' sh$ aeb(){aegis -b "$@" -v} EERRRROORRSS It is an error if the change is not assigned to the current user. It is an error if the change is not in one of the _b_e_i_n_g _d_e_v_e_l_o_p_e_d or _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d states. It is an error if a partial build is requested and the change is in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state. EEXXIITT SSTTAATTUUSS The _a_e_g_i_s command will exit with a status of 1 on any error. The _a_e_g_i_s command will only exit with a status of 0 if there are no errors. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS See _a_e_g_i_s(1) for a list of environment variables which may affect this command. See _a_e_p_c_o_n_f(5) for the project configuration file's _p_r_o_j_e_c_t___s_p_e_c_i_f_i_c field for how to set environment variables for all commands executed by Aegis. SSEEEE AALLSSOO _a_e_d_b(1) begin development of a change _a_e_c_p(1) file copy also takes a baseline read lock (non-exclusive) _a_e_i_b(1) begin integration of a change _a_e_i_p_a_s_s(1) integrate pass takes a baseline write lock (exclusive) _a_e_t(1) run tests _a_e_m_e_t_r_i_c_s(5) metrics values file format _a_e_p_c_o_n_f(5) project configuration file format _a_e_u_c_o_n_f(5) user configuration file format CCOOPPYYRRIIGGHHTT aegis version 4.25.D611 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller The aegis program comes with ABSOLUTELY NO WARRANTY; for details use the '_a_e_g_i_s _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the '_a_e_g_i_s _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. AAUUTTHHOORR Peter Miller E-Mail: pmiller@opensource.org.au /\/\* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Aegis aegis -Build(1)