aboutsummaryrefslogtreecommitdiff
path: root/tests/symbol-scan.pl
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-25 21:05:20 +0100
committerYang Tse <yangsita@gmail.com>2010-11-25 21:05:20 +0100
commitef24ecde68a5f577a7f0f423a767620f09a0ab16 (patch)
tree7ccc9ef2db7d579184f565fff94f989f47b62a80 /tests/symbol-scan.pl
parente8bc33d0a33afdcfcbd07c76432c47522d6ddb7e (diff)
symbol-scan: use configure script knowledge about how to run the C preprocessor
Diffstat (limited to 'tests/symbol-scan.pl')
-rw-r--r--tests/symbol-scan.pl21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl
index dea1f73b8..cda9b7383 100644
--- a/tests/symbol-scan.pl
+++ b/tests/symbol-scan.pl
@@ -21,16 +21,25 @@
#
###########################################################################
#
-# This script grew out of help from Przemysław Iskra and Bálint Szilakszi
+# This script grew out of help from Przemyslaw Iskra and Balint Szilakszi
# a late evening in the #curl IRC channel on freenode.
#
+use strict;
+use warnings;
+
+#
+# configurehelp perl module is generated by configure script
+#
+use configurehelp qw(
+ $Cpreprocessor
+ );
+
# we may get the dir root pointed out
my $root=$ARGV[0] || ".";
# need an include directory when building out-of-tree
-my $i=$ARGV[1];
-$i="-I$i " if $i;
+my $i = ($ARGV[1]) ? "-I$ARGV[1] " : '';
my $h = "$root/include/curl/curl.h";
my $mh = "$root/include/curl/multi.h";
@@ -39,7 +48,11 @@ my $verbose=0;
my $summary=0;
my $misses=0;
-open H_IN, "-|", "cpp $i$h" || die "Cannot preprocess curl.h";
+my @syms;
+my %doc;
+my %rem;
+
+open H_IN, "-|", "$Cpreprocessor $i$h" || die "Cannot preprocess curl.h";
while ( <H_IN> ) {
if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
s/^\s+//;