diff options
author | Tim Jenness <tjenness@cpan.org> | 2001-09-15 03:41:28 -1000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-15 23:07:19 +0000 |
commit | 869be49753bc37797fb9d87cc1db266b0703c28f (patch) | |
tree | 187bedbde223bd0b1b1b634c989f386a955413c7 /utils/h2xs.PL | |
parent | 6f16a2925ba2d4bd6be3fd2cf8f1616d2c88f4bb (diff) | |
download | perl-869be49753bc37797fb9d87cc1db266b0703c28f.tar.gz |
h2xs.PL with C::Scan
Message-ID: <Pine.LNX.4.33.0109151338560.3075-100000@lapaki>
p4raw-id: //depot/perl@12033
Diffstat (limited to 'utils/h2xs.PL')
-rw-r--r-- | utils/h2xs.PL | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 0a065ecce8..4e5319bad1 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -740,7 +740,8 @@ if( @path_h ){ } } - +# Save current directory so that C::Scan can use it +my $cwd = File::Spec->rel2abs( File::Spec->curdir ); my ($ext, $nested, @modparts, $modfname, $modpname); @@ -811,7 +812,7 @@ if( ! $opt_X ){ # use XS, unless it was disabled my @styles = $Config{gccversion} ? qw(C++ C9X GNU) : qw(C++ C9X); $c = new C::Scan 'filename' => $filename, 'filename_filter' => $filter, 'add_cppflags' => $addflags, 'c_styles' => \@styles; - $c->set('includeDirs' => ["$Config::Config{archlib}/CORE"]); + $c->set('includeDirs' => ["$Config::Config{archlib}/CORE", $cwd]); push @$fdecls_parsed, @{ $c->get('parsed_fdecls') }; push(@$fdecls, @{$c->get('fdecls')}); @@ -870,7 +871,8 @@ if( ! $opt_X ){ # use XS, unless it was disabled } @fnames_no_prefix = @fnames; @fnames_no_prefix - = sort map { ++$prefix{$_} if s/^$opt_p(?!\d)//; $_ } @fnames_no_prefix; + = sort map { ++$prefix{$_} if s/^$opt_p(?!\d)//; $_ } @fnames_no_prefix + if defined $opt_p; # Remove macros which expand to typedefs print "Typedefs are @td.\n" if $opt_d; my %td = map {($_, $_)} @td; |