next up previous contents
Next: 6.2.7.2 Directory scanning: Up: 6.2.7 Dir Previous: 6.2.7 Dir   Contents

6.2.7.1 Directory factoring:

The main purpose of the Dir tool (class dir) is to simplify CM descriptions that mention a large number of files all of which are located in in the same directory. For this style of usage, tool options have to be specified.

For example, writing


Group is
  long/directory/name : dir (a.sml b/c.sml d.sml)

is equivalent to the following verbose description:


Group is
  long/directory/name/a.sml
  long/directory/name/b/c.sml
  long/directory/name/d.sml

Since CM automatically classifies directory names as members of class dir, the example can be further simplified:


Group is
  long/directory/name (a.sml b/c.sml d.sml)

Options for class dir consist of a list of items, each item having one of two possible forms:

  1. The item can be a sub-option list of the form member:($m$ class:$c$ options:$o$) which emulates an ordinary member specification with class and options. The class- and options-fields may (independently of each other) be missing, but the order of fields that are present is fixed.
  2. The item can be a simple name (as shown in the example). Such a simple name $m$ is equivalent to the longer form member:($m$).

Members $m$ must always be specified using relative path names.

For example, the description


Group is
  alpha/a.sml (private)
  alpha/b.ml : sml (shared)
  alpha/c.cm
  beta/d.sml
  beta/e.sml

can be simplified as:


Group is
  alpha (member:(a.sml options:private)
         member:(b.ml class:sml options:shared)
         c.cm)
  beta (d.sml e.sml)


next up previous contents
Next: 6.2.7.2 Directory scanning: Up: 6.2.7 Dir Previous: 6.2.7 Dir   Contents
Matthias Blume
2001-07-19