[esnacc-dev] [PATCH] docbook: Search for local copies of man docbook
Aaron Conole
aconole at bytheb.org
Wed Oct 12 13:36:08 UTC 2016
The docbook manpages search should default to local, and if the file
isn't found, then it can go to the internet. This keeps network traffic
low, making us good netizens. It also enables non-network connected
builds from source.
Signed-off-by: Aaron Conole <aconole at bytheb.org>
---
.travis.yml | 1 +
Makefile.am | 1 +
compiler/automake.mk | 2 +-
m4/xsltproc.m4 | 11 +++++++++++
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 464540a..fe1c11f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,7 @@ addons:
apt:
packages:
- xsltproc
+ - docbook-xsl
coverity_scan:
project:
name: "orgcandman/esnacc-ng"
diff --git a/Makefile.am b/Makefile.am
index 00e0a74..a106a70 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,6 +75,7 @@ check_SCRIPTS =
pkgconfig_DATA =
FLAKE8_PYFILES =
check_PROGRAMS =
+DOCBOOK_LOCATION = @DOCBOOK_XSL_LOCATION@
all_lib_LDFLAGS = \
-version-info $(LT_VERSION_INTF)
diff --git a/compiler/automake.mk b/compiler/automake.mk
index 0dc8ee4..7a1f910 100644
--- a/compiler/automake.mk
+++ b/compiler/automake.mk
@@ -87,7 +87,7 @@ DISTCLEANFILES += compiler/esnacc.1
endif
compiler/esnacc.1: compiler/esnacc.xml
- $(XSLTPROC) --novalid -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+ $(XSLTPROC) --novalid -o $@ $(DOCBOOK_LOCATION) $<
CLEANFILES += compiler/core/lex-asn1.c \
compiler/core/y.output \
diff --git a/m4/xsltproc.m4 b/m4/xsltproc.m4
index 4c1a804..54b868f 100644
--- a/m4/xsltproc.m4
+++ b/m4/xsltproc.m4
@@ -24,4 +24,15 @@ AC_DEFUN([AC_CHECK_XSLTPROC],
fi
fi
fi
+ if test "$XSLTPROC" != ""; then
+ DOCBOOK_XSL_LOCATION=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+ AC_MSG_CHECKING(for manpage docbook)
+ for i in /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl /usr/share/xml/docbook/stylesheet/current/manpages/docbook.xsl /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl /usr/share/xml/docbook/stylesheet/nwalsh5/current/manpages/docbook.xsl /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl /usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl; do
+ if test -r $i; then
+ DOCBOOK_XSL_LOCATION=$i
+ fi
+ done
+ AC_MSG_RESULT($DOCBOOK_XSL_LOCATION)
+ AC_SUBST(DOCBOOK_XSL_LOCATION, $DOCBOOK_XSL_LOCATION)
+ fi
])
--
2.7.4
More information about the dev
mailing list