diff options
Diffstat (limited to 'lib/Automake/Parser/parser.pl')
-rw-r--r-- | lib/Automake/Parser/parser.pl | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/Automake/Parser/parser.pl b/lib/Automake/Parser/parser.pl index d631a9a66..b2384fab9 100644 --- a/lib/Automake/Parser/parser.pl +++ b/lib/Automake/Parser/parser.pl @@ -1,13 +1,27 @@ #!/usr/bin/perl + +BEGIN +{ + # Adds the directory containing modules which are copied during + # make install + unshift (@INC, '/tmp/parser'); +} + use strict; use Lexer; use Tree; use ParserTable; +use File::Basename; + +# Stores the relative path of the Makefile.am file with respect to +# current working directory +my $basedir = File::Basename::dirname($ARGV[0]); -#To enable debug mode, use 1 +# To enable debug mode, use 1 . Prints the parser stack at each +# iteration my $debug = 0; -#Stores the list of tokens generated by lexer. +# Stores the list of tokens generated by lexer. my @tokens; my @stack = (0); @@ -22,7 +36,7 @@ while ( @stack ) { print STDERR "Complete\n"; printgraph( $stack[-4] ); - recursesubdirs( $stack[-4] ); + recursesubdirs( $basedir, $stack[-4] ); last; } while( !@tokens ) |