Mercurial > octave
diff doc/interpreter/module.mk @ 25313:ebe32e8062ab stable
install Qt help files if available
The Qt help files are included in tarball distributions, so attempt to
install those files even if the tools to build them are missing or
Octave has been configured with --disable-docs.
* doc/interpreter/module.mk (OCTAVE_QTHELP_FILES): Define list outside
of automake conditionals for building docs.
(install-qt-help-files, uninstall-qt-help-files, qthelp-installdir):
New rules, defined outside of conditionals.
(install-data-local): Also depend on install-qthelp-files.
(uninstall-local): Also depend on uninstall-qthelp-files.
(octdoc_DATA): Don't add $(OCTAVE_QTHELP_FILES) to the list.
(DOC_TARGETS): Only add $(OCTAVE_QTHELP_FILES) to the list if
AMCOND_BUILD_QT_DOCS is true.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 26 Apr 2018 04:32:32 -0400 |
parents | dd480b75e6e8 |
children | 159b359ccc13 |
line wrap: on
line diff
--- a/doc/interpreter/module.mk Wed Apr 25 13:13:20 2018 -0700 +++ b/doc/interpreter/module.mk Thu Apr 26 04:32:32 2018 -0400 @@ -197,12 +197,53 @@ %reldir%/octave.pdf: $(DOC_IMAGES_PDF) $(octave_TEXINFOS) $(OCTAVE_HTML_STAMP): $(DOC_IMAGES_PNG) $(octave_TEXINFOS) -if AMCOND_BUILD_QT_DOCS +endif + +## Even if Octave was configured with --disable-docs, we will install +## OCTAVE_QTHELP_FILES if they already exist. + +## Don't add these files to octdoc_DATA. We want custom rules for +## installing them. +OCTAVE_QTHELP_FILES = \ + %reldir%/octave_interpreter.qhc \ + %reldir%/octave_interpreter.qch + +install-data-local: install-qthelp-files + +uninstall-local: uninstall-qthelp-files -OCTAVE_QTHELP_FILES = %reldir%/octave_interpreter.qhc %reldir%/octave_interpreter.qch +## Don't depend on $(OCTAVE_QTHELP_FILES) because we don't want to fail +## if they can't be generated, but we want to install them if they exist +## anyway (for example, they were included with a tarball distribution +## file). +install-qthelp-files: qthelp-installdir + @for f in $(OCTAVE_QTHELP_FILES); do \ + if [ -f $$f ]; then \ + echo " $(INSTALL_DATA) $$f '$(DESTDIR)$(octdocdir)'"; \ + $(INSTALL_DATA) $$f '$(DESTDIR)$(octdocdir)'; \ + elif [ -f $(srcdir)/$$f ]; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$f '$(DESTDIR)$(octdocdir)'"; \ + $(INSTALL_DATA) $(srcdir)/$$f '$(DESTDIR)$(octdocdir)'; \ + else \ + echo "warning: unable to install $$f"; \ + fi; \ + done +.PHONY: install-qthelp-files -octdoc_DATA += \ - $(OCTAVE_QTHELP_FILES) +uninstall-qthelp-files: + for f in $(OCTAVE_QTHELP_FILES); do \ + base=`echo $$f | $(SED) 's,^%reldir%/,,'`; \ + rm -f $(DESTDIR)$(octdocdir)/$$base; \ + done +.PHONY: uninstall-qthelp-files + +qthelp-installdir: + $(MKDIR_P) '$(DESTDIR)/$(octdocdir)' +.PHONY: qthelp-installdir + +if AMCOND_BUILD_DOCS + +if AMCOND_BUILD_QT_DOCS $(OCTAVE_QTHELP_FILES): $(OCTAVE_HTML_STAMP) $(HTMLDIR_CSS) %reldir%/mk-qthelp.pl $(AM_V_GEN)rm -f $(OCTAVE_QTHELP_FILES) && \ @@ -279,8 +320,12 @@ %reldir%/octave.pdf \ $(OCTAVE_HTML_STAMP) \ $(HTMLDIR_IMAGES) \ - $(HTMLDIR_CSS) \ + $(HTMLDIR_CSS) + +if AMCOND_BUILD_QT_DOCS +DOC_TARGETS += \ $(OCTAVE_QTHELP_FILES) +endif ## Distribute both OCTAVE_CSS and HTMLDIR_CSS so that the rules for ## building HTMLDIR_CSS work properly.