Issue an explicit warning if the docs can't be built at 'make dist'
authorRalph Giles <giles@xiph.org>
Tue, 21 Sep 2004 02:17:43 +0000 (02:17 +0000)
committerRalph Giles <giles@xiph.org>
Tue, 21 Sep 2004 02:17:43 +0000 (02:17 +0000)
time, as is now required.

This is a little less broken than the previous config in that the dist
will need to have the build docs, and a normal build from a dist tarball
won't try. However if you --enable-docs on the dist tarball, it will
rebuild them even if they're up to date. Among other things, this makes
'make distcheck' annoying.

svn path=/trunk/vorbis/; revision=7816

configure.in
doc/Makefile.am

index 92fa252..1389a0d 100644 (file)
@@ -63,7 +63,7 @@ if test x$build_docs = xtrue; then
   AC_CHECK_PROGS([PDFXMLTEX], pdfxmltex, [/bin/false])
   if test "x$XSLTPROC" = "x/bin/false" || test "x$PDFXMLTEX" = "x/bin/false"; then
     build_docs=false
-    AC_MSG_WARN([Documentation will not be built])
+    AC_MSG_WARN([Documentation will not be built!])
   fi
 fi
 
index bf3adbf..6ad6aab 100644 (file)
@@ -105,6 +105,7 @@ $(BUILDDIR)/draft-rtp.xml: draft-kerr-avt-vorbis-rtp-03.txt
 # cat $< | sed 's/\f//g' | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g' > $@
 
 # explicit rules for generating docs
+if BUILD_DOCS
 Vorbis_I_spec.html: $(SPEC_PNG_BUILD) $(BUILDDIR)/Vorbis_I_spec.xml
        cd build; xsltproc --xinclude --output Vorbis_I_spec.html spec-html.xsl Vorbis_I_spec.xml && mv $@ ..
 
@@ -117,6 +118,15 @@ Vorbis_I_spec.pdf: Vorbis_I_spec.fo $(SPEC_PNG_BUILD) $(SPEC_PDF_BUILD)
        cd build; pdfxmltex --interaction nonstopmode spec.fo
        rm build/spec.fo
        mv build/spec.pdf $@
+else
+Vorbis_I_spec.html: NO_DOCS_ERROR
+Vorbis_I_spec.pdf: NO_DOCS_ERROR
+NO_DOCS_ERROR:
+       @echo
+       @echo "*** Documentation has not been built! ***"
+       @echo "Try re-running after passing --enable-docs to configure."
+       @echo
+endif
 
 # clean up build dir
 clean-local: