Browse Source

do not distribute doc when not available

Nathalie Furmento 8 years ago
parent
commit
358bb3fa09
2 changed files with 19 additions and 5 deletions
  1. 8 4
      configure.ac
  2. 11 1
      doc/doxygen/Makefile.am

+ 8 - 4
configure.ac

@@ -3031,15 +3031,19 @@ if test "$enable_build_doc" = "yes" ; then
    if test "$epstopdfcommand" = "" ; then
 	enable_build_doc="no"
    fi
-   if test -f "$srcdir/doc/doxygen/starpu.pdf"
-   then
-	enable_build_doc="no"
-   fi
+fi
+available_doc="no"
+if test -f "$srcdir/doc/doxygen/starpu.pdf"
+then
+   available_doc="yes"
 fi
 AC_MSG_CHECKING(whether documentation should be compiled)
 AC_MSG_RESULT($enable_build_doc)
+AC_MSG_CHECKING(whether documentation is available)
+AC_MSG_RESULT($available_doc)
 
 AM_CONDITIONAL(BUILD_DOC, [test x$enable_build_doc != xno])
+AM_CONDITIONAL(AVAILABLE_DOC, [test x$available_doc != xno])
 
 ###############################################################################
 #                                                                             #

+ 11 - 1
doc/doxygen/Makefile.am

@@ -34,17 +34,26 @@ all: $(DOX_HTML_DIR) $(DOX_PDF)
 EXTRA_DIST = $(DOX_HTML_DIR) $(DOX_PDF)
 txt_DATA = $(DOX_PDF)
 DOX_HTML_SRCDIR=$(DOX_HTML_DIR)
+install-exec-hook:
+	$(MKDIR_P) $(DESTDIR)$(docdir)/manual/html
+	(cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html \;)
+uninstall-hook:
+	rm -rf $(DESTDIR)$(docdir)/manual/html
 else
+if AVAILABLE_DOC
 EXTRA_DIST = $(top_srcdir)/doc/doxygen/html $(top_srcdir)/doc/doxygen/starpu.pdf
 txt_DATA = $(top_srcdir)/doc/doxygen/starpu.pdf
 DOX_HTML_SRCDIR=$(top_srcdir)/doc/doxygen/html
-endif
 install-exec-hook:
 	$(MKDIR_P) $(DESTDIR)$(docdir)/manual/html
 	(cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html \;)
 uninstall-hook:
 	rm -rf $(DESTDIR)$(docdir)/manual/html
+endif
+endif
+
 
+if BUILD_DOC
 chapters =	\
 	chapters/000_introduction.doxy		\
 	chapters/101_building.doxy		\
@@ -273,6 +282,7 @@ CLEANFILES = $(DOX_TAG) starpu_config.h \
     $(DOX_LATEX_DIR) \
     $(DOX_PDF)
 
+endif
 # Rule to update documentation on web server. Should only be used locally.
 PUBLISHHOST	?= gforge
 update-web: $(DOX_PDF)