NAME
PBS::Digest -
SYNOPSIS
#within a Pbsfile
AddFileDependencies('/usr/bin/gcc') ;
AddEnvironmentDependencies('PROJECT') ;
AddSwitchDependencies('-D*', '-u*') ;
AddVariableDependencies('gcc_version' => GetGccVersion()) ;
AddNodeFileDependencies(qr/^.\/file_name$/, 'pbs.html') ;
DESCRIPTION
This module handle s all the digest functionality of PBS. It also make available, to the user, a set of functions that can be used in Pbsfiles to add information to the node digest generated by PBS
EXPORT
All the node specific functions take a regular expression (string or qr) as a first argument. only nodes matching that regex will be dependent on the rest of the arguments.
# make all the nodes dependent on the compiler
# including documentation, libraries, text files and whatnot
AddVariableDependencies(compiler => GetCompilerInfo()) ;
# c files only depend on the compiler
AddNodeVariableDependencies(qr/\.c$/, compiler => GetCompilerInfo()) ;
AddFileDependencies, AddNodeFileDependencies: this function is given a list of file names.
AddEnvironmentDependencies, AddNodeEnvironmentDependencies: takes a list of environnement variables.
AddVariableDependencies, AddNodeVariableDependency: takes a list of tuples (variable_name => value).
AddConfigVariableDependencies AddNodeConfigVariableDependencies: takes a list of tuples (variable_name). the variable's value is extracted from the node's config when generating the digest.
AddSwitchDependencies, AddNodeSwitchDependencies: handles command line switches -D and -u. AddNodeSwitchDependencies('node_which_uses_my_user_switch_regex' => '-u my_user_switch) ; AddSwitchDependencies('-D gcc'); # all node depend on the '-D gcc' switch. AddSwitchDependencies('-D*') ; # all nodes depend on all'-D' switches.
ExcludeFromDigestGeneration('rule_name', $regex): the nodes matching $regex will not have any digest attached. Digests are for nodes that PBS can build. Source files should not have any digest. 'rule_name' is displayed by PBS for your information. # extracted from the 'Rules/C' module ExcludeFromDigestGeneration( 'c_files' => qr/\.c$/) ; ExcludeFromDigestGeneration( 's_files' => qr/\.s$/) ; ExcludeFromDigestGeneration( 'h_files' => qr/\.h$/) ; ExcludeFromDigestGeneration( 'libs' => qr/\.a$/) ;
ForceDigestGeneration('rule_name', $regex): forces the generation of a digest for nodes matching the regex. This is usefull if you generate a node that has been excluded via ExcludeFromDigestGeneration.
AUTHOR
Khemir Nadim ibn Hamouda. nadim@khemir.net