1 ## Process this with automake to create Makefile.in
3 SUBDIRS = vorbisfile vorbisenc
5 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
7 ### all of the static docs, commited to SVN and included as is
9 draft-ietf-avt-rtp-vorbis-07.xml \
10 draft-ietf-avt-rtp-vorbis-07.txt \
13 floor1_inverse_dB_table.html \
29 vorbis-fidelity.html \
36 ### FIXME: bits needed by the spec which lives in xml
52 # FIXME: also needed here
55 built_docs = Vorbis_I_spec.html Vorbis_I_spec.pdf
57 # conditionally make the generated documentation
59 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs)
61 doc_DATA = $(static_docs) $(SPEC_PNG)
64 EXTRA_DIST = $(static_docs) $(doc_sources) \
65 $(SPEC_PNG) $(SPEC_PDF) $(built_docs)
67 doc_sources = xml/Vorbis_I_spec.xml \
68 xml/01-introduction.xml \
69 xml/02-bitpacking.xml \
78 xml/a1-encapsulation_ogg.xml \
79 xml/a2-encapsulation_rtp.xml \
85 # these are expensive; only remove if we have to
86 DISTCLEANFILES = $(built_docs)
87 CLEANFILES = Vorbis_I_spec.fo spec.aux spec.log spec.out
89 # rules for temporary build dir for spec
91 # how to copy images to build dir
92 SPEC_PNG_BUILD = $(foreach file, $(SPEC_PNG), $(BUILDDIR)/$(file))
93 SPEC_PDF_BUILD = $(foreach file, $(SPEC_PDF), $(BUILDDIR)/$(file))
94 $(BUILDDIR)/%: $(srcdir)/%
95 @echo "Copying $< to $@"
99 # how to copy the xml to build dir; cheat by only targeting the main one
100 $(BUILDDIR)/Vorbis_I_spec.xml: $(doc_sources)
101 @mkdir -p $(BUILDDIR)
102 @for file in $(doc_sources); do cp $(srcdir)/$$file $(BUILDDIR); done
103 # translate the draft rtp.txt to .xml in the BUILDDIR
104 $(BUILDDIR)/draft-rtp.xml: draft-ietf-avt-rtp-vorbis-05.txt
105 cat $< | sed 's/
\f//g' > $@
106 # cat $< | sed 's/
\f//g' | sed 's/</\</g' | sed 's/>/\>/g' > $@
108 # explicit rules for generating docs
110 Vorbis_I_spec.html: $(SPEC_PNG_BUILD) $(BUILDDIR)/Vorbis_I_spec.xml
111 cd build; xsltproc --xinclude --output Vorbis_I_spec.html spec-html.xsl Vorbis_I_spec.xml && mv $@ ..
113 Vorbis_I_spec.fo: $(BUILDDIR)/Vorbis_I_spec.xml
114 cd build; xsltproc --xinclude --output $@ spec-fo.xsl Vorbis_I_spec.xml && mv $@ ..
116 # we add the two newlines to pdfxmltex because this entire XML
117 # toolchain is built from wishful thinking and bonghits and the
118 # default supplied passivetex config files are buggy.
119 Vorbis_I_spec.pdf: Vorbis_I_spec.fo $(SPEC_PNG_BUILD) $(SPEC_PDF_BUILD)
120 cp $< build/spec.fo # work around a passivetex bug
121 -cd build; echo -e -n "\n\n" | pdfxmltex spec.fo
122 -cd build; echo -e -n "\n\n" | pdfxmltex spec.fo
126 Vorbis_I_spec.html: NO_DOCS_ERROR
127 Vorbis_I_spec.pdf: NO_DOCS_ERROR
130 @echo "*** Documentation has not been built! ***"
131 @echo "Try re-running after passing --enable-docs to configure."
137 -$(RM) -r $(BUILDDIR)