summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: a98c4d83f2662afb2e99768610a3597853037539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
## Process this with automake to create Makefile.in

SUBDIRS = libvorbis vorbisfile vorbisenc

docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)

### all of the static docs, commited to SVN and included as is
static_docs = \
	rfc5215.xml \
	rfc5215.txt \
	eightphase.png \
	fish_xiph_org.png \
	floor1_inverse_dB_table.html \
	floorval.png \
	fourphase.png \
	framing.html \
	helper.html \
	index.html \
	oggstream.html \
	programming.html \
	squarepolar.png \
	stereo.html \
	stream.png \
	v-comment.html \
	vorbis-clip.txt \
	vorbis-errors.txt \
	vorbis-fidelity.html

# bits needed by the spec
SPEC_PNG = \
	components.png \
	floor1-1.png \
	floor1-2.png \
	floor1-3.png \
	floor1-4.png \
	hufftree.png \
	hufftree-under.png \
	residue-pack.png \
	residue2.png \
	window1.png \
	window2.png \
	Vorbis_I_spec0x.png \
	Vorbis_I_spec1x.png \
	Vorbis_I_spec2x.png \
	Vorbis_I_spec3x.png \
	Vorbis_I_spec4x.png \
	Vorbis_I_spec5x.png \
	Vorbis_I_spec6x.png \
	Vorbis_I_spec7x.png \
	Vorbis_I_spec8x.png \
	Vorbis_I_spec9x.png \
	Vorbis_I_spec10x.png \
	Vorbis_I_spec11x.png \
	Vorbis_I_spec12x.png \
	Vorbis_I_spec13x.png \
	Vorbis_I_spec14x.png

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) doxygen-build.stamp
else
doc_DATA = $(static_docs) doxygen-build.stamp
endif

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.out.ps \
	     zzVorbis_I_spec.ps
DISTCLEANFILES = $(built_docs)


# explicit rules for generating docs
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