Copyright (C) 2002 Arnaud BERTRAND
web-site: http://www.apvsys.org
apv-linktool
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
=head1 SYNOPSYS
apv-linktool -t toolname -v version [-r install-dir]
[ -b bindir1 [-b bindirn]] [ -l libdir1 [-l libdirn]]
[ -L username ]
Note: If the directory $APVSYS_ROOT/OsName/vOsVersion/toolname does not exist, this directory will be created.
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.
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");
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");
(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