From 7125075168198f00f66001cbeaeb3d2318c0abf7 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 29 Aug 2014 16:48:01 +0200 Subject: [PATCH 1/2] Fix HTML documentation installation for VPATH builds --- doc/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 2a25e8ed..fdb06170 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -113,6 +113,9 @@ uninstall-local: # manually install some files under another name install-data-local: $(mkinstalldirs) $(DOCDIR)/html - $(INSTALL_DATA) $(srcdir)/geany.html $(DOCDIR)/html/index.html +# as we don't install with the automated mechanism so we can rename the file, +# we need to find the source file in the right location (either builddir or srcdir) + dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \ + $(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt From 0453991a61c57550555327707c3ecdefcf4de009 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 29 Aug 2014 16:58:26 +0200 Subject: [PATCH 2/2] Don't try to install the HTML documentation if we don't have it --- doc/Makefile.am | 5 +++++ m4/geany-docutils.m4 | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index fdb06170..f17c2c16 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,6 @@ man_MANS=geany.1 +if INSTALL_HTML_DOCS htmldocimagesdir = $(docdir)/html/images dist_htmldocimages_DATA = \ images/build_menu_commands_dialog.png \ @@ -23,6 +24,7 @@ dist_htmldocimages_DATA = \ images/pref_dialog_various.png \ images/pref_dialog_vte.png \ images/replace_dialog.png +endif doc_DATA = \ $(top_srcdir)/AUTHORS \ @@ -112,10 +114,13 @@ uninstall-local: # manually install some files under another name install-data-local: +if INSTALL_HTML_DOCS $(mkinstalldirs) $(DOCDIR)/html # as we don't install with the automated mechanism so we can rename the file, # we need to find the source file in the right location (either builddir or srcdir) dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \ $(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html +endif + $(mkinstalldirs) $(DOCDIR) $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt diff --git a/m4/geany-docutils.m4 b/m4/geany-docutils.m4 index 75c27284..997cb5ac 100644 --- a/m4/geany-docutils.m4 +++ b/m4/geany-docutils.m4 @@ -14,10 +14,14 @@ AC_DEFUN([GEANY_CHECK_DOCUTILS_HTML], [ AC_REQUIRE([GEANY_CHECK_REVISION]) + AS_IF([test -f "$srcdir/doc/geany.html"], + [have_prebuilt_html_docs=yes], + [have_prebuilt_html_docs=no]) + dnl we require rst2html by default unless we don't build from Git dnl and already have the HTML manual built in-tree html_docs_default=yes - AS_IF([test "$REVISION" = "-1" && test -f "$srcdir/doc/geany.html"], + AS_IF([test "$REVISION" = "-1" && test "x$have_prebuilt_html_docs" = xyes], [html_docs_default=auto]) AC_ARG_ENABLE([html-docs], @@ -40,6 +44,8 @@ but you then may not have a local copy of the HTML manual.])], [geany_enable_html_docs="no"]) ]) AM_CONDITIONAL([WITH_RST2HTML], [test "x$geany_enable_html_docs" != "xno"]) + AM_CONDITIONAL([INSTALL_HTML_DOCS], [test "x$geany_enable_html_docs" != "xno" || + test "x$have_prebuilt_html_docs" = xyes]) GEANY_STATUS_ADD([Build HTML documentation], [$geany_enable_html_docs]) ]) dnl