QEF home page
16. QVRS: The Lynchpin

In this section we look at qvrs facilities.


Table of Contents
Previous Page
Next Page

Introduction to qvrs

By this time we have seen many uses of the qvrs system to store variables used by the various tools of the QEF system. For example the root.vrs file indicates the root of a tree and stores the RootPath, Project name, Revision, TreeType, version system and build controls. The root.vrs file for the cook project is displayed in page 5. qvrs files also contain the specification of search paths for tools, #include files, and libraries, tool names and flags, version system controls, library mappings, user options, etc.

One of the most important qvrs features is that it is a separate program whose sole purpose is to process the configuration files and prepare data for other processes use. Any tool that requires qvrs settings either executes qvrs or reads a previously prepared qvrs output. Configuration information need not be passed via command line arguments or environment variables thereby ensuring consistent application of the tool no matter the invocation mechanism.

For this page we will look at the qvrs files that are used in the appl/cmd directory of the cook project.

% qd -46 /appl/cmd
The qvrs files
% qvrs -f  # produce list of qvrs files
/g/dt/cook/obj/root.vrs
/g/dt/cook/obj/conf.vrs
/p/cook/s3.4/appl/tree.vrs
/p/cook/s3.4/tree.vrs
/p/cook/s3.4/QefAdm/confvrs/prereq.vrs
/usr/qtree/lib/sysvrs/linux.vrs
/p/cook/s3.4/appl/cmd/qeffile
Note: The root.vrs and conf.vrs files are in the object tree, whereas the others are in the source tree or the Q-Tree.

The s3.4/appl/tree.vrs specifies settings that apply to the appl sub-tree, whereas the s3.4/tree.vrs applies to all the directories of the project.

The s3.4/appl/prereq.vrs file contains code to set variables naming the roots of other prerequisite projects. These settings are done using a mechanism that allows the specification of the prerequisites' release numbers or configuration names.

The /usr/qtree/lib/sysvrs/linux.vrs contains settings for the system such as special library mappings, tool names, and flags. This file will usually be applied to all projects on this platform.

The directory's qeffile contains qvrs settings up to the Begin line, as shown on page 6. It also usually contains the input to the specified script generator after the Begin line.

The order of processing is as shown, except that some of the files, such as tree.vrs, can suspend processing until after the sysvrs file is processed.

In addition to the above standard files, the user can create leaf.vrs and branch.vrs files in the object tree to override the normal settings as described in page 10. The leaf.vrs file applies to its containing directory only, whereas the branch.vrs files applies to its containing directory and its sub-tree.

qvrs facilities

The program qvrs provides the interface to the qvrs files.

% qvrs  # list all qvrs variables
AsSuffix        s
BeginLine       qsg -M
Branch  appl/cmd
BuildPath       /p/qtree/9.1/linux2_0i/bin /bin /usr/bin
CcInclDirs      gnupath/include /usr/include
CcLibDirs       gnupath /lib /usr/lib
ConfVrsFile     /p/cook/s3.4/confvrs/confdefl.vrs
ConfVrsPath     /p/cook/s3.4 /p/cook/s3.4/confvrs
CurDir  /p/cook/s3.4/appl/cmd
FSIC_Key        a
# rest of output suppressed

% qvrs 'The revision is @Revision!'
The revision is 3.4! # evaluates arguments as qvrs expression

% qvrs -XI  # produce cc -I flags
-I.. -I/p/cook/s3.4/appl -I/g/dt/cook/dest/hdrs

% qvrs @InclPath  # produce list of include directories
.. /p/cook/s3.4/appl /g/dt/cook/dest/hdrs

% qvrs -W InclPath  # Show where InclPath set
<internal> addpath InclPath
/p/cook/s3.4/tree.vrs:11: addpath InclPath /g/dt/cook/dest/hdrs
/p/cook/s3.4/tree.vrs:15: addpath InclPath /usr/cook/hdrs
/p/cook/s3.4/appl/tree.vrs:9: addpath InclPath ...

% qvrs -p  # output binary database
# programs needing qvrs variables reads qvrs -p output

% qvrs -B -p -LQefArgs= -o/tmp/qv_05067a.tmp
# builds the binary database for qef
# See The QEF Architecture

cook26.qh - 1.17 - 03/10/24 QEF home page Table of Contents Previous Page Next Page