From: Ben Pfaff <blp@cs.stanford.edu>
Date: Sat, 28 Nov 2020 02:56:35 +0000 (-0800)
Subject: doc: Make figure references relative to doc/, not to doc/pspp-figures.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=556aadcdd474f7b1a718a821548652cc64f8770d;p=pspp

doc: Make figure references relative to doc/, not to doc/pspp-figures.

This frame of reference is what the viewers for the generated XML and Info
files expect (from testing).  It also seems to be what the Makefile expects
since this allows us to eliminate a couple of include directory options.
---

diff --git a/doc/automake.mk b/doc/automake.mk
index 4e23a1c4be..65e2164220 100644
--- a/doc/automake.mk
+++ b/doc/automake.mk
@@ -81,8 +81,8 @@ doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list
 if BROKEN_DOCBOOK_XML
 	touch $@
 else
-	$(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
-		$< -o $@
+	$(AM_V_GEN)$(MAKEINFO) --docbook $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+		-I doc -I $(srcdir)/doc $< -o $@
 endif
 
 docbookdir = $(docdir)
@@ -106,9 +106,7 @@ EXTRA_DIST += \
 	doc/help-pages-list \
 	doc/pspp-manual.css
 
-
-AM_MAKEINFOFLAGS=-I $(top_srcdir)/doc/pspp-figures -I $(top_builddir)/doc/pspp-figures
-am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc/pspp-figures:$(top_builddir)/doc/pspp-figures
+am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc:$(top_builddir)/doc
 
 ################# Example programs ##############################
 
diff --git a/doc/pspp.texi b/doc/pspp.texi
index 6914697691..1af4275be0 100644
--- a/doc/pspp.texi
+++ b/doc/pspp.texi
@@ -36,7 +36,7 @@ graphic user interface
 @macro psppoutput{FILE}
 @ifnothtml
 @smallexample
-@include \FILE\.texi
+@include pspp-figures/\FILE\.texi
 @end smallexample
 @end ifnothtml
 @ifhtml
@@ -44,7 +44,7 @@ graphic user interface
 @html
 
 <div class="pspp">
-@include \FILE\.html
+@include pspp-figures/\FILE\.html
 </div>
 
 @end html