scan_makefile - a Perl module to scan makefiles
use scan_makefile;
my $r_h= scan_makefile::cache_scan("mycache","Makefile");
This module scans one or more than one makefile and returns a hash reference containing all variables that are set within the makefile together with all environment variables.
In order to speed up the scanning of the makefile, the program also provides a function that creates and manages a cache-file that can be read more quickly than scanning the makefile again and again.
scan()
my $r_h= scan_makefile::scan(@makefiles);
This function scans a list of makefiles and returns a hash-reference containing all resolved settings of variables in the makefiles. Note that the all environment variables are part of that hash too.
cache_scan()
my $r_h= scan_makefile::cache_scan($cache_file,@makefiles);
This function is similar to scan()
but it uses or creates a cache file speeding up further calls of the same function. If the cache-file doesn't exist or if the cache-file is older than one of the makefiles, it is re-created. When the cache file exists and it is newer than all of the makefiles, it is read directly instead of scanning the makefiles again, speeding up the process.
Goetz Pfeiffer, Goetz.Pfeiffer@helmholtz-berlin.de
perl-documentation