apv : ApVSys User Interface

      Copyright (C) 2002 Arnaud BERTRAND
      web-site: http://www.apvsys.org


NAME

apv - ApVSys User Interface


Purpose

It provides the user with all the information he needs to know which version will be executed and why. It also gives a lot of other functionalities as detailed in the options list. This is finally THE user interface for the apvsys database.

Two modes are foreseen: command mode for which the argument of the apv is a command and the tool mode (indicated by the switch -t or --tool) where a toolname is specified instead of a command. Most of the options are usable in both modes. Note: sometimes, a command has the same name as a tool (e.g. gcc). In this case, invoking the apv command with or without the --tool switch does not change anything.

The functionalities are classified like this:

-
The version information: available versions, chosen version, environment set for this version, related commands, real installation path,...

-
The configuration(toolspec) information: snapshot of all the tools/versions chosen in the current environment, toolspec expansion, collision checking.

-
Special executions: starting a specified version (bypassing the toolspec); loading the environment and starting a shell instead of the specified command/tool; starting documentation.

-
The db information: registered tools, tools/versions; starting the license check (as lmstat).


SYNOPSYS

apv [ -aeEhnrR ] command

apv [ -aeEhnrR ] --tool toolname

apv [ -T | -V | -W | -X ]

apv -x tool/version command

apv [ -l | -L ] [ -t tool | command ] [ part_of_feature ]

apv -s [ -t tool | command ] [ command to execute ]

apv -c

apv -p [ -t ] toolname|command


GENERAL OPTIONS

-h, --help
print the help message

-t, --tool
This is a general switch to inform apv to work at tool level instead of command level.


VERSION INFORMATION OPTIONS

This is certainly the most frequent usage of the apv command because it informs the user about the version started for a command/tool in function of his configuration (toolspec).

 e.g. apv g++
-a, --all:
gives all the versions available (registered for the current operating system). This option is usable at both: command and tool level.
 e.g. apv -a g++
      apv -a --tool gcc

-e, --environment
print the associated ap-environment.pl to the chosen version
 e.g. apv -e dc_shell
 e.g. apv -e --tool design_compiler

-E, --full-environment
print the associated ap-environment to each available versions (-a is assumed)
 e.g.   apv -E dc_shell
        apv -E -t design_compiler

-n, --noindent
This option can be used to avoid the indentation of the output for copy/paste facility

-r, --related-commands
lists all the related commands available(registered in apvsys) of the same tool.
 e.g.   apv -r g++
        apv -r -t gcc

-R, --full-related-commands
the same as -r but for all the existing versions of the tool/command (-a is assumed)

-v, --verbose
set the verbose mode(print the APVSYS_TOOLSPEC_FILES variable and the full path of the command).
 e.g. apv -v -a ncsim


CONFIGURATION(TOOLSPEC) INFORMATION OPTIONS

-c, --check-collision
check the collision between commands which are referenced by 2 different tools in the current tool-spec.

This situation can be dangerous when you specified a particular tool/version and you don't know that a command of this tool/version exists also for another tool/version that you also specified. In this case, the priority is given to the first version matching the toolspec but it can be the one you didn't expect! apv -c will inform you about this kind of conflict and about the version chosen.

-D, --dump
apv -D dumps all the registered tools and, for each one the version currently selected by the configuration Interesting to keep an history in a project, you can have an history of the versions used for each tool even if it was the default one.

-X, --expand-toolspec
This option is interesting to summarize the current status of your toolspec, apv -X will expand your current toolspec. Each file specified in your toolspec will be printed (in the order where they appear in your toolspec!) It is then easy to understand the decision rule.


SPECIAL EXECUTION OPTIONS

-l, --lmstat
set the environment and executes the command stored in the APVSYS_LICENSE_CMD variable. This variable can ONLY be defined in an ap-environment file. If this variable is not defined, it tries to detect if flexlm is used (by checkin a change in LM_LICENSE_FILE variable) and, in this case, ``lmstat -a'' is assumed.

An optional regexp feature can be given as last arguments. In this case, only the feature(s) matching with this argument (case insensitive) will be printed. By default, the format of flexlm is assumed as standard for feature line detection. This feature line detection can be overwritten by defining the environment variable ``APVSYS_LICENSE_FEATURE_LINE'' in the ap-environment file (or somewhere else). In this case, the tag __FEATURE__ can be used to indicate the place of the feature name.

IMPORTANT NOTE: the $HOME/.flexlmrc is ignore with this option. (see the -L otion).

example: apv -l -t ncsim apv -L vsim apv -l ncvhdl vhdl affirma or, setenv APVSYS_LICENSE_LINE ``^Feature: __FEATURE__ - '' apv -l -t Non_flexlmbased_tool


In the last example, the setenv command should be placed in the
ap-environment.pl of this tool. I was given to show the syntax
to use.

NOTE: if your tool is using flexlm and you want the feature exactly matching with a name, you can perform this request like that: apv -l synopsys `` test-atpg:'' (between quote, with a white space before and a colon after)

-L, --full-lmstat
Exactly identical to --lmstat except that the $HOME/.flexlmrc is not ignored

-d, --documentation
print or start the documentation associated with a tool/version
 e.g. apv -d dc_shell
      apv -d -t design_compiler

-s, --shell
With this option, apv will start a new shell (sh) after the environment of the specified tool/command has been loaded.
 e.g. apv -s dc_shell
      apv -s -t design_compiler
      apv -s g++

since version 1.12b, it is possible to execute something else than a shell. Ypu can add any command in argument.

 e.g. apv -s vsim perl -e 'echo $ENV{MODELSIM_ROOT}'
      apv -s g++ ddd
      apv -t modelsim tcsh -f

-x, --execute version
With this option, apv will execute a specific version of a command (Bypass the toolspec matching) the tool/version is directly specified as argument after the -x
 e.g. apv -x design_compiler/v2002.05 dc_shell
      apv -x gcc/v2.95.3 g++ foo.cc -o foo


DATABASE INFORMATION OPTIONS

-p, --path, --root
With this option, apv returns the root path of a tool/command this is useful for scripts which need the root directory of a tool.
 e.g. setenv CDS_ROOT `apv -p -t ncsim`

-T, --list-tools
apv -T prints all the registered tools

-V, --list-versions
apv -V prints all the registered tools/versions

-W, --versions-table
apv -W prints all the registered tools/versions in a table


SEE ALSO

apvsys-intro(1) ap-environment(1) apv-lib(1) apv-xcheck(1) apv-linktool(1) apv-regtool(1) apv-setdefault(1) apv-osmirror(1) apv-nativeoscheck(1) apv-dbcheck(1)