apv-linktool : ApVSys registration utility

      Copyright (C) 2002-2020 Arnaud BERTRAND
      web-site: http://apvsys.sourceforge.net

NAME

Purpose

This is a useful command when the application is installed outside ApVSys directory structure. ApVSys is based on a fixed directory structure: $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion/[bin lib man info]

The directory bin must contain all the binaries likely to be registered in the ApVSys environment. The directory lib must contain all the dynamic libraries likely to be used by the tool.

Some tools do not respect this structure but it does not mather because it can be artificially reconstructed with apv-linktool.

apv-linktool prepares a tool to be registered in the ApV System by creating the appropriated symbolic links inside the ApVSys directory structure

Here are the operations performs by apv-linktool:

1. Creation of the tool directories in the ApVSys hierarchy:

 > mkdirhier  $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion
 > mkdir  $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion/bin
 > mkdir  $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion/lib

2. Linking of the installation directory to the ApVSys hierarchy

 > cd  APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion
 > ln -s $TOOL_INSTALL_DIR/* .
 > ln -s $TOOL_INSTALL_DIR/.* .

3. Linking the binaries and the libraries in the ApVSys hierarchy:

 ( > cd  APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion)
 > ln -s $TOOL_INSTALL_DIR/bin/* bin
 > ln -s $TOOL_INSTALL_DIR/lib/* lib

4. Optionally, if other bin or lib directories are present in the tool hierarchy, these directories can be combined in with.

e.g.

 ( > cd  APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion )
 > ln -s $TOOL_INSTALL_DIR/sunos5/bin/* bin 
 > ln -s $TOOL_INSTALL_DIR/sunos5/lib/* lib 
 

SYNOPSYS

 apv-linktool -t toolname -v version [-r install-dir] 
       [ -b bindir1 [-b bindirn]] [ -l libdir1 [-l libdirn]]
       [ -L username ]

OPTIONS

-t, --tool toolname

specifies the tool (toolname for ApVSys environment) to register.

Note: If the directory $APVSYS_ROOT/OsName/vOsVersion/toolname does not exist, this directory will be created.

-v, --version versionname

specifies the version to register.

Note 1: the versionname MUST always begin with "v" (the letter "v")

Note 2: If the directory $APVSYS_ROOT/OsName/vOsVersion/toolname/versionname does not exist, this directory will be created. This direcotry will be the "root" of the version of the tool being linked.

Note 3: instead of "-t tool -v version", the syntax "-t tool/version" can also be used.

-r, --root installdir

Specifies the root of the tool installation directory. If this option is not specified, the current directory is taken by default. (this is usually the directory specified in the --prefix option in the configure scripts).

-b, --bindir

adds a bin directory to link in the root bin directory: By default, only the commands present in $TOOL_INSTALL_DIR/bin are linked in $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion/bin. If, as it is for some tools, there are other directories containing executable to register in the ApVSys environment, these directories can be added with this -b option. This option can appear several times to add several directories

WARNING: In this case, it will be often necessary to modify the PATH variable in the ap-environment file to be sure of the behaviour of the tool. e.g.:

 > apv-linktool -r /ap/cadence/ncsim_3.4 -t ncsim/v3.4 -b tools.sun4v/bin -L arn

The ap-environment.pl should contain:

 &prepend_env("PATH", "$ENV{TOOLPATH}/$ENV{CHOSENTOOL}/tools.sun4v/bin");
-l, --libdir

adds a lib directory to link in the root lib directory. Exactly as the bin directories, by default, only the shared libraries present in $TOOL_INSTALL_DIR/lib are linked in $APVSYS_ROOT/OsName/vOsVersion/ToolName/vToolVersion/lib. If, as it is for some tools, there are other directories containing shared libraries to register in the ApVSys environment, these directories can be added with this -l option. This option can appear several times to add several directories

WARNING: In this case, it will be often necessary to modify the LD_LIBRARY_PATH variable in the ap-environment file to be sure of the behaviour of the tool. e.g.:

 > apv-linktool -r /ap/cadence/ncsim_3.4 -t ncsim/v3.4 -b tools.sun4v/bin -l tools.sun4v/lib -L arn

The ap-environment.pl should contain:

 &prepend_env("LD_LIBRARY_PATH", "$ENV{TOOLPATH}/$ENV{CHOSENTOOL}/tools.sun4v/lib");
Note:

libdir and bindir can be specified as relative path ( relative to root install directory ) as well as absolute path BUT in, in this case, the absolute path MUST (of course) be in the install_dir hierarchy.

-L, --login username

This option is mandatory (for logging purpose) to keep log of who linked what.

-h, --help

print a short help message

EXAMPLES

 (the current directory is /ap/gcc_2,95.3 )
> apv-linktool -t gcc -v 2.95.3 -L arn

or

> apv-linktool -r /ap/gcc_2,95.3 -t gcc -v 2.95.3 -L arn

> apv-linktool -t ncsim -v 3.3s10 -r /ap/cds/ncsim_3.3s10 -b /ap/cds/ncsim_3.3s10/tools.sun4/bin -l /ap/cds/ncsim_3.3s10/tools.sun4/lib -L arn

SEE ALSO

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