next up previous contents
Next: Defining New Rules Up: 4 Rule Definitions Previous: 4.2.5 Command Line Definition

4.3 Conditional Forms

  Conditional expressions can be used in almost any place to distinguish different configuration and platforms. An example is the use of shell scripts, which are totally different for UNIX and VMS.

  figure2355
Abbildung 4.3: Conditionally installation of scripts

The conditional form requires a list-parameter containing the key word cond. The remaining list after cond is the conditional expression. In the example in Figure 4.3, only the operating system type is checked. The following special constructs are also allowed in conditional expressions:
spaceitem2364
To get a t output value, the compare operation must be t or the simple conditional value in the form is matched with

  1. the operating system type,
  2. the operating system name,
  3. the configuration name,
  4. the project flags,
  5. the values of the configuration system defines,
  6. the values of the project defines,
  7. the supported compiler of the configuration,
  8. a defined system symbolicName for special libraries.
If all cases fail, false is returned and all values within the list forming the conditional expression are ignored. A more complex example using the :and operator in a conditional form is shown in Figure 4.4.

  figure2379
Abbildung 4.4: Example of complex conditional form

A non optimized and debug compilation is enforced for an operating system named ``HP/UX'' with a major version number lower than nine. In all other case this compilation flag override is ignored and the default flags are used.



IUE WWW server
Fri Jan 3 17:00:13 MET 1997