]> git.ipfire.org Git - collecty.git/blob - Makefile.am
configure: Call python just python
[collecty.git] / Makefile.am
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:
49 $(MAKE) -C po update-po
50
51 DISTCHECK_CONFIGURE_FLAGS = \
52 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
53 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
54 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
55
56 # ------------------------------------------------------------------------------
57
58 AM_V_XSLT = $(AM_V_XSLT_$(V))
59 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
60 AM_V_XSLT_0 = @echo " XSLT " $@;
61
62 # ------------------------------------------------------------------------------
63
64 dist_doc_DATA = \
65 COPYING
66
67 # ------------------------------------------------------------------------------
68
69 dist_bin_SCRIPTS = \
70 src/collectyd \
71 src/collecty-client
72
73 collecty_PYTHON = \
74 src/collecty/__init__.py \
75 src/collecty/bus.py \
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 \
81 src/collecty/logger.py \
82 src/collecty/ping.py
83
84 collectydir = $(pythondir)/collecty
85
86 collectyplugins_PYTHON = \
87 src/collecty/plugins/base.py \
88 src/collecty/plugins/conntrack.py \
89 src/collecty/plugins/cpu.py \
90 src/collecty/plugins/disk.py \
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 src/collecty/plugins/sensors.py
98
99 collectypluginsdir = $(collectydir)/plugins
100
101 pkgpyexec_LTLIBRARIES = \
102 _collecty.la
103
104 _collecty_la_SOURCES = \
105 src/_collectymodule.c
106
107 _collecty_la_CFLAGS = \
108 $(AM_CFLAGS) \
109 $(LIBATASMART_CFLAGS) \
110 $(PYTHON_CFLAGS)
111
112 _collecty_la_LDFLAGS = \
113 $(AM_LDFLAGS) \
114 -shared \
115 -module \
116 -avoid-version
117
118 _collecty_la_LIBADD = \
119 $(LIBATASMART_LIBS) \
120 $(PYTHON_LIBS) \
121 $(SENSORS_LIBS)
122
123 dist_dbuspolicy_DATA = \
124 src/dbus/org.ipfire.collecty1.conf
125
126 dist_dbussystemservice_DATA = \
127 src/dbus/org.ipfire.collecty1.service
128
129 systemdsystemunit_DATA = \
130 src/systemd/collecty.service
131
132 dist_systemdsystemunit_DATA = \
133 src/systemd/org.ipfire.collecty1.busname
134
135 EXTRA_DIST += \
136 src/systemd/collecty.service.in
137
138 CLEANFILES += \
139 src/systemd/collecty.service
140
141 # ------------------------------------------------------------------------------
142
143 if ENABLE_MANPAGES
144 MANPAGES = \
145 man/collectyd.1
146
147 MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
148 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
149
150 man: $(MANPAGES) $(MANPAGES_HTML)
151
152 man_MANS = \
153 $(MANPAGES)
154
155 noinst_DATA += \
156 $(MANPAGES_HTML)
157
158 CLEANFILES += \
159 $(man_MANS) \
160 $(MANPAGES_HTML)
161
162 EXTRA_DIST += \
163 $(MANPAGES_XML) \
164 man/custom-html.xsl
165
166 XSLTPROC_FLAGS = \
167 --nonet \
168 --stringparam man.output.quietly 1 \
169 --stringparam funcsynopsis.style ansi \
170 --stringparam man.th.extra1.suppress 1 \
171 --stringparam man.authors.section.enabled 1 \
172 --stringparam man.copyright.section.enabled 1
173
174 XSLTPROC_COMMAND_MAN = \
175 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
176 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
177
178 XSLTPROC_COMMAND_HTML = \
179 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
180
181 man/%.1: man/%.xml
182 $(XSLTPROC_COMMAND_MAN)
183
184 man/%.5: man/%.xml
185 $(XSLTPROC_COMMAND_MAN)
186
187 man/%.html: man/%.xml man/custom-html.xsl
188 $(XSLTPROC_COMMAND_HTML)
189
190 endif
191
192 # ------------------------------------------------------------------------------
193
194 substitutions = \
195 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
196 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
197 '|configsdir=$(configsdir)|' \
198 '|bindir=$(bindir)|'
199
200 SED_PROCESS = \
201 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
202 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
203 < $< > $@
204
205 src/systemd/%: src/systemd/%.in Makefile
206 $(SED_PROCESS)