3.3. Building and Cleaning Projects

If your project description is correct and prjm was able to build the dependency graph, you can proceed to build the complete project. Use the command

  prjm -buildlocal


to build all packages of your project and ship the results to the local package pool. As you will remember, ComPact uses up to three different pools of packages as binary repositories for the use of local building actions. The local pool is the one that is private to every developer and can always be used without compromising the work of other developers.

If you are sure that the state of your project consists only of released packages and may be of use for other developers, you can use one of the following commands

  prjm -buildproject
  prjm -buildglobal


to build all your packages and ship them to the project pool or the global pool, respectively. Usually, this is not necessary, since released packages are shipped to project or global pools rather separate. It may be useful however if you want to populate a new package pool with a consistent set of released packages.

To remove all object files, libraries, and executables, that were derived from the sources in your project from your local workspace, issue the command

  prjm -clean


If you want to discard even the dependency information of your packages and some more files that might have been built locally, use

  prjm -realclean


This should leave everything in a `virgin state'.

Sometimes it will be necessary for you to make changes or bug fixes and test them in the context of your complete project. Prjm can handle this situation very elegantly, since it knows about the dependencies of your packages. One of the most useful commands is

  prjm [-nodep] -md -buildlocal


This rebuilds and ships all packages that are locally modified and those that depend on them. The switch -nodep suppresses the reconstruction of the dependency graph, assuming that a previous run of prjm left a valid graph behind and you did not change the import relation of your project.

If you want to integrate the changes other made into your workspace, you can use the following command to checkout all packages that have been modified elsewhere, and rebuild everything that depends on the changes:

  prjm [-nodep] -od -buildlocal


You can also instruct prjm to build only certain packages by designating them on the command line:

  prjm -buildlocal pkg_1 .. pkg_n


If prjm is used together with the ComPact Package Manager pkgm, it will be useful to not that the commands

  prjm -saveimports <snapshotname> <pkgs>*
  prjm -pkgovr <snapshotname> <pkgs>*
will create PkgOvr files in the root of all (or all explicitly named) packages with import directives corresponding to the given snapshot or release name. These files include a statement of the form
  import(pkg, version)
for every package dependency. Version is a ComPact version range denotation (allowing `x' for undefined elements) with three levels. How wide the range is is defined by the import relevance level, which can be set with the option -irl 0|1|2|3, and defaults to 2, which means that major and minor version number parts are relevant, but not patch levels.