r4330 - in trunk/varnish-cache: . doc

tfheen at projects.linpro.no tfheen at projects.linpro.no
Tue Oct 13 17:26:18 CEST 2009


Author: tfheen
Date: 2009-10-13 17:26:18 +0200 (Tue, 13 Oct 2009)
New Revision: 4330

Modified:
   trunk/varnish-cache/configure.ac
   trunk/varnish-cache/doc/Makefile.am
Log:
Skip building documentation when we lack xsltproc

Previously, trying to build from SVN without xsltproc installed would
get you errors like:

  --xinclude -o changes-2.0.1.html changes-2.0.1.xml
  --xinclude:No such file or directory

which is quite confusing.

We now rather just skip the docs completely if we can't find any
xsltproc.  If we actually do need to rebuild the docs (which should
only happen when running make dist), we error out with a useful error
message.



Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2009-10-13 14:29:50 UTC (rev 4329)
+++ trunk/varnish-cache/configure.ac	2009-10-13 15:26:18 UTC (rev 4330)
@@ -24,7 +24,11 @@
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
-AC_CHECK_PROGS(XSLTPROC, [xsltproc])
+AC_CHECK_PROGS(XSLTPROC, [xsltproc], "no")
+if test "x$XSLTPROC" = "xno"; then
+   AC_MSG_WARN([xsltproc not found – not building documentation])
+fi
+AM_CONDITIONAL(HAVE_XSLTPROC,[test "x$XSLTPROC" != "xno"])
 
 # Checks for libraries.
 save_LIBS="${LIBS}"

Modified: trunk/varnish-cache/doc/Makefile.am
===================================================================
--- trunk/varnish-cache/doc/Makefile.am	2009-10-13 14:29:50 UTC (rev 4329)
+++ trunk/varnish-cache/doc/Makefile.am	2009-10-13 15:26:18 UTC (rev 4330)
@@ -17,17 +17,26 @@
 	changes-1.0.3-1.0.4.xml \
 	${CHANGELOGS:.html=.xml}
 
+if HAVE_XSLTPROC
 all: ${CHANGELOGS}
+endif
 
 EXTRA_DIST = ${CHANGELOGS} ${XML} \
 	changes.css changes-html.xsl \
 	getting-started.html
 
 CLEANFILES = ${CHANGELOGS}
-
 SUFFIXES = .xml .html
 
 .xml.html:
+if HAVE_XSLTPROC
 	${XSLTPROC} --xinclude -o $@ $<
+else
+	@echo "========================================"
+	@echo "You need xsltproc installed to make dist"
+	@echo "========================================"
+	@false
+endif
 
 ${CHANGELOGS}: changes-html.xsl
+



More information about the varnish-commit mailing list