mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
doc: texi2pod: add -I flag
This allows specifying additional directories to search for @include files. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
39f5a5462c
commit
b8b207e896
@ -36,7 +36,7 @@ $shift = "";
|
|||||||
%defs = ();
|
%defs = ();
|
||||||
$fnno = 1;
|
$fnno = 1;
|
||||||
$inf = "";
|
$inf = "";
|
||||||
$ibase = "";
|
@ibase = ();
|
||||||
|
|
||||||
while ($_ = shift) {
|
while ($_ = shift) {
|
||||||
if (/^-D(.*)$/) {
|
if (/^-D(.*)$/) {
|
||||||
@ -52,6 +52,8 @@ while ($_ = shift) {
|
|||||||
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
||||||
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
||||||
$defs{$flag} = $value;
|
$defs{$flag} = $value;
|
||||||
|
} elsif (/^-I(.*)$/) {
|
||||||
|
push @ibase, $1 ne "" ? $1 : shift;
|
||||||
} elsif (/^-/) {
|
} elsif (/^-/) {
|
||||||
usage();
|
usage();
|
||||||
} else {
|
} else {
|
||||||
@ -61,10 +63,12 @@ while ($_ = shift) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push @ibase, ".";
|
||||||
|
|
||||||
if (defined $in) {
|
if (defined $in) {
|
||||||
$inf = gensym();
|
$inf = gensym();
|
||||||
open($inf, "<$in") or die "opening \"$in\": $!\n";
|
open($inf, "<$in") or die "opening \"$in\": $!\n";
|
||||||
$ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
|
push @ibase, $1 if $in =~ m|^(.+)/[^/]+$|;
|
||||||
} else {
|
} else {
|
||||||
$inf = \*STDIN;
|
$inf = \*STDIN;
|
||||||
}
|
}
|
||||||
@ -74,7 +78,7 @@ if (defined $out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(defined $inf) {
|
while(defined $inf) {
|
||||||
while(<$inf>) {
|
INF: while(<$inf>) {
|
||||||
# Certain commands are discarded without further processing.
|
# Certain commands are discarded without further processing.
|
||||||
/^\@(?:
|
/^\@(?:
|
||||||
[a-z]+index # @*index: useful only in complete manual
|
[a-z]+index # @*index: useful only in complete manual
|
||||||
@ -104,11 +108,10 @@ while(<$inf>) {
|
|||||||
push @instack, $inf;
|
push @instack, $inf;
|
||||||
$inf = gensym();
|
$inf = gensym();
|
||||||
|
|
||||||
# Try cwd and $ibase.
|
for (@ibase) {
|
||||||
open($inf, "<" . $1)
|
open($inf, "<" . $_ . "/" . $1) and next INF;
|
||||||
or open($inf, "<" . $ibase . "/" . $1)
|
}
|
||||||
or die "cannot open $1 or $ibase/$1: $!\n";
|
die "cannot open $1: $!\n";
|
||||||
next;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user