forked from ctools/ctools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
274 lines (232 loc) · 6.48 KB
/
Makefile.am
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
## Process this file with automake to produce Makefile.in
# Include M4 macros
ACLOCAL_AMFLAGS = -I m4
# Subdirectories
SUBDIRS = src pyext test caldb models examples scripts
# Pkgconfig directory
pkgconfigdir = $(libdir)/pkgconfig
# Files to install in Pkgconfig directory
pkgconfig_DATA = ctools.pc
# Manual pages to install
man_MANS =
# Architecture independent data files installed in the package's doc directory
doc_DATA = \
AUTHORS \
ChangeLog \
COPYING \
INSTALL \
NEWS \
README
docdir = ${datadir}/doc/${PACKAGE}
install-data-local: $(HTML_INSTALL_DATA_TARGETS)
uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS)
#
# Additional rules
#
# Add static-analysis rule:
static-analysis: cppcheck sloccount cppncss
# Add dynamic-analysis rule:
dynamic-analysis: coverage valgrind
# Add cppcheck rule
cppcheck:
@if type cppcheck >/dev/null 2>&1; then \
cppcheck -v --enable=all --xml \
src 2> cppcheck-result.xml; \
else \
echo "cppcheck not found in PATH."; \
fi
# Add sloccount rule
sloccount:
@if type sloccount >/dev/null 2>&1; then \
sloccount --duplicates --wide --details \
src test > sloccount.sc; \
else \
echo "sloccount not found in PATH."; \
fi
# Add cppncss rule
cppncss:
@if type cppncss >/dev/null 2>&1; then \
cppncss -r -v -x -k -f=cppncss-raw-report.xml \
src inst/*/src; \
else \
echo "cppncss not found in PATH."; \
fi
# Add coverage rule
coverage:
@if type gcovr >/dev/null 2>&1; then \
gcovr -r . -x -o gcovr-reports-data.xml; \
else \
echo "gcovr script not found in PATH."; \
fi
# Add Valgrind rule
valgrind:
@if type valgrind >/dev/null 2>&1; then \
$(MAKE) -C test valgrind; \
else \
echo "valgrind not found in PATH."; \
fi
# Add Sphinx rule
sphinx:
@if type sphinx-build >/dev/null 2>&1; then \
sphinx-build -b html doc/source doc/html; \
else \
echo "sphinx-build not found in PATH."; \
fi
# Install Sphinx files
sphinx-install:
@if test -f $(srcdir)/doc/html/index.html ; then \
$(mkinstalldirs) $(DESTDIR)$(docdir)/html && \
for file in $(srcdir)/doc/html/*.* ; do \
echo "$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/html" ; \
$(INSTALL_DATA) "$$file" $(DESTDIR)$(docdir)/html ; \
done ; \
cp -r $(srcdir)/doc/html/_sources $(DESTDIR)$(docdir)/html/ ; \
cp -r $(srcdir)/doc/html/_static $(DESTDIR)$(docdir)/html/ ; \
fi
# Add documentation rule:
#doc: doxygen sphinx
# Non-Automake subdirectories to distribute
DISTDIRS = doc/html doc/html/images
dist-hook:
( \
builddir=`pwd` ; \
cd $(srcdir) && \
( \
for dir in $(DISTDIRS) ; do \
find $$dir -depth -print | egrep -v '(~$$)|(/CVS)|(/\.#)|(/\.deps)' \
| cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
done \
) \
)
# Add Doxygen rules
if DX_COND_doc
# HTML
if DX_COND_html
DX_CLEAN_HTML = @DX_DOCDIR@/html
endif #DX_COND_html
# CHI & CHI
if DX_COND_chm
DX_CLEAN_CHM = @DX_DOCDIR@/chm
if DX_COND_chi
DX_CLEAN_CHI = @DX_DOCDIR@/@[email protected]
endif #DX_COND_chi
endif #DX_COND_chm
# MAN
if DX_COND_man
DX_CLEAN_MAN = @DX_DOCDIR@/man
endif #DX_COND_man
# RTF
if DX_COND_rtf
DX_CLEAN_RTF = @DX_DOCDIR@/rtf
endif #DX_COND_rtf
# XML
if DX_COND_xml
DX_CLEAN_XML = @DX_DOCDIR@/xml
endif #DX_COND_xml
# PS
if DX_COND_ps
DX_CLEAN_PS = @DX_DOCDIR@/@[email protected]
DX_PS_GOAL = doxygen-ps
doxygen-ps: @DX_DOCDIR@/@[email protected]
@DX_DOCDIR@/@[email protected]: @DX_DOCDIR@/@[email protected]
cd @DX_DOCDIR@/latex; \
rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
$(DX_LATEX) refman.tex; \
$(MAKEINDEX_PATH) refman.idx; \
$(DX_LATEX) refman.tex; \
countdown=5; \
while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
refman.log > /dev/null 2>&1 \
&& test $$countdown -gt 0; do \
$(DX_LATEX) refman.tex; \
countdown=`expr $$countdown - 1`; \
done; \
$(DX_DVIPS) -o ../@[email protected] refman.dvi
endif #DX_COND_ps
# PDF
if DX_COND_pdf
DX_CLEAN_PDF = @DX_DOCDIR@/@[email protected]
DX_PDF_GOAL = doxygen-pdf
doxygen-pdf: @DX_DOCDIR@/@[email protected]
@DX_DOCDIR@/@[email protected]: @DX_DOCDIR@/@[email protected]
cd @DX_DOCDIR@/latex; \
rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
$(DX_PDFLATEX) refman.tex; \
$(DX_MAKEINDEX) refman.idx; \
$(DX_PDFLATEX) refman.tex; \
countdown=5; \
while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
refman.log > /dev/null 2>&1 \
&& test $$countdown -gt 0; do \
$(DX_PDFLATEX) refman.tex; \
countdown=`expr $$countdown - 1`; \
done; \
mv refman.pdf ../@[email protected]
endif #DX_COND_pdf
# LaTeX
if DX_COND_latex
DX_CLEAN_LATEX = @DX_DOCDIR@/latex
endif #DX_COND_latex
# Rules
#.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
doxygen-run: @DX_DOCDIR@/@[email protected]
# Make Doxygen files
doxygen: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
# Install Doxygen files
DOCDIRS = html/doxygen man/man3
doxygen-install:
$(mkinstalldirs) $(DESTDIR)$(docdir)
@for dir in $(DOCDIRS) ; do \
$(mkinstalldirs) $(DESTDIR)$(docdir)/$$dir && \
for file in $(srcdir)/doc/$$dir/*.* ; do \
echo "$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$dir" ; \
$(INSTALL_DATA) "$$file" $(DESTDIR)$(docdir)/$$dir ; \
done ; \
done
# Uninstall Doxygen files
doxygen-uninstall:
for dir in $(DOCDIRS) ; do \
rm -f -r $(DESTDIR)$(docdir)/$$dir ; \
done
@DX_DOCDIR@/@[email protected]: $(DX_CONFIG) $(pkginclude_HEADERS)
rm -rf @DX_DOCDIR@
$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
DX_CLEANFILES = \
@DX_DOCDIR@/@[email protected] \
-r \
$(DX_CLEAN_HTML) \
$(DX_CLEAN_CHM) \
$(DX_CLEAN_CHI) \
$(DX_CLEAN_MAN) \
$(DX_CLEAN_RTF) \
$(DX_CLEAN_XML) \
$(DX_CLEAN_PS) \
$(DX_CLEAN_PDF) \
$(DX_CLEAN_LATEX)
endif #DX_COND_doc
#
# Additional install rules
#
# Install HTML files
HTMLDIRS = html html/images
HTML_INSTALL_DATA_TARGETS = install-data-html
install-data-html:
$(mkinstalldirs) $(DESTDIR)$(docdir)
@for dir in $(HTMLDIRS) ; do \
$(mkinstalldirs) $(DESTDIR)$(docdir)/$$dir && \
for file in $(srcdir)/doc/$$dir/*.* ; do \
echo "$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$dir" ; \
$(INSTALL_DATA) "$$file" $(DESTDIR)$(docdir)/$$dir ; \
done ; \
done
# Uninstall HTML files
HTML_UNINSTALL_DATA_TARGETS = uninstall-data-html
uninstall-data-html:
for dir in $(HTMLDIRS) ; do \
rm -f -r $(DESTDIR)$(docdir)/$$dir ; \
done
# Automatically reconfigure libtool
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck