X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2FMakefile.am;h=174590160de3ab2c0603455cf620e5ef1eaafc86;hb=5bbe49dc947ea9f1532273644348c53054ca214a;hp=fe466d714623358d928bd01e2fe2c4a5480c36df;hpb=fcd8e10ff1996d89369a566ae2551c18b5495a29;p=platform%2Fupstream%2Flibvorbis.git diff --git a/doc/Makefile.am b/doc/Makefile.am index fe466d7..1745901 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,15 +1,14 @@ ## Process this with automake to create Makefile.in -SUBDIRS = vorbisfile vorbisenc +SUBDIRS = libvorbis vorbisfile vorbisenc docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) ### all of the static docs, commited to SVN and included as is static_docs = \ - draft-ietf-avt-rtp-vorbis-08.xml \ - draft-ietf-avt-rtp-vorbis-08.txt \ + rfc5215.xml \ + rfc5215.txt \ eightphase.png \ - evenlsp.png \ fish_xiph_org.png \ floor1_inverse_dB_table.html \ floorval.png \ @@ -17,8 +16,6 @@ static_docs = \ framing.html \ helper.html \ index.html \ - lspmap.png \ - oddlsp.png \ oggstream.html \ programming.html \ squarepolar.png \ @@ -27,16 +24,12 @@ static_docs = \ v-comment.html \ vorbis-clip.txt \ vorbis-errors.txt \ - vorbis-fidelity.html \ - vorbis.html \ - vorbisword2.png \ - wait.png \ - white-ogg.png \ - white-xifish.png - -### FIXME: bits needed by the spec which lives in xml + vorbis-fidelity.html + +# bits needed by the spec SPEC_PNG = \ components.png \ + fish_xiph_org.png \ floor1-1.png \ floor1-2.png \ floor1-3.png \ @@ -45,85 +38,59 @@ SPEC_PNG = \ hufftree-under.png \ residue-pack.png \ residue2.png \ - white-xifish.png \ window1.png \ window2.png -SPEC_PDF = xifish.pdf - -# FIXME: also needed here -# white-xifish.png -built_docs = Vorbis_I_spec.html Vorbis_I_spec.pdf +SPEC_TEX = \ + Vorbis_I_spec.tex \ + 01-introduction.tex \ + 02-bitpacking.tex \ + 03-codebook.tex \ + 04-codec.tex \ + 05-comment.tex \ + 06-floor0.tex \ + 07-floor1.tex \ + 08-residue.tex \ + 09-helper.tex \ + 10-tables.tex \ + a1-encapsulation-ogg.tex \ + a2-encapsulation-rtp.tex \ + footer.tex + +built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css # conditionally make the generated documentation if BUILD_DOCS -doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs) +doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs) doxygen-build.stamp else -doc_DATA = $(static_docs) $(SPEC_PNG) +doc_DATA = $(static_docs) doxygen-build.stamp endif -EXTRA_DIST = $(static_docs) $(doc_sources) \ - $(SPEC_PNG) $(SPEC_PDF) $(built_docs) - -doc_sources = xml/Vorbis_I_spec.xml \ - xml/01-introduction.xml \ - xml/02-bitpacking.xml \ - xml/03-codebook.xml \ - xml/04-codec.xml \ - xml/05-comment.xml \ - xml/06-floor0.xml \ - xml/07-floor1.xml \ - xml/08-residue.xml \ - xml/09-helper.xml \ - xml/10-tables.xml \ - xml/TODO \ - xml/a1-encapsulation_ogg.xml \ - xml/a2-encapsulation_rtp.xml \ - xml/footer.xml \ - xml/spec-common.xsl \ - xml/spec-fo.xsl \ - xml/spec-html.xsl +EXTRA_DIST = $(static_docs) $(built_docs) \ + $(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg Doxyfile.in # these are expensive; only remove if we have to +MAINTAINERCLEANFILES = $(built_docs) +CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \ + Vorbis_I_spec.4ct Vorbis_I_spec.4tc \ + Vorbis_I_spec.dvi Vorbis_I_spec.idv \ + Vorbis_I_spec.lg Vorbis_I_spec.log \ + Vorbis_I_spec.out Vorbis_I_spec.tmp \ + Vorbis_I_spec.toc Vorbis_I_spec.xref \ + Vorbis_I_spec*.png \ + zzVorbis_I_spec.ps DISTCLEANFILES = $(built_docs) -CLEANFILES = Vorbis_I_spec.fo spec.aux spec.log spec.out - -# rules for temporary build dir for spec -BUILDDIR = build -# how to copy images to build dir -SPEC_PNG_BUILD = $(foreach file, $(SPEC_PNG), $(BUILDDIR)/$(file)) -SPEC_PDF_BUILD = $(foreach file, $(SPEC_PDF), $(BUILDDIR)/$(file)) -$(BUILDDIR)/%: $(srcdir)/% - @echo "Copying $< to $@" - @mkdir -p $(BUILDDIR) - @cp $< $@ - -# how to copy the xml to build dir; cheat by only targeting the main one -$(BUILDDIR)/Vorbis_I_spec.xml: $(doc_sources) - @mkdir -p $(BUILDDIR) - @for file in $(doc_sources); do cp $(srcdir)/$$file $(BUILDDIR); done -# translate the draft rtp.txt to .xml in the BUILDDIR -$(BUILDDIR)/draft-rtp.xml: draft-ietf-avt-rtp-vorbis-05.txt - cat $< | sed 's/ //g' > $@ -# cat $< | sed 's/ //g' | sed 's//\>/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 $@ .. - -Vorbis_I_spec.fo: $(BUILDDIR)/Vorbis_I_spec.xml - cd build; xsltproc --xinclude --output $@ spec-fo.xsl Vorbis_I_spec.xml && mv $@ .. - -# we add the two newlines to pdfxmltex because this entire XML -# toolchain is built from wishful thinking and bonghits and the -# default supplied passivetex config files are buggy. -Vorbis_I_spec.pdf: Vorbis_I_spec.fo $(SPEC_PNG_BUILD) $(SPEC_PDF_BUILD) - cp $< build/spec.fo # work around a passivetex bug - -cd build; echo -e -n "\n\n" | pdfxmltex spec.fo - -cd build; echo -e -n "\n\n" | pdfxmltex spec.fo - rm build/spec.fo - mv build/spec.pdf $@ +Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_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 @@ -134,6 +101,35 @@ NO_DOCS_ERROR: @echo endif -# clean up build dir +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: - -$(RM) -r $(BUILDDIR) + if test -d vorbis; then rm -rf vorbis; fi + if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi + +