Merge commit 'ab81f24ad43bddf77ddd25cba86780c1c884996c'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Nov 2013 00:31:00 +0000 (01:31 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Nov 2013 00:31:00 +0000 (01:31 +0100)
* commit 'ab81f24ad43bddf77ddd25cba86780c1c884996c':
  build: Integrate multilibrary examples into the build system

Conflicts:
configure
doc/Makefile
doc/examples/muxing.c
doc/examples/output.c
libavformat/Makefile
libavformat/output-example.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
Makefile
configure
doc/Makefile

diff --cc Makefile
+++ b/Makefile
@@@ -93,12 -130,14 +93,14 @@@ ende
  
  $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
  
+ include $(SRC_PATH)/doc/Makefile
  define DOPROG
  OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
 -$(1)$(EXESUF): $$(OBJS-$(1))
 +$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
  $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
 -$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
 -$(1)$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
 +$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
 +$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
  -include $$(OBJS-$(1):.o=.d)
  endef
  
@@@ -161,14 -198,13 +163,13 @@@ clean:
  
  distclean::
        $(RM) $(DISTCLEANSUFFIXES)
 -      $(RM) config.* .config libavutil/avconfig.h .version version.h
 +      $(RM) config.* .config libavutil/avconfig.h .version version.h libavcodec/codec_names.h
  
  config:
 -      $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION)
 +      $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
  
 -check: all alltools checkheaders examples testprogs fate
 +check: all alltools examples testprogs fate
  
- include $(SRC_PATH)/doc/Makefile
  include $(SRC_PATH)/tests/Makefile
  
  $(sort $(OBJDIRS)):
diff --cc configure
+++ b/configure
@@@ -1164,6 -1041,10 +1164,10 @@@ COMPONENT_LIST=
      protocols
  "
  
 -    output_example
+ EXAMPLE_LIST="
++    muxing_example
+ "
  EXTERNAL_LIBRARY_LIST="
      avisynth
      bzlib
@@@ -1263,7 -1106,7 +1267,8 @@@ PROGRAM_LIST=
  
  CONFIG_LIST="
      $COMPONENT_LIST
 +    $DOCUMENT_LIST
+     $EXAMPLE_LIST
      $EXTERNAL_LIBRARY_LIST
      $HWACCEL_LIST
      $LIBRARY_LIST
@@@ -2205,70 -1933,25 +2210,73 @@@ unix_protocol_deps="sys_un_h
  unix_protocol_select="network"
  
  # filters
 +aconvert_filter_deps="swresample"
 +amovie_filter_deps="avcodec avformat"
 +aresample_filter_deps="swresample"
 +ass_filter_deps="libass"
 +asyncts_filter_deps="avresample"
 +atempo_filter_deps="avcodec"
 +atempo_filter_select="rdft"
 +azmq_filter_deps="libzmq"
  blackframe_filter_deps="gpl"
  boxblur_filter_deps="gpl"
 +colormatrix_filter_deps="gpl"
  cropdetect_filter_deps="gpl"
 +dctdnoiz_filter_deps="avcodec"
 +dctdnoiz_filter_select="fft"
  delogo_filter_deps="gpl"
 +deshake_filter_deps="avcodec"
 +deshake_filter_select="dsputil"
  drawtext_filter_deps="libfreetype"
 -frei0r_filter_deps="frei0r dlopen strtok_r"
 +ebur128_filter_deps="gpl"
 +flite_filter_deps="libflite"
 +frei0r_filter_deps="frei0r dlopen"
  frei0r_filter_extralibs='$ldl'
 -frei0r_src_filter_deps="frei0r dlopen strtok_r"
 +frei0r_src_filter_deps="frei0r dlopen"
  frei0r_src_filter_extralibs='$ldl'
 +geq_filter_deps="gpl"
 +histeq_filter_deps="gpl"
  hqdn3d_filter_deps="gpl"
  interlace_filter_deps="gpl"
 +kerndeint_filter_deps="gpl"
 +ladspa_filter_deps="ladspa dlopen"
 +mcdeint_filter_deps="avcodec gpl"
 +movie_filter_deps="avcodec avformat"
 +mp_filter_deps="gpl avcodec swscale inline_asm"
 +mpdecimate_filter_deps="gpl avcodec"
 +mptestsrc_filter_deps="gpl"
 +negate_filter_deps="lut_filter"
 +perspective_filter_deps="gpl"
  resample_filter_deps="avresample"
  ocv_filter_deps="libopencv"
 +owdenoise_filter_deps="gpl"
 +pan_filter_deps="swresample"
 +phase_filter_deps="gpl"
 +pp_filter_deps="gpl postproc"
 +pullup_filter_deps="gpl"
 +removelogo_filter_deps="avcodec avformat swscale"
 +sab_filter_deps="gpl swscale"
  scale_filter_deps="swscale"
 +smartblur_filter_deps="gpl swscale"
 +showspectrum_filter_deps="avcodec"
 +showspectrum_filter_select="rdft"
 +spp_filter_deps="gpl avcodec"
 +spp_filter_select="fft"
 +stereo3d_filter_deps="gpl"
 +subtitles_filter_deps="avformat avcodec libass"
 +super2xsai_filter_deps="gpl"
 +tinterlace_filter_deps="gpl"
 +vidstabdetect_filter_deps="libvidstab"
 +vidstabtransform_filter_deps="libvidstab"
  yadif_filter_deps="gpl"
 +pixfmts_super2xsai_test_deps="super2xsai_filter"
 +tinterlace_merge_test_deps="tinterlace_filter"
 +tinterlace_pad_test_deps="tinterlace_filter"
 +zmq_filter_deps="libzmq"
  
 -output_example_deps="avcodec avformat avutil swscale"
+ # examples
++muxing_example_deps="avcodec avformat avutil swscale"
  # libraries
  avcodec_deps="avutil"
  avdevice_deps="avutil avcodec avformat"
@@@ -2337,10 -2010,7 +2345,11 @@@ target_os_default=$(tolower $(uname -s)
  host_os=$target_os_default
  
  # configurable options
 -enable $EXAMPLE_LIST $LIBRARY_LIST $PROGRAM_LIST
 +enable $PROGRAM_LIST
 +enable $DOCUMENT_LIST
++enable $EXAMPLE_LIST
 +enable $(filter_out avresample $LIBRARY_LIST)
 +enable stripping
  
  enable asm
  enable debug
diff --cc doc/Makefile
@@@ -27,28 -10,26 +27,37 @@@ HTMLPAGES   = $(AVPROGS-yes:%=doc/%.htm
                doc/nut.html                                              \
                doc/platform.html                                         \
  
 -DOCS-$(CONFIG_PERL)                             += $(MANPAGES) $(PODPAGES)
 -DOCS-$(CONFIG_TEXI2HTML)                        += $(HTMLPAGES)
 +TXTPAGES    = doc/fate.txt                                              \
 +
 +
 +DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
 +DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
 +DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
 +DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
  DOCS = $(DOCS-yes)
  
 -DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE)           += output
 -ALL_DOC_EXAMPLES = output
++DOC_EXAMPLES-$(CONFIG_MUXING_EXAMPLE)           += muxing
++ALL_DOC_EXAMPLES = muxing
+ DOC_EXAMPLES     := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
+ ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF))
+ PROGS            += $(DOC_EXAMPLES)
 -all: $(DOCS)
 +all-$(CONFIG_DOC): doc
 +
 +doc: documentation
  
  apidoc: doc/doxy/html
  documentation: $(DOCS)
  
 -TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
+ examples: $(DOC_EXAMPLES)
 +TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
 +
 +doc/%.txt: TAG = TXT
 +doc/%.txt: doc/%.texi
 +      $(Q)$(TEXIDEP)
 +      $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
  
  GENTEXI  = format codec
  GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
@@@ -70,20 -46,15 +79,22 @@@ doc/%-all.html: doc/%.texi $(SRC_PATH)/
  doc/%.pod: TAG = POD
  doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
        $(Q)$(TEXIDEP)
 -      $(M)$(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: TAG = MAN
 +doc/%.1 doc/%.3: TAG = MAN
  doc/%.1: doc/%.pod $(GENTEXI)
        $(M)pod2man --section=1 --center=" " --release=" " $< > $@
 +doc/%.3: doc/%.pod $(GENTEXI)
 +      $(M)pod2man --section=3 --center=" " --release=" " $< > $@
  
  $(DOCS) doc/doxy/html: | doc/
+ $(DOC_EXAMPLES:%=%.o): | doc/examples
+ OBJDIRS += doc/examples
  
  doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
        $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
@@@ -120,16 -76,12 +131,18 @@@ uninstall-html
        $(RM) -r "$(DOCDIR)"
  
  uninstall-man:
 -      $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
 +      $(RM) $(addprefix "$(MANDIR)/man1/",$(AVPROGS-yes:%=%.1) $(AVPROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
 +      $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
 +
 +clean:: docclean
 +
 +distclean:: docclean
 +      $(RM) doc/config.texi
  
 -clean::
 +docclean:
-       $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
+       $(RM) $(ALL_DOC_EXAMPLES)
+       $(RM) $(CLEANSUFFIXES:%=doc/%) $(CLEANSUFFIXES:%=doc/examples/%)
 -      $(RM) doc/*.html doc/*.pod doc/*.1 doc/avoptions_*.texi
++      $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 doc/avoptions_*.texi
        $(RM) -r doc/doxy/html
  
  -include $(wildcard $(DOCS:%=%.d))