1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

doc: enable compilation of -all tool pages

In particular, add documentation configuration system, through the
doc/config.texi file.

Fix trac issue #2374.
This commit is contained in:
Stefano Sabatini 2013-03-19 20:54:26 +01:00
parent 702e743827
commit 9b4d9d8795
8 changed files with 128 additions and 10 deletions

1
.gitignore vendored
View File

@ -29,6 +29,7 @@
/doc/*.3
/doc/*.html
/doc/*.pod
/doc/config.texi
/doc/avoptions_codec.texi
/doc/avoptions_format.texi
/doc/examples/decoding_encoding

13
configure vendored
View File

@ -658,6 +658,12 @@ print_config(){
} else if (file ~ /\\.mak\$/) {
n = -v ? \"\" : \"!\";
printf(\"%s%s=yes\\n\", n, c) >>file;
} else if (file ~ /\\.texi\$/) {
pre = -v ? \"\" : \"@c \";
yesno = \$2;
c2 = tolower(c);
gsub(/_/, \"-\", c2);
printf(\"%s@set %s %s\\n\", pre, c2, yesno) >>file;
}
}
}"
@ -4406,13 +4412,13 @@ fi
echo "License: $license"
echo "Creating config.mak and config.h..."
echo "Creating config.mak, config.h, and doc/config.texi..."
test -e Makefile || $ln_s "$source_path/Makefile" .
enabled stripping || strip="echo skipping strip"
config_files="$TMPH config.mak"
config_files="$TMPH config.mak doc/config.texi"
cat > config.mak <<EOF
# Automatically generated by configure - do not modify!
@ -4564,6 +4570,9 @@ if enabled yasm; then
printf '' >$TMPASM
fi
mkdir -p doc
echo "@c auto-generated by configure" > doc/config.texi
print_config ARCH_ "$config_files" $ARCH_LIST
print_config HAVE_ "$config_files" $HAVE_LIST
print_config CONFIG_ "$config_files" $CONFIG_LIST \

View File

@ -6,7 +6,6 @@ LIBRARIES-$(CONFIG_AVFORMAT) += libavformat
LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice
LIBRARIES-$(CONFIG_AVFILTER) += libavfilter
COMPONENTS-yes = $(PROGS-yes)
COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils
COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler
COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
@ -15,9 +14,9 @@ COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols
COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
MANPAGES = $(COMPONENTS-yes:%=doc/%.1) $(LIBRARIES-yes:%=doc/%.3)
PODPAGES = $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
HTMLPAGES = $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
MANPAGES = $(PROGS-yes:%=doc/%.1) $(PROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1) $(LIBRARIES-yes:%=doc/%.3)
PODPAGES = $(PROGS-yes:%=doc/%.pod) $(PROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
HTMLPAGES = $(PROGS-yes:%=doc/%.html) $(PROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
doc/developer.html \
doc/faq.html \
doc/fate.html \
@ -59,12 +58,22 @@ $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
doc/%.html: TAG = HTML
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
$(Q)$(TEXIDEP)
$(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
$(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
doc/%-all.html: TAG = HTML
doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
$(Q)$(TEXIDEP)
$(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
doc/%.pod: TAG = POD
doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
$(Q)$(TEXIDEP)
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
doc/%-all.pod: TAG = POD
doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
$(Q)$(TEXIDEP)
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
doc/%.1 doc/%.3: TAG = MAN
doc/%.1: doc/%.pod $(GENTEXI)
@ -94,6 +103,9 @@ uninstall-man:
clean:: docclean
distclean:: docclean
$(RM) doc/config.texi
docclean:
$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
$(RM) -r doc/doxy/html

32
doc/all-components.texi Normal file
View File

@ -0,0 +1,32 @@
@include config.texi
@ifset config-avutil
@include syntax.texi
@include eval.texi
@end ifset
@ifset config-avcodec
@include codecs.texi
@include bitstream_filters.texi
@end ifset
@ifset config-avformat
@include formats.texi
@include protocols.texi
@end ifset
@ifset config-avdevice
@include devices.texi
@end ifset
@ifset config-swresample
@include resampler.texi
@end ifset
@ifset config-swscale
@include scaler.texi
@end ifset
@ifset config-avfilter
@include filters.texi
@end ifset

View File

@ -1362,9 +1362,19 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
@end itemize
@c man end EXAMPLES
@ifset config-all
@include all-components.texi
@end ifset
@chapter See Also
@ifhtml
@ifset config-all
@url{ffmpeg.html,ffmpeg}
@end ifset
@ifset config-not-all
@url{ffmpeg-all.html,ffmpeg-all},
@end ifset
@url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
@url{ffmpeg-utils.html,ffmpeg-utils},
@url{ffmpeg-scaler.html,ffmpeg-scaler},
@ -1378,6 +1388,12 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
@end ifhtml
@ifnothtml
@ifset config-all
ffmpeg(1),
@end ifset
@ifset config-not-all
ffmpeg-all(1),
@end ifset
ffplay(1), ffprobe(1), ffserver(1),
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),

View File

@ -201,9 +201,19 @@ Seek to percentage in file corresponding to fraction of width.
@c man end
@ifset config-all
@include all-components.texi
@end ifset
@chapter See Also
@ifhtml
@ifset config-all
@url{ffplay.html,ffplay},
@end ifset
@ifset config-not-all
@url{ffplay-all.html,ffmpeg-all},
@end ifset
@url{ffmpeg.html,ffmpeg}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
@url{ffmpeg-utils.html,ffmpeg-utils},
@url{ffmpeg-scaler.html,ffmpeg-scaler},
@ -217,6 +227,12 @@ Seek to percentage in file corresponding to fraction of width.
@end ifhtml
@ifnothtml
@ifset config-all
ffplay(1),
@end ifset
@ifset config-not-all
ffplay-all(1),
@end ifset
ffmpeg(1), ffprobe(1), ffserver(1),
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),

View File

@ -487,9 +487,19 @@ DV, GXF and AVI timecodes are available in format metadata
@end itemize
@c man end TIMECODE
@ifset config-all
@include all-components.texi
@end ifset
@chapter See Also
@ifhtml
@ifset config-all
@url{ffprobe.html,ffprobe},
@end ifset
@ifset config-not-all
@url{ffprobe-all.html,ffprobe-all},
@end ifset
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffserver.html,ffserver},
@url{ffmpeg-utils.html,ffmpeg-utils},
@url{ffmpeg-scaler.html,ffmpeg-scaler},
@ -503,6 +513,12 @@ DV, GXF and AVI timecodes are available in format metadata
@end ifhtml
@ifnothtml
@ifset config-all
ffprobe(1),
@end ifset
@ifset config-not-all
ffprobe-all(1),
@end ifset
ffmpeg(1), ffplay(1), ffserver(1),
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),

View File

@ -246,10 +246,20 @@ messages to stdout.
@end table
@c man end
@ifset config-all
@include all-components.texi
@end ifset
@chapter See Also
@ifhtml
The @file{doc/ffserver.conf} example,
@ifset config-all
@url{ffserver.html,ffserver},
@end ifset
@ifset config-not-all
@url{ffserver-all.html,ffserver-all},
@end ifset
the @file{doc/ffserver.conf} example,
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe},
@url{ffmpeg-utils.html,ffmpeg-utils},
@url{ffmpeg-scaler.html,ffmpeg-scaler},
@ -263,7 +273,13 @@ The @file{doc/ffserver.conf} example,
@end ifhtml
@ifnothtml
The @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
@ifset config-all
ffserver(1),
@end ifset
@ifset config-not-all
ffserver-all(1),
@end ifset
the @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)