BASIS  version 1.2.3 (revision 2104)
Functions
executabletargetinfo.sh File Reference

Provides information about the executables built by BASIS. More...

#include "${_EXECUTABLETARGETINFO_DIR}/core.sh"
+ Include dependency graph for executabletargetinfo.sh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

function _executabletargetinfo_add (in key, in name, in value)
 Add (key, value) pair to executable target info "hash".
function _executabletargetinfo_get (in value, in key, in name)
 Get value from executable target info "hash".
function _executabletargetinfo_initialize ()
 Initialize executable target information.
function _executabletargetinfo_sanitize (in out, in str)
 Sanitize string for use in variable name.
function _executabletargetinfo_to_absolute_path (in simplified, in path, in base)
 Make relative path absolute.
function get_executable_directory (in dir, in target)
 Get directory of executable file.
function get_executable_name (in name, in target)
 Get name of executable file.
function get_executable_path (in path, in target)
 Get absolute path of executable file.
function get_target_uid (in uid, in target)
 Get UID of build target.
function is_known_target (in target)
 Determine whether a given target is known.

Detailed Description

Provides information about the executables built by BASIS.

Note:
The executabletargetinfo.sh module is automatically created by BASIS from the template file executabletargetinfo.sh.in which is part of the BASIS installation.

Copyright (c) 2011 University of Pennsylvania. All rights reserved.
See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.

Contact: SBIA Group <sbia-software at uphs.upenn.edu>

Definition in file executabletargetinfo.sh.


Function Documentation

function _executabletargetinfo_add ( in  key,
in  name,
in  value 
)

Add (key, value) pair to executable target info "hash".

See also:
_executabletargetinfo_get()
Parameters:
[in]keyHash key.
[in]nameName of the hash table.
[in]valueValue associated with the given hash key.
Returns:
Sets a readonly variable that represents the (key, value) entry.
function _executabletargetinfo_get ( in  value,
in  key,
in  name 
)

Get value from executable target info "hash".

See also:
_executabletargetinfo_add()
Parameters:
[out]valueValue corresponding to given key or an empty string if key is unknown.
[in]keyHash key.
[in]nameName of the hash table.
Returns:
Nothing.
Return values:
0On success.
1On failure.
function _executabletargetinfo_initialize ( )

Initialize executable target information.

This function initializes the structures of information about the executable build targets. If this function is executed another time, it does nothing because the structures are initialized already. In order to reduce the start time of applications that do not make use of this module, the initialization is only performed on demand.

The initialization is done in get_target_uid() as this function is always called first before any lookup of information.

Returns:
Nothing.
Return values:
0On success.
1On failure.
function _executabletargetinfo_sanitize ( in  out,
in  str 
)

Sanitize string for use in variable name.

Parameters:
[out]outSanitized string.
[in]strString to be sanitized.
Returns:
Nothing.
Return values:
0On success.
1On failure.
function _executabletargetinfo_to_absolute_path ( in  simplified,
in  path,
in  base 
)

Make relative path absolute.

Attention:
The directory component of the path must be an existent directory.
Todo:
Implement this function without the use of cd such that non-existent paths can be simplified as well.
Parameters:
[out]simplifiedSimplified path.
[in]pathAbsolute or relative path.
[in]baseBase path used for relative paths.
Returns:
Nothing.
Return values:
0On success.
1On failure.