3.2. Checking Projects

Having written a syntactically correct project description file, you can use it to check the integrity of your project (provided that all the required packages are are at the expected locations). Use one of

  prjm -check
  prjm -nodep -check


to get prjm to perform the check. The first form will try bo build the dependency graph of all packages of your project, while the second form will just locate each package and test its kind. prjm will output something like

The following packages are contained in your project:
  pkg_base                 at /home/wagner/work/m3libs/pkg_base
  prjbase                  at /home/wagner/work/m3libs/prjbase
  miscutils                at /home/wagner/work/m3libs/miscutils
  depgraph                 at /home/wagner/work/m3libs/depgraph
  m3tkutils                at /home/wagner/work/m3libs/m3tkutils
  prjm                     at /home/wagner/work/m3progs/prjm
  fileinfo                 at /home/wagner/work/m3libs/fileinfo
  pkg_config               at /home/wagner/work/m3libs/pkg_config
  pkg_vc                   at /home/wagner/work/m3libs/pkg_vc

The packages in your project are of the following kind:
  pkg_base                 is a DEC_SRC_M3 package
  prjbase                  is a DEC_SRC_M3 package
  miscutils                is a DEC_SRC_M3 package
  depgraph                 is a DEC_SRC_M3 package
  m3tkutils                is a DEC_SRC_M3 package
  prjm                     is a DEC_SRC_M3 package
  fileinfo                 is a DEC_SRC_M3 package
  pkg_config               is a DEC_SRC_M3 package
  pkg_vc                   is a DEC_SRC_M3 package

The following packages are imported but ignored:
  vbtkit
  regex
  tuple
  digraph
  parseparams
  libm3


The first list shows all the packages of your project and the location where prjm has found them. The second list shows the kind of every package of your project. ComPact knows only about a limited set of package kinds. DEC_SRC_M3 stands for the Modula-3 packages used by the Modula-3 system developed at Digital Equipment's System Research Center; COMPACT_CC is what you will most likely find listed for all your packages, since this is the standard ComPact C/C++ package kind. You can easily extend ComPacts knowledge about other package kinds by providing package descriptions in the resource PkgBase.DefaultData. Here are the kinds of packages that are currently known to ComPact as it is shipped:



The third list output by the -check command informs you of all packages that are used by packages of your project, but are not listed in your project description file. This may be completely correct, if all those packages are just global libraries that belong to the default development environment of your system; otherwise, there is always the possibility that you may have forgotten to declare some packages as being elements of your project.

The command

  prjm -showpackages


will only produce the first list, while

  prjm -showpackagekinds


will only output the second list produced by prjm -check.

If all the packages are found, ComPact knows about their kind, and was able to build a dependency graph, you can use one of the following commands to learn more about the dependencies of your project:

  prjm -dependencies pkg_1 .. pkg_n


lists all the packages that depend on packages pkg_1 to pkg_n.

  prjm -dependencies


lists all packages and their dependencies.

  prjm -updatesequence


lists the order by which the packages are processed. For those interested in mathematics, this is the result of a topological sort of the dependency graph, that is the import relation of all packages.

To be able to check if a previous built run has been successful, the following command has been introduced:

  prjm -builtokay