]>
Commit | Line | Data |
---|---|---|
1 | ############################################################################### | |
2 | # # | |
3 | # collecty - The IPFire statictics collection daemon # | |
4 | # Copyright (C) 2015 collecty development team # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | |
22 | AM_MAKEFLAGS = --no-print-directory | |
23 | AUTOMAKE_OPTIONS = color-tests | |
24 | ||
25 | # remove target it the command fails | |
26 | .DELETE_ON_ERROR: | |
27 | ||
28 | # keep itermediate files | |
29 | .SECONDARY: | |
30 | ||
31 | SUBDIRS = . po | |
32 | ||
33 | pythondir = $(pyexecdir) | |
34 | ||
35 | # Dirs of external packages | |
36 | dbuspolicydir=@dbuspolicydir@ | |
37 | dbussystemservicedir=@dbussystemservicedir@ | |
38 | ||
39 | CLEANFILES = | |
40 | DISTCLEANFILES = | |
41 | EXTRA_DIST = | |
42 | INSTALL_DIRS = | |
43 | noinst_DATA = | |
44 | ||
45 | @INTLTOOL_POLICY_RULE@ | |
46 | ||
47 | .PHONY: update-po | |
48 | update-po: po/POTFILES.in | |
49 | $(MAKE) -C po update-po | |
50 | ||
51 | po/POTFILES.in: Makefile | |
52 | find $(abs_srcdir)/src | \ | |
53 | grep -E "\.(in|py)$$" | sed -e "s@$(abs_srcdir)/@@g" | sort > $@ | |
54 | ||
55 | DISTCHECK_CONFIGURE_FLAGS = \ | |
56 | --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \ | |
57 | --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \ | |
58 | --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) | |
59 | ||
60 | # ------------------------------------------------------------------------------ | |
61 | ||
62 | AM_V_XSLT = $(AM_V_XSLT_$(V)) | |
63 | AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) | |
64 | AM_V_XSLT_0 = @echo " XSLT " $@; | |
65 | ||
66 | # ------------------------------------------------------------------------------ | |
67 | ||
68 | dist_doc_DATA = \ | |
69 | COPYING | |
70 | ||
71 | # ------------------------------------------------------------------------------ | |
72 | ||
73 | dist_bin_SCRIPTS = \ | |
74 | src/scripts/collecty | |
75 | ||
76 | dist_sbin_SCRIPTS = \ | |
77 | src/scripts/collectyd | |
78 | ||
79 | collecty_PYTHON = \ | |
80 | src/collecty/__init__.py \ | |
81 | src/collecty/__version__.py \ | |
82 | src/collecty/bus.py \ | |
83 | src/collecty/client.py \ | |
84 | src/collecty/colours.py \ | |
85 | src/collecty/constants.py \ | |
86 | src/collecty/daemon.py \ | |
87 | src/collecty/errors.py \ | |
88 | src/collecty/i18n.py \ | |
89 | src/collecty/logger.py \ | |
90 | src/collecty/util.py | |
91 | ||
92 | collectydir = $(pythondir)/collecty | |
93 | ||
94 | collectyplugins_PYTHON = \ | |
95 | src/collecty/plugins/base.py \ | |
96 | src/collecty/plugins/contextswitches.py \ | |
97 | src/collecty/plugins/conntrack.py \ | |
98 | src/collecty/plugins/cpufreq.py \ | |
99 | src/collecty/plugins/df.py \ | |
100 | src/collecty/plugins/disk.py \ | |
101 | src/collecty/plugins/__init__.py \ | |
102 | src/collecty/plugins/interface.py \ | |
103 | src/collecty/plugins/interrupts.py \ | |
104 | src/collecty/plugins/ipfrag.py \ | |
105 | src/collecty/plugins/latency.py \ | |
106 | src/collecty/plugins/loadavg.py \ | |
107 | src/collecty/plugins/memory.py \ | |
108 | src/collecty/plugins/psi.py \ | |
109 | src/collecty/plugins/processor.py \ | |
110 | src/collecty/plugins/sensors.py | |
111 | ||
112 | collectypluginsdir = $(collectydir)/plugins | |
113 | ||
114 | pkgpyexec_LTLIBRARIES = \ | |
115 | _collecty.la | |
116 | ||
117 | _collecty_la_SOURCES = \ | |
118 | src/_collecty/_collectymodule.c \ | |
119 | src/_collecty/_collectymodule.h \ | |
120 | src/_collecty/blockdev.c \ | |
121 | src/_collecty/ping.c \ | |
122 | src/_collecty/sensors.c \ | |
123 | src/_collecty/utils.c | |
124 | ||
125 | _collecty_la_CFLAGS = \ | |
126 | $(AM_CFLAGS) \ | |
127 | $(LIBATASMART_CFLAGS) \ | |
128 | $(OPING_CFLAGS) \ | |
129 | $(PYTHON_CFLAGS) | |
130 | ||
131 | _collecty_la_LDFLAGS = \ | |
132 | $(AM_LDFLAGS) \ | |
133 | -shared \ | |
134 | -module \ | |
135 | -avoid-version | |
136 | ||
137 | _collecty_la_LIBADD = \ | |
138 | $(LIBATASMART_LIBS) \ | |
139 | $(OPING_LIBS) \ | |
140 | $(PYTHON_LIBS) \ | |
141 | $(SENSORS_LIBS) | |
142 | ||
143 | dist_dbuspolicy_DATA = \ | |
144 | src/dbus/org.ipfire.collecty1.conf | |
145 | ||
146 | dist_dbussystemservice_DATA = \ | |
147 | src/dbus/org.ipfire.collecty1.service | |
148 | ||
149 | systemdsystemunit_DATA = \ | |
150 | src/systemd/collecty.service | |
151 | ||
152 | dist_systemdsystemunit_DATA = \ | |
153 | src/systemd/org.ipfire.collecty1.busname | |
154 | ||
155 | EXTRA_DIST += \ | |
156 | src/systemd/collecty.service.in | |
157 | ||
158 | CLEANFILES += \ | |
159 | src/systemd/collecty.service | |
160 | ||
161 | # ------------------------------------------------------------------------------ | |
162 | ||
163 | .PHONY: man | |
164 | man: $(MANPAGES) $(MANPAGES_HTML) | |
165 | ||
166 | if ENABLE_MANPAGES | |
167 | MANPAGES = \ | |
168 | man/collectyd.1 | |
169 | ||
170 | MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) | |
171 | MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) | |
172 | ||
173 | man_MANS = \ | |
174 | $(MANPAGES) | |
175 | ||
176 | noinst_DATA += \ | |
177 | $(MANPAGES_HTML) | |
178 | ||
179 | CLEANFILES += \ | |
180 | $(man_MANS) \ | |
181 | $(MANPAGES_HTML) | |
182 | ||
183 | EXTRA_DIST += \ | |
184 | $(MANPAGES_XML) \ | |
185 | man/custom-html.xsl | |
186 | ||
187 | XSLTPROC_FLAGS = \ | |
188 | --nonet \ | |
189 | --stringparam man.output.quietly 1 \ | |
190 | --stringparam funcsynopsis.style ansi \ | |
191 | --stringparam man.th.extra1.suppress 1 \ | |
192 | --stringparam man.authors.section.enabled 1 \ | |
193 | --stringparam man.copyright.section.enabled 1 | |
194 | ||
195 | XSLTPROC_COMMAND_MAN = \ | |
196 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
197 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
198 | ||
199 | XSLTPROC_COMMAND_HTML = \ | |
200 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< | |
201 | ||
202 | man/%.1: man/%.xml | |
203 | $(XSLTPROC_COMMAND_MAN) | |
204 | ||
205 | man/%.5: man/%.xml | |
206 | $(XSLTPROC_COMMAND_MAN) | |
207 | ||
208 | man/%.html: man/%.xml man/custom-html.xsl | |
209 | $(XSLTPROC_COMMAND_HTML) | |
210 | ||
211 | endif | |
212 | ||
213 | # ------------------------------------------------------------------------------ | |
214 | ||
215 | substitutions = \ | |
216 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
217 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
218 | '|configsdir=$(configsdir)|' \ | |
219 | '|bindir=$(bindir)|' \ | |
220 | '|sbindir=$(sbindir)|' | |
221 | ||
222 | SED_PROCESS = \ | |
223 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
224 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
225 | < $< > $@ | |
226 | ||
227 | src/systemd/%: src/systemd/%.in Makefile | |
228 | $(SED_PROCESS) |