From 9b4d9d8795b02688b7140b82d716b3885284efc1 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 19 Mar 2013 20:54:26 +0100 Subject: [PATCH] doc: enable compilation of -all tool pages In particular, add documentation configuration system, through the doc/config.texi file. Fix trac issue #2374. --- .gitignore | 1 + configure | 13 +++++++++++-- doc/Makefile | 24 ++++++++++++++++++------ doc/all-components.texi | 32 ++++++++++++++++++++++++++++++++ doc/ffmpeg.texi | 16 ++++++++++++++++ doc/ffplay.texi | 16 ++++++++++++++++ doc/ffprobe.texi | 16 ++++++++++++++++ doc/ffserver.texi | 20 ++++++++++++++++++-- 8 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 doc/all-components.texi diff --git a/.gitignore b/.gitignore index fd4ce20d30..f98c20c2d8 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/configure b/configure index edcec3c5a8..6dcb0c1f3b 100755 --- a/configure +++ b/configure @@ -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 <$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 \ diff --git a/doc/Makefile b/doc/Makefile index a8616551be..9189c7b20f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/doc/all-components.texi b/doc/all-components.texi new file mode 100644 index 0000000000..a0f113434d --- /dev/null +++ b/doc/all-components.texi @@ -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 diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 1eeca9a82a..eb981d7f54 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -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), diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 3c2ec5018e..21a6e6ce44 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -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), diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index b3448e62f5..aacee3ae5e 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -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), diff --git a/doc/ffserver.texi b/doc/ffserver.texi index f1b7599427..8844941fcc 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -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)