Signed-off-by: Mans Rullgard <[email protected]>
---
Makefile | 43 ++++---------------------------------------
configure | 1 +
doc/Makefile | 41 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 39 deletions(-)
create mode 100644 doc/Makefile
diff --git a/Makefile b/Makefile
index 920b21f..4c5198f 100644
--- a/Makefile
+++ b/Makefile
@@ -11,9 +11,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/%)
@@ -43,15 +40,12 @@ FF_LDFLAGS := $(FFLDFLAGS)
FF_EXTRALIBS := $(FFEXTRALIBS)
FF_DEP_LIBS := $(DEP_LIBS)
-ALL_TARGETS-$(CONFIG_DOC) += documentation
-
ifdef PROGS
INSTALL_TARGETS-yes += install-progs install-data
-INSTALL_TARGETS-$(CONFIG_DOC) += install-man
endif
INSTALL_PROGS_TARGETS-$(CONFIG_SHARED) = install-libs
-all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
+all: $(FF_DEP_LIBS) $(PROGS)
config.h: .config
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
@@ -106,29 +100,7 @@ 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=" " $< > $@
-
-install: install-libs install-headers $(INSTALL_TARGETS-yes)
+install: install-libs install-headers install-yes $(INSTALL_TARGETS-yes)
install-libs: install-libs-yes
@@ -140,11 +112,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))
@@ -152,13 +120,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/%)
@@ -171,6 +135,7 @@ config:
check: test checkheaders
+include doc/Makefile
include tests/Makefile
.PHONY: all alltools *clean check config documentation examples install*
diff --git a/configure b/configure
index 0e88e89..bde75c2 100755
--- a/configure
+++ b/configure
@@ -3219,6 +3219,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..16b02ae
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,41 @@
+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-$(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))
--
1.7.5.3
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel