gbranden pushed a commit to branch branden-post-1.23.0 in repository groff.
commit 5ec54e10ee5be615c1e8db494a518eec11e08dce Author: G. Branden Robinson <[email protected]> AuthorDate: Fri Mar 10 18:03:15 2023 -0600 doc/doc.am: Fix repo builds' install-doc targets. * 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. Thanks to Nikita Ivanov for the report. (install-pdf-local, install-html-local): Similar. 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 | 11 +++++++++++ doc/doc.am | 33 +++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a8202dda..5a2b85ee5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2023-03-11 G. Branden Robinson <[email protected]> + + * 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. + 2023-03-10 G. Branden Robinson <[email protected]> * 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 [email protected] https://lists.gnu.org/mailman/listinfo/groff-commit
