NAME
Make::Cache::Obj - Caching of object and test run information
SYNOPSIS
my $oc = Make::Cache::Obj->new (...); $oc->parse_cmds; $oc->tgts_unlink; $oc->preproc; my $ochit = $oc->find_hit; if ($ochit) { $ochit->restore; } else { # Run command passed $oc->execute; $oc->encache; }
DESCRIPTION
Make::Cache::Obj is a superclass of Make::Cache. It provides support for executing a list of commands if the cache misses, and for determining the runtime of the commands that will execute.
Objects that represent specific compilers use this as a base class.
FUNCTIONS
- cc_running_lock ()
-
Set a non-reliable semaphore to indicate a compile is running.
- cc_running_unlock ()
-
Clear a non-reliable semaphore to indicate a compile is running.
- is_cc_running_read ()
-
Return true if a compile is running on any machine.
- compile_cmds
-
Return list of commands to run in the execute() phase.
- encache
-
Take the compile results and put them into the cache.
- execute
-
Run the compiler, perhaps on a remote machine.
- ok_include_regexps
-
Set the list of regexp references that are acceptable global includes.
- host
-
Return the name of a remote host to run the compilation on, or 0 for the local host. If the compile time is less then the min_remote_runtime variable, the compile will always be done locally. Else, the host is chosen randomly from elements in the remote_hosts list.
- included_file_check
-
Prevent users from including global files that are not the same on all machines, by warning about any includes with directories specified. Directories that are OK should be included in the list returned by ok_include_regexps.
- parse_cmds
-
Parses the local commands to extract target filenames and compiler switches.
- preproc
-
Executes a compiler run to create a temporary file containing all source to be hashed.
- preproc_cmds
-
Return list of commands to run in the preproc() phase.
- temp_filename
-
Return the name of a temporary file. With argument, set the name of a temporary file to be deleted in a END block or on errors.
- run (params...)
-
Execute a system command with the specified commands, timing how long it takes and detecting errors.
- run_stdout (filename, params...)
-
Run() with redirection of stdout to the first argument.
- runtime
-
Return a runtime object for the given targets.
- runtime_write
-
Write the runtime object to persistent storage. Called on completion of a compile.
DISTRIBUTION
The latest version is available from CPAN and from http://www.veripool.com/.
Copyright 2000-2004 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License or the Perl Artistic License.
AUTHORS
Wilson Snyder <wsnyder@wsnyder.org>
SEE ALSO
objcache, Make::Cache, Make::Cache::Runtime, Make::Cache::Gcc