configure: Add docdir configuration option
authorVittorio Giovara <vittorio.giovara@gmail.com>
Wed, 28 Aug 2013 08:30:14 +0000 (10:30 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 31 Aug 2013 14:16:38 +0000 (16:16 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
configure
doc/Makefile

index 4de0fd2..11005ab 100755 (executable)
--- a/configure
+++ b/configure
@@ -81,6 +81,7 @@ Standard options:
   --prefix=PREFIX          install in PREFIX [$prefix]
   --bindir=DIR             install binaries in DIR [PREFIX/bin]
   --datadir=DIR            install data files in DIR [PREFIX/share/avconv]
+  --docdir=DIR             install documentation in DIR [PREFIX/share/doc/libav]
   --libdir=DIR             install libs in DIR [PREFIX/lib]
   --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]
   --incdir=DIR             install includes in DIR [PREFIX/include]
@@ -1416,6 +1417,7 @@ CMDLINE_SELECT="
 PATHS_LIST='
     bindir
     datadir
+    docdir
     incdir
     libdir
     mandir
@@ -1955,6 +1957,7 @@ logfile="config.log"
 prefix_default="/usr/local"
 bindir_default='${prefix}/bin'
 datadir_default='${prefix}/share/avconv'
+docdir_default='${prefix}/share/doc/libav'
 incdir_default='${prefix}/include'
 libdir_default='${prefix}/lib'
 mandir_default='${prefix}/share/man'
@@ -4119,6 +4122,7 @@ SHLIBDIR=\$(DESTDIR)$shlibdir
 INCDIR=\$(DESTDIR)$incdir
 BINDIR=\$(DESTDIR)$bindir
 DATADIR=\$(DESTDIR)$datadir
+DOCDIR=\$(DESTDIR)$docdir
 MANDIR=\$(DESTDIR)$mandir
 SRC_PATH=$source_path
 CC_IDENT=$cc_ident
index 43e4632..81f098e 100644 (file)
@@ -45,13 +45,20 @@ $(DOCS) doc/doxy/html: | doc/
 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
        $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
 
-install-progs-$(CONFIG_DOC): install-man
+install-progs-$(CONFIG_DOC): install-doc install-man
+
+install-doc: $(HTMLPAGES)
+       $(Q)mkdir -p "$(DOCDIR)"
+       $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
 
 install-man: $(MANPAGES)
        $(Q)mkdir -p "$(MANDIR)/man1"
        $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
 
-uninstall: uninstall-man
+uninstall: uninstall-doc uninstall-man
+
+uninstall-doc:
+       $(RM) -r "$(DOCDIR)"
 
 uninstall-man:
        $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))