[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 14/83: doc/doc.am: Fix Savannah #64059.
From: |
G. Branden Robinson |
Subject: |
[groff] 14/83: doc/doc.am: Fix Savannah #64059. |
Date: |
Sat, 6 May 2023 23:24:14 -0400 (EDT) |
gbranden pushed a commit to branch branden-2023-05-06
in repository groff.
commit 8eb345d6304067d11366531305b754f74dfd54e3
Author: G. Branden Robinson <g.branden.robinson@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 b58f8d323..bd81b0163 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-03-11 G. Branden Robinson <g.branden.robinson@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.robinson@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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 14/83: doc/doc.am: Fix Savannah #64059.,
G. Branden Robinson <=