diff --git a/doc/xml/AdminGuide/Makefile.in b/doc/xml/AdminGuide/Makefile.in index caf48ac668..d2978cc150 100644 --- a/doc/xml/AdminGuide/Makefile.in +++ b/doc/xml/AdminGuide/Makefile.in @@ -12,6 +12,7 @@ # # HTML_XSL is possibly specific to Debian and may need to be modified on other # systems. +srcdir=@srcdir@ BOOK = auagd000 @@ -33,22 +34,29 @@ DOCBOOK2PDF = @DOCBOOK2PDF@ KINDLEGEN = @KINDLEGEN@ DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub +XSL_FLAGS = --path '@abs_builddir@' + index.html: $(SRCS) - $(XSLTPROC) --param navig.graphics 1 \ + $(XSLTPROC) $(XSL_FLAGS) \ + --param navig.graphics 1 \ --param use.id.as.filename 1 \ - --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml + --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) \ + $(srcdir)/$(BOOK).xml $(BOOK).pdf: $(SRCS) if test "x$(DOCBOOK2PDF)" = "xfop"; then \ - $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \ + $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl \ + $(srcdir)/$(BOOK).xml > $(BOOK).fo; \ $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \ else \ - $(DOCBOOK2PDF) $(BOOK).xml; \ + $(DOCBOOK2PDF) --output=$@ --xslt-opts="$(XSL_FLAGS)" \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).epub: $(SRCS) if test -x "$(DBTOEPUB)" ; then \ - $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \ + $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).mobi: $(BOOK).epub @@ -57,7 +65,7 @@ $(BOOK).mobi: $(BOOK).epub fi check: - xmllint --noout --valid $(BOOK).xml + xmllint $(XSL_FLAGS) --noout --valid $(srcdir)/$(BOOK).xml clean: rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf diff --git a/doc/xml/AdminRef/Makefile.in b/doc/xml/AdminRef/Makefile.in index 8b29714c9c..06e2ce50e5 100644 --- a/doc/xml/AdminRef/Makefile.in +++ b/doc/xml/AdminRef/Makefile.in @@ -1,4 +1,5 @@ # Makefile to build the AFS Reference Guide for Unix. +srcdir=@srcdir@ BOOK = auarf000 @@ -16,20 +17,26 @@ DOCBOOK2PDF = @DOCBOOK2PDF@ DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub KINDLEGEN = @KINDLEGEN@ +XSL_FLAGS = --path '@abs_builddir@' + entities.dtd sect1.xml sect3.xml sect5.xml sect8.xml: - ./generate-xml.pl $(TOP_SRCDIR) + $(srcdir)/generate-xml.pl $(TOP_SRCDIR) $(BOOK).pdf: $(SRCS) if test "x$(DOCBOOK2PDF)" = "xfop"; then \ - $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \ + $(XSLTPROC) $(XSL_FLAGS) \ + $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl \ + $(srcdir)/$(BOOK).xml > $(BOOK).fo; \ $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \ else \ - $(DOCBOOK2PDF) $(BOOK).xml; \ + $(DOCBOOK2PDF) --output=$@ --xslt-opts="$(XSL_FLAGS)" \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).epub: $(SRCS) if test -x "$(DBTOEPUB)" ; then \ - $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \ + $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).mobi: $(BOOK).epub @@ -38,7 +45,7 @@ $(BOOK).mobi: $(BOOK).epub fi check: - xmllint --noout --valid $(BOOK).xml + xmllint $(XSL_FLAGS) --noout --valid $(srcdir)/$(BOOK).xml clean: rm -f $(BOOK).pdf $(BOOK).mobi $(BOOK).epub $(BOOK).fo \ diff --git a/doc/xml/AdminRef/generate-xml.pl b/doc/xml/AdminRef/generate-xml.pl index bdf4f7c639..c6a2f51b77 100755 --- a/doc/xml/AdminRef/generate-xml.pl +++ b/doc/xml/AdminRef/generate-xml.pl @@ -5,6 +5,7 @@ @sections = ('1', '3', '5', '8'); $TOP_SRCDIR = shift @ARGV; +$srcdir = sprintf "%s/../doc/xml/AdminRef", $TOP_SRCDIR; $doc_man_pages = sprintf "%s/../doc/man-pages", $TOP_SRCDIR; open(ENTITIES, ">entities.dtd") || die; @@ -21,10 +22,10 @@ foreach $section (@sections) { ($xmlfile = $podfile) =~ s/\.pod$/.xml/; ($entity = $xmlfile) =~ s/\.xml$//; - printf "pod2refentry < %s > %s\n", $podfile, $xmlfile; + printf "%s/pod2refentry < %s > %s\n", $srcdir, $podfile, $xmlfile; - my $rc = system(sprintf "./pod2refentry --section=%d < %s/pod%d/%s > sect%d/%s", - $section, $doc_man_pages, $section, $podfile, $section, $xmlfile); + my $rc = system(sprintf "%s/pod2refentry --section=%d < %s/pod%d/%s > sect%d/%s", + $srcdir, $section, $doc_man_pages, $section, $podfile, $section, $xmlfile); if ($rc != 0) { die "Failed to generate sect${section}/${xmlfile}: $rc\n"; } diff --git a/doc/xml/QuickStartUnix/Makefile.in b/doc/xml/QuickStartUnix/Makefile.in index b309015ce2..ae3443d711 100644 --- a/doc/xml/QuickStartUnix/Makefile.in +++ b/doc/xml/QuickStartUnix/Makefile.in @@ -12,6 +12,7 @@ # # HTML_XSL is specific to Debian and will need to be modified on other # systems until we have a better mechanism for finding the correct path. +srcdir=@srcdir@ BOOK = auqbg000 @@ -31,22 +32,30 @@ DOCBOOK2PDF = @DOCBOOK2PDF@ DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub KINDLEGEN = @KINDLEGEN@ +XSL_FLAGS = --path '@abs_builddir@' + index.html: $(SRCS) - $(XSLTPROC) --param navig.graphics 1 \ + $(XSLTPROC) $(XSL_FLAGS) \ + --param navig.graphics 1 \ --param use.id.as.filename 1 \ - --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml + --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) \ + $(srcdir)/$(BOOK).xml $(BOOK).pdf: $(SRCS) if test "x$(DOCBOOK2PDF)" = "xfop"; then \ - $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \ + $(XSLTPROC) $(XSL_FLAGS) \ + $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl \ + $(srcdir)/$(BOOK).xml > $(BOOK).fo; \ $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \ else \ - $(DOCBOOK2PDF) $(BOOK).xml; \ + $(DOCBOOK2PDF) --output=$@ --xslt-opts="$(XSL_FLAGS)" \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).epub: $(SRCS) if test -x "$(DBTOEPUB)" ; then \ - $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \ + $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).mobi: $(BOOK).epub @@ -55,7 +64,7 @@ $(BOOK).mobi: $(BOOK).epub fi check: - xmllint --noout --valid $(BOOK).xml + xmllint $(XSL_FLAGS) --noout --valid $(srcdir)/$(BOOK).xml clean: rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf diff --git a/doc/xml/UserGuide/Makefile.in b/doc/xml/UserGuide/Makefile.in index 1a0fe66d62..41048648c0 100644 --- a/doc/xml/UserGuide/Makefile.in +++ b/doc/xml/UserGuide/Makefile.in @@ -12,6 +12,7 @@ # # HTML_XSL is possibly specific to Debian and may need to be modified on other # systems. +srcdir=@srcdir@ BOOK = auusg000 @@ -31,22 +32,30 @@ DOCBOOK2PDF = @DOCBOOK2PDF@ DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub KINDLEGEN = @KINDLEGEN@ +XSL_FLAGS = --path '@abs_builddir@' + index.html: $(SRCS) - $(XSLTPROC) --param navig.graphics 1 \ + $(XSLTPROC) $(XSL_FLAGS) \ + --param navig.graphics 1 \ --param use.id.as.filename 1 \ - --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml + --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) \ + $(srcdir)/$(BOOK).xml $(BOOK).pdf: $(SRCS) if test "x$(DOCBOOK2PDF)" = "xfop"; then \ - $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \ + $(XSLTPROC) $(XSL_FLAGS) \ + $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl \ + $(srcdir)/$(BOOK).xml > $(BOOK).fo; \ $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \ else \ - $(DOCBOOK2PDF) $(BOOK).xml; \ + $(DOCBOOK2PDF) --output=$@ --xslt-opts="$(XSL_FLAGS)" \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).epub: $(SRCS) if test -x "$(DBTOEPUB)" ; then \ - $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \ + $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl \ + $(srcdir)/$(BOOK).xml; \ fi $(BOOK).mobi: $(BOOK).epub @@ -55,7 +64,7 @@ $(BOOK).mobi: $(BOOK).epub fi check: - xmllint --noout --valid $(BOOK).xml + xmllint $(XSL_FLAGS) --noout --valid $(srcdir)/$(BOOK).xml clean: rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf