-Vorbis_I_spec.html:
- xsltproc --xinclude --output $@ xml/spec-html.xsl xml/Vorbis_I_spec.xml
-
-Vorbis_I_spec.fo:
- xsltproc --xinclude --output $@ xml/spec-fo.xsl xml/Vorbis_I_spec.xml
-
-Vorbis_I_spec.pdf: Vorbis_I_spec.fo
- cp $< spec.fo # work around a passivetex bug
- pdfxmltex --interaction nonstopmode spec.fo
- pdfxmltex --interaction nonstopmode spec.fo
- rm spec.fo
- mv spec.pdf $@
+if BUILD_DOCS
+Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_PNG) fish_xiph_org.png
+ htlatex $<
+
+Vorbis_I_spec.pdf: $(SPEC_TEX) $(SPEC_PNG)
+ pdflatex $<
+ pdflatex $<
+ pdflatex $<
+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
+
+if HAVE_DOXYGEN
+doxygen-build.stamp: Doxyfile $(top_srcdir)/include/vorbis/*.h
+ doxygen
+ touch doxygen-build.stamp
+else
+doxygen-build.stamp:
+ echo "*** Warning: Documentation build is disabled."
+ touch doxygen-build.stamp
+endif
+
+install-data-local: doxygen-build.stamp
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ if test -d vorbis; then \
+ for dir in vorbis/*; do \
+ if test -d $$dir; then \
+ b=`basename $$dir`; \
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
+ for f in $$dir/*; do \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
+ done \
+ fi \
+ done \
+ fi
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(docdir)
+
+clean-local:
+ if test -d vorbis; then rm -rf vorbis; fi
+ if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
+