diff --git a/tests/data/test1119 b/tests/data/test1119 index 52b7e5893fcf47ba9c34cfce4cf75ce8fdc3a6de..4b5a9ec732be18ae1e2a509befe5c0096cc96f8b 100644 --- a/tests/data/test1119 +++ b/tests/data/test1119 @@ -17,7 +17,7 @@ Verify that symbols-in-versions and headers are in sync -%SRCDIR/symbol-scan.pl %SRCDIR/.. +%SRCDIR/symbol-scan.pl %SRCDIR/.. ../include/curl diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl index f12660339b614fa93266c30cfe29e6c0d53ae109..dea1f73b844bcd674b290cc15cfff7e42857bac9 100644 --- a/tests/symbol-scan.pl +++ b/tests/symbol-scan.pl @@ -28,6 +28,10 @@ # 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 $h = "$root/include/curl/curl.h"; my $mh = "$root/include/curl/multi.h"; @@ -35,7 +39,7 @@ my $verbose=0; my $summary=0; my $misses=0; -open H_IN, "-|", "cpp " . $h; +open H_IN, "-|", "cpp $i$h" || die "Cannot preprocess curl.h"; while ( ) { if ( /enum\s+(\S+\s+)?{/ .. /}/ ) { s/^\s+//; @@ -45,7 +49,8 @@ while ( ) { push @syms, $_; } } -close H_IN; +close H_IN || die "Error preprocessing curl.h"; + sub scanheader { my ($f)=@_; open H, "<$f";