]> git.ipfire.org Git - collecty.git/blame - Makefile.am
Add disk plugin
[collecty.git] / Makefile.am
CommitLineData
2fc9f9a2
MT
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
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
31SUBDIRS = . po
32
33pythondir = $(pyexecdir)
34
c968f6d9
MT
35# Dirs of external packages
36dbuspolicydir=@dbuspolicydir@
37dbussystemservicedir=@dbussystemservicedir@
38
2fc9f9a2
MT
39CLEANFILES =
40DISTCLEANFILES =
41EXTRA_DIST =
42INSTALL_DIRS =
43noinst_DATA =
44
45@INTLTOOL_POLICY_RULE@
46
47.PHONY: update-po
48update-po:
49 $(MAKE) -C po update-po
50
51DISTCHECK_CONFIGURE_FLAGS = \
c968f6d9
MT
52 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
53 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2fc9f9a2
MT
54 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
55
56# ------------------------------------------------------------------------------
57
58AM_V_XSLT = $(AM_V_XSLT_$(V))
59AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
60AM_V_XSLT_0 = @echo " XSLT " $@;
61
62# ------------------------------------------------------------------------------
63
64dist_doc_DATA = \
65 COPYING
66
67# ------------------------------------------------------------------------------
68
69dist_bin_SCRIPTS = \
70 src/collectyd \
71 src/collecty-client
72
73collecty_PYTHON = \
74 src/collecty/__init__.py \
c968f6d9 75 src/collecty/bus.py \
2fc9f9a2
MT
76 src/collecty/client.py \
77 src/collecty/constants.py \
78 src/collecty/daemon.py \
79 src/collecty/errors.py \
80 src/collecty/i18n.py \
a76917bf 81 src/collecty/logger.py \
2fc9f9a2
MT
82 src/collecty/ping.py
83
84collectydir = $(pythondir)/collecty
85
86collectyplugins_PYTHON = \
87 src/collecty/plugins/base.py \
0ec1854a 88 src/collecty/plugins/conntrack.py \
2fc9f9a2 89 src/collecty/plugins/cpu.py \
30777a6c 90 src/collecty/plugins/disk.py \
2fc9f9a2
MT
91 src/collecty/plugins/entropy.py \
92 src/collecty/plugins/__init__.py \
93 src/collecty/plugins/interface.py \
94 src/collecty/plugins/latency.py \
95 src/collecty/plugins/loadavg.py \
96 src/collecty/plugins/memory.py
97
98collectypluginsdir = $(collectydir)/plugins
99
30777a6c
MT
100pkgpyexec_LTLIBRARIES = \
101 _collecty.la
102
103_collecty_la_SOURCES = \
104 src/_collectymodule.c
105
106_collecty_la_CFLAGS = \
107 $(AM_CFLAGS) \
108 $(LIBATASMART_CFLAGS) \
109 $(PYTHON_DEVEL_CFLAGS)
110
111_collecty_la_LDFLAGS = \
112 $(AM_LDFLAGS) \
113 -shared \
114 -module \
115 -avoid-version
116
117_collecty_la_LIBADD = \
118 $(LIBATASMART_LIBS) \
119 $(PYTHON_DEVEL_LIBS)
120
c968f6d9
MT
121dist_dbuspolicy_DATA = \
122 src/dbus/org.ipfire.collecty1.conf
123
124dist_dbussystemservice_DATA = \
125 src/dbus/org.ipfire.collecty1.service
126
127systemdsystemunit_DATA = \
128 src/systemd/collecty.service
129
130dist_systemdsystemunit_DATA = \
131 src/systemd/org.ipfire.collecty1.busname
132
133EXTRA_DIST += \
134 src/systemd/collecty.service.in
135
136CLEANFILES += \
137 src/systemd/collecty.service
138
2fc9f9a2
MT
139# ------------------------------------------------------------------------------
140
141if ENABLE_MANPAGES
142MANPAGES = \
143 man/collectyd.1
144
145MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
146MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
147
148man: $(MANPAGES) $(MANPAGES_HTML)
149
150man_MANS = \
151 $(MANPAGES)
152
153noinst_DATA += \
154 $(MANPAGES_HTML)
155
156CLEANFILES += \
157 $(man_MANS) \
158 $(MANPAGES_HTML)
159
160EXTRA_DIST += \
161 $(MANPAGES_XML) \
162 man/custom-html.xsl
163
164XSLTPROC_FLAGS = \
165 --nonet \
166 --stringparam man.output.quietly 1 \
167 --stringparam funcsynopsis.style ansi \
168 --stringparam man.th.extra1.suppress 1 \
169 --stringparam man.authors.section.enabled 1 \
170 --stringparam man.copyright.section.enabled 1
171
172XSLTPROC_COMMAND_MAN = \
173 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
174 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
175
176XSLTPROC_COMMAND_HTML = \
177 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
178
179man/%.1: man/%.xml
180 $(XSLTPROC_COMMAND_MAN)
181
182man/%.5: man/%.xml
183 $(XSLTPROC_COMMAND_MAN)
184
185man/%.html: man/%.xml man/custom-html.xsl
186 $(XSLTPROC_COMMAND_HTML)
187
188endif
189
190# ------------------------------------------------------------------------------
191
2fc9f9a2
MT
192substitutions = \
193 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
194 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
195 '|configsdir=$(configsdir)|' \
196 '|bindir=$(bindir)|'
197
198SED_PROCESS = \
199 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
200 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
201 < $< > $@
202
203src/systemd/%: src/systemd/%.in Makefile
204 $(SED_PROCESS)