File: Makefile.am

package info (click to toggle)
xapian-core 1.4.29-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,840 kB
  • sloc: cpp: 92,356; ansic: 9,948; sh: 5,026; perl: 850; makefile: 509; javascript: 360; tcl: 319; python: 40
file content (152 lines) | stat: -rw-r--r-- 5,389 bytes parent folder | download | duplicates (3)
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
150
151
152
## Process this file with automake to produce Makefile.in

if MAINTAINER_MODE
# Export these so that we run the locally installed autotools when building
# from a bootstrapped git tree.
export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
endif

# Note: we don't want dist tarballs built with docs missing, so for simplicity
# this Makefile.am blindly assumes the tools are in place when "make dist" is
# being run.  For "make all", "make check", etc we carefully skip any docs
# which we don't have the tools to generate.

RSTDOCS = \
	admin_notes.rst \
	bm25.rst \
	collapsing.rst \
	deprecation.rst \
	facets.rst \
	geospatial.rst \
	glossary.rst \
	index.rst \
	install.rst \
	internals.rst \
	intro_ir.rst \
	matcherdesign.rst \
	overview.rst \
	postingsource.rst \
	queryparser.rst \
	remote.rst \
	replication.rst \
	scalability.rst \
	serialisation.rst \
	sorting.rst \
	spelling.rst \
	stemming.rst \
	synonyms.rst \
	termgenerator.rst \
	tests.rst \
	valueranges.rst

RSTHTML = $(RSTDOCS:.rst=.html)

# Files which should be put in the distribution by automake
EXTRA_DIST = doxygen_api.conf.in doxygen_source.conf.in \
	doxygen_api_header.html_tmpl doxygen_api_footer.html_tmpl \
	doxygen_source_header.html_tmpl doxygen_source_footer.html_tmpl \
	$(RSTDOCS) $(HTMLDOCS) $(RSTHTML)

# Other files which should be distributed
dist-hook: doxygen_api_docs
	$(MKDIR_P) '$(distdir)/apidoc/html'
	for e in png css html js ; do \
	  test "`echo $(srcdir)/apidoc/html/*.$$e`" = "$(srcdir)/apidoc/html/*.$$e" || \
	    cp -p $(srcdir)/apidoc/html/*.$$e $(distdir)/apidoc/html ;\
	  test "`echo apidoc/html/*.$$e`" = "apidoc/html/*.$$e" || \
	    cp -p apidoc/html/*.$$e $(distdir)/apidoc/html ;\
	done

# Disable these rules if configured with --enable-maintainer-mode and
# --disable-documentation so that "make install" works in this case.
if !MAINTAINER_NO_DOCS
doc_DATA = $(HTMLDOCS) $(RSTHTML)

install-data-local: doxygen_api_docs
	$(mkinstalldirs) $(DESTDIR)$(docdir)/apidoc/html
	$(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.png $(DESTDIR)$(docdir)/apidoc/html
	$(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.css $(DESTDIR)$(docdir)/apidoc/html
	$(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.html $(DESTDIR)$(docdir)/apidoc/html
	$(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.js $(DESTDIR)$(docdir)/apidoc/html
endif

###############################
# How to clean up local files #
###############################

maintainer-clean-local:
	rm -rf apidoc sourcedoc

################################
# How to uninstall local files #
################################
uninstall-local:
	rm -rf $(DESTDIR)$(docdir)/apidoc

MAINTAINERCLEANFILES = doxygen_api.conf doxygen_source.conf \
	apidoc.pdf \
	$(RSTHTML)

.PHONY: doxygen_source_docs doxygen_api_docs doxygen_docs

doxygen_source_docs: sourcedoc/html/index.html
doxygen_api_docs: apidoc/html/index.html
doxygen_docs: doxygen_source_docs doxygen_api_docs

if DOCUMENTATION_RULES
# Build API docs with doxygen
all-local: doxygen_api_docs

# We use $T instead of $(top_srcdir) in APIDOC_SRC and SOURCEDOC_SRC to keep
# their sizes down.
T=$(top_srcdir)

# docsource.mk is generated by preautoreconf, run by bootstrap prior to
# it running autoreconf.
include docsource.mk

APIDOC_DEPS = $(APIDOC_SRC) doxygen_api.conf \
		$(srcdir)/doxygen_api_header.html_tmpl \
		$(srcdir)/doxygen_api_footer.html_tmpl

apidoc/html/index.html: $(APIDOC_DEPS)
	rm -rf apidoc doxygen_api_html.conf.tmp
	## Use a temporary file to work around doxygen 1.8.19 bug which
	## truncates a config file read from stdin to 4096 bytes.
	sed 's/^\(GENERATE_HTML\)\>.*/\1 = YES/;s/^\(GENERATE_LATEX\)\>.*/\1 = NO/' doxygen_api.conf > doxygen_api_html.conf.tmp
	top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)' $(DOXYGEN) doxygen_api_html.conf.tmp
	rm -f doxygen_api_html.conf.tmp
	## Regression test - 1.0.17 failed to generate docs from error.h in a
	## VPATH build.
	test -f apidoc/html/classXapian_1_1RuntimeError.html || \
	  ( echo "No api docs for Xapian::RuntimeError" ; \
	    rm apidoc/html/index.html ; exit 1 )
	if test "x$(PNGCRUSH)" != x ; then \
	  for png in apidoc/html/*.png ; do \
	    $(PNGCRUSH) -q "$$png" "$${png}T" && mv "$${png}T" "$$png" ; \
	  done \
	fi
	touch apidoc/html/index.html

# Not built by default, but available in case users want to build it for
# themselves.
apidoc.pdf: $(APIDOC_DEPS)
	rm -f doxygen_api_pdf.conf.tmp
	## Use a temporary file to work around doxygen 1.8.19 bug which
	## truncates a config file read from stdin to 4096 bytes.
	sed 's/^\(GENERATE_HTML\)\>.*/\1 = NO/;s/^\(GENERATE_LATEX\)\>.*/\1 = YES/' doxygen_api.conf > doxygen_api_pdf.conf.tmp
	top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)' $(DOXYGEN) doxygen_api_pdf.conf.tmp
	rm -f doxygen_api_pdf.conf.tmp
	cd apidoc/latex && (pool_size=750000 $(MAKE) refman.pdf||(cat refman.log;exit 1))
	mv apidoc/latex/refman.pdf apidoc.pdf

sourcedoc/html/index.html: $(SOURCEDOC_SRC) $(APIDOC_SRC) \
		doxygen_source.conf \
		$(srcdir)/doxygen_source_header.html_tmpl \
		$(srcdir)/doxygen_source_footer.html_tmpl
	rm -rf sourcedoc
	top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)' $(DOXYGEN) doxygen_source.conf

.rst.html:
	$(RST2HTML) --math-output=HTML --exit-status=warning $< $@
endif