[FFmpeg-cvslog] build: move documentation rules to doc/Makefile

Mans Rullgard git at videolan.org
Thu Jun 23 05:11:57 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Jun  6 18:03:22 2011 +0100| [f87b03b50d0b4632f95da5b5d6772ec8f2a7f16f] | committer: Mans Rullgard

build: move documentation rules to doc/Makefile

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f87b03b50d0b4632f95da5b5d6772ec8f2a7f16f
---

 Makefile     |   41 +++--------------------------------------
 configure    |    1 +
 doc/Makefile |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 38 deletions(-)

diff --git a/Makefile b/Makefile
index 47d0429..f4d03d4 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,6 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
 
 PROGS      := $(PROGS-yes:%=%$(EXESUF))
 OBJS        = $(PROGS-yes:%=%.o) cmdutils.o
-MANPAGES    = $(PROGS-yes:%=doc/%.1)
-PODPAGES    = $(PROGS-yes:%=doc/%.pod)
-HTMLPAGES   = $(PROGS-yes:%=doc/%.html)
 TOOLS       = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
 TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
 HOSTPROGS  := $(TESTTOOLS:%=tests/%)
@@ -48,8 +45,6 @@ FF_LDFLAGS   := $(FFLDFLAGS)
 FF_EXTRALIBS := $(FFEXTRALIBS)
 FF_DEP_LIBS  := $(DEP_LIBS)
 
-all-$(CONFIG_DOC): documentation
-
 all: $(FF_DEP_LIBS) $(PROGS)
 
 config.h: .config
@@ -105,28 +100,6 @@ version.h .version:
 # force version.sh to run whenever version might have changed
 -include .version
 
-DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
-
-documentation: $(DOCS)
-
--include $(wildcard $(DOCS:%=%.d))
-
-TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
-
-doc/%.html: TAG = HTML
-doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
-	$(Q)$(TEXIDEP)
-	$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $<
-
-doc/%.pod: TAG = POD
-doc/%.pod: doc/%.texi
-	$(Q)$(TEXIDEP)
-	$(M)doc/texi2pod.pl $< $@
-
-doc/%.1: TAG = MAN
-doc/%.1: doc/%.pod
-	$(M)pod2man --section=1 --center=" " --release=" " $< > $@
-
 ifdef PROGS
 install: install-progs install-data
 endif
@@ -136,7 +109,6 @@ install: install-libs install-headers
 install-libs: install-libs-yes
 
 install-progs-yes:
-install-progs-$(CONFIG_DOC): install-man
 install-progs-$(CONFIG_SHARED): install-libs
 
 install-progs: install-progs-yes $(PROGS)
@@ -147,11 +119,7 @@ install-data: $(DATA_FILES)
 	$(Q)mkdir -p "$(DATADIR)"
 	$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
 
-install-man: $(MANPAGES)
-	$(Q)mkdir -p "$(MANDIR)/man1"
-	$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
-
-uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data uninstall-man
+uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
 
 uninstall-progs:
 	$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
@@ -159,13 +127,9 @@ uninstall-progs:
 uninstall-data:
 	$(RM) -r "$(DATADIR)"
 
-uninstall-man:
-	$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
-
 clean::
 	$(RM) $(ALLPROGS)
 	$(RM) $(CLEANSUFFIXES)
-	$(RM) doc/*.html doc/*.pod doc/*.1
 	$(RM) $(TOOLS)
 	$(RM) $(CLEANSUFFIXES:%=tools/%)
 
@@ -178,7 +142,8 @@ config:
 
 check: test checkheaders
 
+include doc/Makefile
 include tests/Makefile
 
-.PHONY: all alltools *clean check config documentation examples install*
+.PHONY: all alltools *clean check config examples install*
 .PHONY: testprogs uninstall*
diff --git a/configure b/configure
index d9a768e..6f15605 100755
--- a/configure
+++ b/configure
@@ -3221,6 +3221,7 @@ if enabled source_path_used; then
         Makefile
         common.mak
         subdir.mak
+        doc/Makefile
         doc/texi2pod.pl
         libavcodec/Makefile
         libavcodec/${arch}/Makefile
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..a5e090b
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,43 @@
+MANPAGES    = $(PROGS-yes:%=doc/%.1)
+PODPAGES    = $(PROGS-yes:%=doc/%.pod)
+HTMLPAGES   = $(PROGS-yes:%=doc/%.html)
+
+DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
+
+all-$(CONFIG_DOC): documentation
+
+documentation: $(DOCS)
+
+TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
+
+doc/%.html: TAG = HTML
+doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
+	$(Q)$(TEXIDEP)
+	$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $<
+
+doc/%.pod: TAG = POD
+doc/%.pod: doc/%.texi
+	$(Q)$(TEXIDEP)
+	$(M)doc/texi2pod.pl $< $@
+
+doc/%.1: TAG = MAN
+doc/%.1: doc/%.pod
+	$(M)pod2man --section=1 --center=" " --release=" " $< > $@
+
+install-progs-$(CONFIG_DOC): install-man
+
+install-man: $(MANPAGES)
+	$(Q)mkdir -p "$(MANDIR)/man1"
+	$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
+
+uninstall: uninstall-man
+
+uninstall-man:
+	$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
+
+clean::
+	$(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
+
+-include $(wildcard $(DOCS:%=%.d))
+
+.PHONY: documentation



More information about the ffmpeg-cvslog mailing list