]> git.tdb.fi Git - ext/vorbisfile.git/blob - doc/Makefile.am
Add headers to the library component so dependencies work correctly
[ext/vorbisfile.git] / doc / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 SUBDIRS = libvorbis vorbisfile vorbisenc
4
5 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
6
7 ### all of the static docs, commited to SVN and included as is
8 static_docs = \
9         rfc5215.xml \
10         rfc5215.txt \
11         eightphase.png \
12         fish_xiph_org.png \
13         floor1_inverse_dB_table.html \
14         floorval.png \
15         fourphase.png \
16         framing.html \
17         helper.html \
18         index.html \
19         oggstream.html \
20         programming.html \
21         squarepolar.png \
22         stereo.html \
23         stream.png \
24         v-comment.html \
25         vorbis-clip.txt \
26         vorbis-errors.txt \
27         vorbis-fidelity.html
28
29 # bits needed by the spec
30 SPEC_TEX = \
31         Vorbis_I_spec.tex \
32         01-introduction.tex \
33         02-bitpacking.tex \
34         03-codebook.tex \
35         04-codec.tex   \
36         05-comment.tex \
37         06-floor0.tex  \
38         07-floor1.tex  \
39         08-residue.tex \
40         09-helper.tex  \
41         10-tables.tex  \
42         a1-encapsulation-ogg.tex \
43         a2-encapsulation-rtp.tex \
44         footer.tex
45
46 SPEC_PNG = \
47         components.png \
48         floor1-1.png \
49         floor1-2.png \
50         floor1-3.png \
51         floor1-4.png \
52         hufftree.png \
53         hufftree-under.png \
54         residue-pack.png \
55         residue2.png \
56         window1.png \
57         window2.png
58
59 # Figure images generated by htlatex
60 built_SPEC_PNG = \
61         Vorbis_I_spec0x.png \
62         Vorbis_I_spec1x.png \
63         Vorbis_I_spec2x.png \
64         Vorbis_I_spec3x.png \
65         Vorbis_I_spec4x.png \
66         Vorbis_I_spec5x.png \
67         Vorbis_I_spec6x.png \
68         Vorbis_I_spec7x.png \
69         Vorbis_I_spec8x.png \
70         Vorbis_I_spec9x.png \
71         Vorbis_I_spec10x.png \
72         Vorbis_I_spec11x.png \
73         Vorbis_I_spec12x.png \
74         Vorbis_I_spec13x.png \
75         Vorbis_I_spec14x.png
76
77
78 built_docs = Vorbis_I_spec.pdf \
79              Vorbis_I_spec.html Vorbis_I_spec.css $(built_SPEC_PNG)
80
81 # conditionally make the generated documentation
82 if BUILD_DOCS
83 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs) doxygen-build.stamp
84 else
85 doc_DATA = $(static_docs) doxygen-build.stamp
86 endif
87
88 EXTRA_DIST = $(static_docs) $(built_docs) \
89         $(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg Doxyfile.in
90
91 # these are expensive; only remove if we have to
92 MAINTAINERCLEANFILES = $(built_docs)
93 CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
94              Vorbis_I_spec.4ct Vorbis_I_spec.4tc \
95              Vorbis_I_spec.dvi Vorbis_I_spec.idv \
96              Vorbis_I_spec.lg  Vorbis_I_spec.log \
97              Vorbis_I_spec.out Vorbis_I_spec.tmp \
98              Vorbis_I_spec.toc Vorbis_I_spec.xref \
99              Vorbis_I_spec.out.ps \
100              zzVorbis_I_spec.ps
101
102 # explicit rules for generating docs
103 if BUILD_DOCS
104 Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_PNG) fish_xiph_org.png
105         htlatex $<
106
107 Vorbis_I_spec.pdf: $(SPEC_TEX) $(SPEC_PNG)
108         pdflatex $<
109         pdflatex $<
110         pdflatex $<
111 else
112 Vorbis_I_spec.html: NO_DOCS_ERROR
113 Vorbis_I_spec.pdf: NO_DOCS_ERROR
114 NO_DOCS_ERROR:
115         @echo
116         @echo "*** Documentation has not been built! ***"
117         @echo "Try re-running after passing --enable-docs to configure."
118         @echo
119 endif
120
121 if HAVE_DOXYGEN
122 doxygen-build.stamp: Doxyfile $(top_srcdir)/include/vorbis/*.h
123         doxygen
124         touch doxygen-build.stamp
125 else
126 doxygen-build.stamp:
127         echo "*** Warning: Documentation build is disabled."
128         touch doxygen-build.stamp
129 endif
130
131 install-data-local: doxygen-build.stamp
132         $(mkinstalldirs) $(DESTDIR)$(docdir)
133         if test -d vorbis; then \
134           for dir in vorbis/*; do \
135             if test -d $$dir; then \
136               b=`basename $$dir`; \
137               $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
138               for f in $$dir/*; do \
139                 $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
140               done \
141             fi \
142           done \
143         fi
144
145 uninstall-local:
146         rm -rf $(DESTDIR)$(docdir)
147
148 clean-local:
149         if test -d vorbis; then rm -rf vorbis; fi
150         if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
151
152