mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
docs: fix example matching in extract.pl
When building with $srcdir != $builddir output would contain the builddir path. Strip the path when scanning the xml for the example markers.
This commit is contained in:
parent
898583b2a0
commit
caf006c03a
1 changed files with 8 additions and 4 deletions
|
@ -30,6 +30,10 @@ xml_decode ($)
|
||||||
# main
|
# main
|
||||||
my $output = shift @ARGV;
|
my $output = shift @ARGV;
|
||||||
|
|
||||||
|
# strip path parts
|
||||||
|
$output =~ m/.*\/(.*)$/;
|
||||||
|
my $outputname = $1;
|
||||||
|
|
||||||
$found = 0;
|
$found = 0;
|
||||||
%blocks = ();
|
%blocks = ();
|
||||||
|
|
||||||
|
@ -39,17 +43,17 @@ foreach $file (@ARGV)
|
||||||
|
|
||||||
while ($line = <FILE>)
|
while ($line = <FILE>)
|
||||||
{
|
{
|
||||||
if ($line =~ /<!-- example-begin $output (.*?)-->/)
|
if ($line =~ /<!-- example-begin $outputname (.*?)-->/)
|
||||||
{
|
{
|
||||||
$found = 1;
|
$found = 1;
|
||||||
$block_id = $1;
|
$block_id = $1;
|
||||||
$block = "\n/*** block $block_id from $file ***/\n";
|
$block = "\n/*** block $block_id from $file ***/\n";
|
||||||
|
|
||||||
print "Extracting $output block $block_id from $file\n";
|
print "Extracting $outputname block $block_id from $file\n";
|
||||||
|
|
||||||
while ($line = <FILE>)
|
while ($line = <FILE>)
|
||||||
{
|
{
|
||||||
if ($line =~ /<!-- example-end $output (.*?)-->/)
|
if ($line =~ /<!-- example-end $outputname (.*?)-->/)
|
||||||
{
|
{
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +67,7 @@ foreach $file (@ARGV)
|
||||||
|
|
||||||
if (!$found)
|
if (!$found)
|
||||||
{
|
{
|
||||||
print "Could not find $output example !\n";
|
print "Could not find $outputname example !\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue