OSDN Git Service

build: use condititional doc generation
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 19 Jan 2018 18:20:49 +0000 (19:20 +0100)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 1 Feb 2018 01:24:11 +0000 (09:24 +0800)
Instead of using conditional compilation for generarte documentation,
this patch will block parsing Makefile in doc subdirectory if the
documentation is not enabled.

This patch will make compilation a bit faster when documentation is
not generated.

Makefile.am
doc/Makefile.am

index f149bfe..8362566 100644 (file)
@@ -24,7 +24,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = va pkgconfig doc
+SUBDIRS = va pkgconfig
+
+if ENABLE_DOCS
+SUBDIRS += doc
+endif
 
 # Extra clean files so that maintainer-clean removes *everything*
 MAINTAINERCLEANFILES = \
index c9b5343..b96acc1 100644 (file)
@@ -60,8 +60,8 @@ Doxyfile: Doxyfile.in $(VA_HEADER_FILES) $(VA_HTML_FOOTER)
 html-out/index.html: Doxyfile
        $(AM_V_GEN) $(DOXYGEN)
 
-if ENABLE_DOCS
 html: html-out/index.html
+
 install-html-local:
        install -d $(DESTDIR)$(docdir)/html
        for file in `ls html-out/` ; do \
@@ -72,9 +72,9 @@ install-html-local:
                install -m 0644 html-out/$$file/* $(DESTDIR)$(docdir)/html/$$file; \
            fi ; \
        done
+
 uninstall-local:
        rm -rf $(DESTDIR)$(docdir)/html
-endif
 
 # Extra clean files so that maintainer-clean removes *everything*
 MAINTAINERCLEANFILES = Makefile.in Doxyfile