[libdvdcss-devel] build: fix apidoc generation and install it as well.

Diego Elio Pettenò git at videolan.org
Thu Feb 14 21:13:50 CET 2013


libdvdcss | branch: master | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 07:32:00 2013 -0800| [29af7f48ed02aefb1342e5be57c0ae6a1336935c] | committer: Diego Elio Pettenò

build: fix apidoc generation and install it as well.

This removes the LaTeX documentation generation, and makes sure that
if doc is enabled, it's built and installed as well (using htmldir).

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=29af7f48ed02aefb1342e5be57c0ae6a1336935c
---

 Makefile.am        |   29 ++++++++++++++--------
 configure.ac       |   25 +++++++++----------
 doc/doxygen.cfg.in |   69 +---------------------------------------------------
 3 files changed, 31 insertions(+), 92 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index bc794f3..0e5f101 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST = libdvdcss.spec doc/header.html doc/footer.html doc/latex/ INSTALL
+EXTRA_DIST = libdvdcss.spec doc/header.html doc/footer.html INSTALL
 
 dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
 
@@ -51,17 +51,26 @@ pkginclude_HEADERS = src/dvdcss/dvdcss.h
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = src/libdvdcss.pc
 
-apidoc: stamp-doxygen stamp-latex
+if APIDOC
+all-local: apidoc
+install-data-local: install-apidoc
+uninstall-hook: uninstall-apidoc
+endif
 
-stamp-doxygen: doc/doxygen.cfg
-	cd doc && $(DOXYGEN) doxygen.cfg
-	touch $@
+apidoc: stamp-doxygen
 
-stamp-latex: stamp-doxygen
-if LATEX
-	$(MAKE) -C doc/latex ps
-endif
+stamp-doxygen: doc/doxygen.cfg
+	cd doc && doxygen doxygen.cfg
 	touch $@
 
 clean-local:
-	-rm -Rf stamp-latex stamp-doxygen doc/html doc/latex
+	-rm -Rf stamp-doxygen doc/html
+
+install-apidoc:
+	$(MKDIR_P) $(DESTDIR)$(htmldir)
+	for file in doc/html/*; do \
+		$(INSTALL_DATA) $$file "$(DESTDIR)$(htmldir)" || exit 1; \
+	done;
+
+uninstall-apidoc:
+	-rm -Rf $(DESTDIR)$(htmldir)/*.png $(DESTDIR)$(htmldir)/*.html $(DESTDIR)$(htmldir)/*.css $(DESTDIR)$(htmldir)/*.js
diff --git a/configure.ac b/configure.ac
index c80a49f..772fa38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,19 +175,17 @@ CC_FLAG_VISIBILITY([
 
 AM_CONDITIONAL(SYS_MSVC, test "${SYS_MSVC}" = "1")
 
-dnl
-dnl  Shall we build documentation?
-dnl
-AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-doc], [do not build API documentation with Doxygen]))
-if test "$enable_doc" != "no"; then
-  AC_PATH_PROG(DOXYGEN, doxygen, no)
-  AC_PATH_PROG(LATEX, latex, no)
-else
-  DOXYGEN="no"
-  LATEX="no"
-fi
-AM_CONDITIONAL(DOXYGEN, test "${DOXYGEN}" != "no")
-AM_CONDITIONAL(LATEX, test "${LATEX}" != "no")
+AC_ARG_ENABLE([doc],
+  AS_HELP_STRING([--disable-apidoc], [Disable building (with Doxygen) and intalling API documentation @<:@default=auto@:@>]))
+
+AC_PATH_PROG([DOXYGEN], [doxygen])
+
+AS_IF([test "x$DOXYGEN" = "x"], [
+  AS_IF([test "x$enable_apidoc" = "xyes"], [
+    AC_MSG_ERROR([You need Doxygen to build API documentation])
+  ])
+])
+AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"])
 
 AC_SUBST(DVDCSS_LDFLAGS)
 AC_OUTPUT([
@@ -195,4 +193,3 @@ AC_OUTPUT([
   doc/doxygen.cfg
   src/libdvdcss.pc
 ])
-
diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in
index 81c33c7..689468c 100644
--- a/doc/doxygen.cfg.in
+++ b/doc/doxygen.cfg.in
@@ -892,74 +892,7 @@ FORMULA_FONTSIZE       = 10
 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
 # generate Latex output.
 
-GENERATE_LATEX         = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
+GENERATE_LATEX         = NO
 
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output



More information about the libdvdcss-devel mailing list