gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 89f5216908f0ca3cbce723cc0b7e03a12e580f15 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Fri Mar 10 18:03:15 2023 -0600
doc/doc.am: Fix Savannah #64059. * doc/doc.am (install-txt): Look for "groff.txt" in the source and build directories in sequence; it could be in either place depending on whether the build is from the Git repository or from a distribution archive. Annotate this. Fixes "install-doc" target when building from Git repository. Problem introduced by me in commit 691fc70108, 22 February. Thanks to Nikita Ivanov for the report. (install-pdf-local, install-html-local): Similar. Also fixes <https://savannah.gnu.org/bugs/?64059>, later reported anonymously. I wasn't getting problems in my builds even with "make distcheck" (which performs a build from a distribution archive in a remote out-of-tree location), but changing $(top_srcdir)/doc to $(doc_builddir) revealed problems with repo builds. --- ChangeLog | 14 ++++++++++++++ doc/doc.am | 33 +++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d9ecc556..4a2e2f94a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2023-03-11 G. Branden Robinson <g.branden.robin...@gmail.com> + + * doc/doc.am (install-txt): Look for "groff.txt" in the source + and build directories in sequence; it could be in either place + depending on whether the build is from the Git repository or + from a distribution archive. Annotate this. Fixes + "install-doc" target when building from Git repository. Problem + introduced by me in commit 691fc70108, 22 February. Thanks to + Nikita Ivanov for the report. + (install-pdf-local, install-html-local): Similar. + + Also fixes <https://savannah.gnu.org/bugs/?64059>, later + reported anonymously. + 2023-03-10 G. Branden Robinson <g.branden.robin...@gmail.com> * doc/doc.am (maintainer-clean-local): Remove temporary "*.t2d" diff --git a/doc/doc.am b/doc/doc.am index 20e222881..7b6e8f5b9 100644 --- a/doc/doc.am +++ b/doc/doc.am @@ -621,11 +621,20 @@ maintainer-clean-local: $(RM) -r $(doc_builddir)/groff.html.* $(RM) -r $(doc_builddir)/*.t2d $(doc_builddir)/*.t2p +# Generated forms of the groff Texinfo manual might be in the source +# directory (distribution archive build) or in the build directory (Git +# repository build). + install-data-local: install-txt install-txt: -test -d $(DESTDIR)$(docdir) \ || $(mkinstalldirs) $(DESTDIR)$(docdir) - cp $(top_srcdir)/doc/groff.txt $(DESTDIR)$(docdir) + for d in $(doc_builddir) $(doc_srcdir); do \ + if [ -f "$$d"/groff.txt ]; then \ + cp "$$d"/groff.txt $(DESTDIR)$(docdir); \ + break; \ + fi; \ + done install-data-local: install_infodoc install_infodoc: doc/groff.info @@ -640,17 +649,29 @@ install_infodoc: doc/groff.info break; \ fi; \ done + install-pdf-local: doc/groff.pdf -test -d $(DESTDIR)$(pdfdocdir) \ || $(mkinstalldirs) $(DESTDIR)$(pdfdocdir) - cp $(top_srcdir)/doc/groff.pdf $(DESTDIR)$(pdfdocdir) + for d in $(doc_builddir) $(doc_srcdir); do \ + if [ -f "$$d"/groff.pdf ]; then \ + cp "$$d"/groff.pdf $(DESTDIR)$(pdfdocdir); \ + break; \ + fi; \ + done + install-html-local: doc/groff.html -test -d $(DESTDIR)$(htmldocdir)/groff.html.mono \ || $(mkinstalldirs) $(DESTDIR)$(htmldocdir)/groff.html.mono - cp -r $(top_srcdir)/doc/groff.html \ - $(DESTDIR)$(htmldocdir)/groff.html.mono - cp -r $(top_srcdir)/doc/groff.html.node \ - $(DESTDIR)$(htmldocdir) + for d in $(doc_builddir) $(doc_srcdir); do \ + if [ -f "$$d"/groff.html ]; then \ + cp -r "$$d"/groff.html \ + $(DESTDIR)$(htmldocdir)/groff.html.mono; \ + cp -r "$$d"/groff.html.node \ + $(DESTDIR)$(htmldocdir); \ + break; \ + fi; \ + done uninstall-local: uninstall_infodoc uninstall-pdf uninstall-html \ uninstall-txt _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit