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-kerr-avt-vorbis-rtp-03.txt \
12 floor1_inverse_dB_table.html \
28 vorbis-fidelity.html \
35 ### FIXME: bits needed by the spec which lives in xml
51 # FIXME: also needed here
54 built_docs = Vorbis_I_spec.html Vorbis_I_spec.pdf
56 # conditionally make the generated documentation
58 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs)
60 doc_DATA = $(static_docs) $(SPEC_PNG)
63 EXTRA_DIST = $(static_docs) $(doc_sources) $(SPEC_PNG) $(SPEC_PDF)
65 doc_sources = xml/Vorbis_I_spec.xml \
66 xml/01-introduction.xml \
67 xml/02-bitpacking.xml \
76 xml/a1-encapsulation_ogg.xml \
77 xml/a2-encapsulation_rtp.xml \
83 # these are expensive; only remove if we have to
84 DISTCLEANFILES = $(built_docs)
85 CLEANFILES = Vorbis_I_spec.fo spec.aux spec.log spec.out
87 # rules for temporary build dir for spec
89 # how to copy images to build dir
90 SPEC_PNG_BUILD = $(foreach file, $(SPEC_PNG), $(BUILDDIR)/$(file))
91 SPEC_PDF_BUILD = $(foreach file, $(SPEC_PDF), $(BUILDDIR)/$(file))
92 $(BUILDDIR)/%: $(srcdir)/%
93 @echo "Copying $< to $@"
97 # how to copy the xml to build dir; cheat by only targeting the main one
98 $(BUILDDIR)/Vorbis_I_spec.xml: $(doc_sources)
100 @for file in $(doc_sources); do cp $(srcdir)/$$file $(BUILDDIR); done
101 # translate the draft rtp.txt to .xml in the BUILDDIR
102 $(BUILDDIR)/draft-rtp.xml: draft-kerr-avt-vorbis-rtp-03.txt
103 cat $< | sed 's/
\f//g' > $@
104 # cat $< | sed 's/
\f//g' | sed 's/</\</g' | sed 's/>/\>/g' > $@
106 # explicit rules for generating docs
107 Vorbis_I_spec.html: $(SPEC_PNG_BUILD) $(BUILDDIR)/Vorbis_I_spec.xml
108 cd build; xsltproc --xinclude --output Vorbis_I_spec.html spec-html.xsl Vorbis_I_spec.xml && mv $@ ..
110 Vorbis_I_spec.fo: $(BUILDDIR)/Vorbis_I_spec.xml
111 cd build; xsltproc --xinclude --output $@ spec-fo.xsl Vorbis_I_spec.xml && mv $@ ..
113 Vorbis_I_spec.pdf: Vorbis_I_spec.fo $(SPEC_PNG_BUILD) $(SPEC_PDF_BUILD)
114 cp $< build/spec.fo # work around a passivetex bug
115 cd build; pdfxmltex --interaction nonstopmode spec.fo
116 cd build; pdfxmltex --interaction nonstopmode spec.fo
122 -$(RM) -r $(BUILDDIR)