NAME
Devel::Depend::Cl - Perl extension for extracting dependency trees from c files with 'cl' compiler
SYNOPSIS
use Devel::Depend::Cl;
my ($success, $includ_levels, $included_files) = Devel::Depend::Cl::Depend
(
undef
, '/usr/include/stdio.h'
, '' # switches to cpp
, 0 # include system includes
) ;
DESCRIPTION
Depend calls cl (as a c pre-processor) to extract all the included files. If the call succeds, Depend returns a list consiting of the following items:
This code is based on Devel::Depend::Cpp.
- [1] Success flag set to 1
- [2] A reference to a hash where the included files are sorted perl level. A file can appear simulteanously at different levels
- [3] A reference to a hash representing an include tree
If the call faills, Depend returns a list consiting of the following items:
Depend takes the following arguments:
- 1/ the name of the 'cl.exe' binary to use. undef to use the first 'cl.exe' in your path
- 2/ The name of the file to depend
- 3/ A string to be passed to b<cl>, ex: '-DDEBUG'
- 4/ A boolean indicating if the system include files should be included in the result (anything in $ENV{INCLUDE})
- 5/ a sub reference to be called everytime a node is added (see depender.pl in Devel::Depend::Cpp for an example)
- 6/ A boolean indicating if the output of cl should be dumped on screen
EXPORT
None .
DEPENDENCIES
cpp.
AUTHOR
Emil Jansson based on Devel::Depend::Cpp.
SEE ALSO
Devel::Depend::Cpp and PBS.