[TIVI-2848] Fix tethering configuration.
[profile/ivi/settings-daemon.git] / aminclude.am
1 # Copyright (C) 2004 Oren Ben-Kiki
2 # This file is distributed under the same terms as the Automake macro files.
3
4 # Generate automatic documentation using Doxygen. Goals and variables values
5 # are controlled by the various DX_COND_??? conditionals set by autoconf.
6 #
7 # The provided goals are:
8 # doc: Generate all doxygen documentation.
9 # doxygen-run: Run doxygen, which will generate some of the documentation
10 #              (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post
11 #              processing required for the rest of it (PS, PDF, and some MAN).
12 # doxygen-man: Rename some doxygen generated man pages.
13 # doxygen-ps: Generate doxygen PostScript documentation.
14 # doxygen-pdf: Generate doxygen PDF documentation.
15 #
16 # Note that by default these are not integrated into the automake goals. If
17 # doxygen is used to generate man pages, you can achieve this integration by
18 # setting man3_MANS to the list of man pages generated and then adding the
19 # dependency:
20 #
21 #   $(man3_MANS): doc
22 #
23 # This will cause make to run doxygen and generate all the documentation.
24 #
25 # The following variable is intended for use in Makefile.am:
26 #
27 # DX_CLEANFILES = everything to clean.
28 #
29 # This is usually added to MOSTLYCLEANFILES.
30
31 ## --------------------------------- ##
32 ## Format-independent Doxygen rules. ##
33 ## --------------------------------- ##
34
35 if DX_COND_doc
36
37 ## ------------------------------- ##
38 ## Rules specific for HTML output. ##
39 ## ------------------------------- ##
40
41 if DX_COND_html
42
43 DX_CLEAN_HTML = @DX_DOCDIR@/html
44
45 endif DX_COND_html
46
47 ## ------------------------------ ##
48 ## Rules specific for CHM output. ##
49 ## ------------------------------ ##
50
51 if DX_COND_chm
52
53 DX_CLEAN_CHM = @DX_DOCDIR@/chm
54
55 if DX_COND_chi
56
57 DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
58
59 endif DX_COND_chi
60
61 endif DX_COND_chm
62
63 ## ------------------------------ ##
64 ## Rules specific for MAN output. ##
65 ## ------------------------------ ##
66
67 if DX_COND_man
68
69 DX_CLEAN_MAN = @DX_DOCDIR@/man
70 DX_MANS = $(DX_CLEAN_MAN)/man3
71 man3_MANS = $(DX_MANS)/control.h.3 $(DX_MANS)/conversions.h.3 \
72         $(DX_MANS)/register.h.3 $(DX_MANS)/utils.h.3
73 $(man3_MANS): doc
74
75 endif DX_COND_man
76
77 ## ------------------------------ ##
78 ## Rules specific for RTF output. ##
79 ## ------------------------------ ##
80
81 if DX_COND_rtf
82
83 DX_CLEAN_RTF = @DX_DOCDIR@/rtf
84
85 endif DX_COND_rtf
86
87 ## ------------------------------ ##
88 ## Rules specific for XML output. ##
89 ## ------------------------------ ##
90
91 if DX_COND_xml
92
93 DX_CLEAN_XML = @DX_DOCDIR@/xml
94
95 endif DX_COND_xml
96
97 ## ----------------------------- ##
98 ## Rules specific for PS output. ##
99 ## ----------------------------- ##
100
101 if DX_COND_ps
102
103 DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
104
105 DX_PS_GOAL = doxygen-ps
106
107 doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
108
109 @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
110         cd @DX_DOCDIR@/latex; \
111         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
112         $(DX_LATEX) refman.tex; \
113         $(MAKEINDEX_PATH) refman.idx; \
114         $(DX_LATEX) refman.tex; \
115         countdown=5; \
116         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
117                           refman.log > /dev/null 2>&1 \
118            && test $$countdown -gt 0; do \
119             $(DX_LATEX) refman.tex; \
120             countdown=`expr $$countdown - 1`; \
121         done; \
122         $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
123
124 endif DX_COND_ps
125
126 ## ------------------------------ ##
127 ## Rules specific for PDF output. ##
128 ## ------------------------------ ##
129
130 if DX_COND_pdf
131
132 DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
133
134 DX_PDF_GOAL = doxygen-pdf
135
136 doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
137
138 @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
139         cd @DX_DOCDIR@/latex; \
140         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
141         $(DX_PDFLATEX) refman.tex; \
142         $(DX_MAKEINDEX) refman.idx; \
143         $(DX_PDFLATEX) refman.tex; \
144         countdown=5; \
145         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
146                           refman.log > /dev/null 2>&1 \
147            && test $$countdown -gt 0; do \
148             $(DX_PDFLATEX) refman.tex; \
149             countdown=`expr $$countdown - 1`; \
150         done; \
151         mv refman.pdf ../@PACKAGE@.pdf
152
153 endif DX_COND_pdf
154
155 ## ------------------------------------------------- ##
156 ## Rules specific for LaTeX (shared for PS and PDF). ##
157 ## ------------------------------------------------- ##
158
159 if DX_COND_latex
160
161 DX_CLEAN_LATEX = @DX_DOCDIR@/latex
162
163 endif DX_COND_latex
164
165 .PHONY: doxygen-run doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
166
167 .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
168
169 doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
170
171 doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
172
173 @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
174         rm -rf @DX_DOCDIR@
175         $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
176
177 DX_CLEANFILES = \
178         @DX_DOCDIR@/@PACKAGE@.tag \
179         -r $(DX_CLEAN_HTML) $(DX_CLEAN_CHM) $(DX_CLEAN_CHI) $(DX_CLEAN_MAN) \
180         $(DX_CLEAN_RTF) $(DX_CLEAN_XML) $(DX_CLEAN_PS) $(DX_CLEAN_PDF) \
181         $(DX_CLEAN_LATEX) $(DX_DOCDIR)
182
183 endif DX_COND_doc