]> git.ipfire.org Git - oddments/collecty.git/blame - Makefile.am
Auto-generate POTFILES.in and update translations
[oddments/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
e3f84d1b 48update-po: po/POTFILES.in
2fc9f9a2
MT
49 $(MAKE) -C po update-po
50
e3f84d1b
MT
51po/POTFILES.in: Makefile
52 find $(abs_srcdir)/src | \
53 grep -E "\.(in|py)$$" | sed -e "s@$(abs_srcdir)/@@g" | sort > $@
54
2fc9f9a2 55DISTCHECK_CONFIGURE_FLAGS = \
c968f6d9
MT
56 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
57 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2fc9f9a2
MT
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
59
60# ------------------------------------------------------------------------------
61
62AM_V_XSLT = $(AM_V_XSLT_$(V))
63AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
64AM_V_XSLT_0 = @echo " XSLT " $@;
65
66# ------------------------------------------------------------------------------
67
68dist_doc_DATA = \
69 COPYING
70
71# ------------------------------------------------------------------------------
72
73dist_bin_SCRIPTS = \
ce3e3333
MT
74 src/scripts/collecty
75
76dist_sbin_SCRIPTS = \
ae06a580 77 src/scripts/collectyd
2fc9f9a2
MT
78
79collecty_PYTHON = \
80 src/collecty/__init__.py \
73241420 81 src/collecty/__version__.py \
c968f6d9 82 src/collecty/bus.py \
2fc9f9a2 83 src/collecty/client.py \
9823dfef 84 src/collecty/colours.py \
2fc9f9a2
MT
85 src/collecty/constants.py \
86 src/collecty/daemon.py \
87 src/collecty/errors.py \
88 src/collecty/i18n.py \
9823dfef
MT
89 src/collecty/logger.py \
90 src/collecty/util.py
2fc9f9a2
MT
91
92collectydir = $(pythondir)/collecty
93
94collectyplugins_PYTHON = \
95 src/collecty/plugins/base.py \
27f02dbd 96 src/collecty/plugins/contextswitches.py \
0ec1854a 97 src/collecty/plugins/conntrack.py \
81b24bab 98 src/collecty/plugins/cpufreq.py \
9823dfef 99 src/collecty/plugins/df.py \
30777a6c 100 src/collecty/plugins/disk.py \
2fc9f9a2
MT
101 src/collecty/plugins/__init__.py \
102 src/collecty/plugins/interface.py \
5125dbcd 103 src/collecty/plugins/interrupts.py \
29455c5f 104 src/collecty/plugins/ipfrag.py \
2fc9f9a2
MT
105 src/collecty/plugins/latency.py \
106 src/collecty/plugins/loadavg.py \
c389fccf 107 src/collecty/plugins/memory.py \
af16115b 108 src/collecty/plugins/processor.py \
c389fccf 109 src/collecty/plugins/sensors.py
2fc9f9a2
MT
110
111collectypluginsdir = $(collectydir)/plugins
112
30777a6c
MT
113pkgpyexec_LTLIBRARIES = \
114 _collecty.la
115
116_collecty_la_SOURCES = \
86d23308
MT
117 src/_collecty/_collectymodule.c \
118 src/_collecty/_collectymodule.h \
119 src/_collecty/blockdev.c \
120 src/_collecty/ping.c \
121 src/_collecty/sensors.c \
122 src/_collecty/utils.c
30777a6c
MT
123
124_collecty_la_CFLAGS = \
125 $(AM_CFLAGS) \
126 $(LIBATASMART_CFLAGS) \
63f9f8be 127 $(OPING_CFLAGS) \
297fa319 128 $(PYTHON_CFLAGS)
30777a6c
MT
129
130_collecty_la_LDFLAGS = \
131 $(AM_LDFLAGS) \
132 -shared \
133 -module \
134 -avoid-version
135
136_collecty_la_LIBADD = \
137 $(LIBATASMART_LIBS) \
63f9f8be 138 $(OPING_LIBS) \
297fa319 139 $(PYTHON_LIBS) \
c389fccf 140 $(SENSORS_LIBS)
30777a6c 141
c968f6d9
MT
142dist_dbuspolicy_DATA = \
143 src/dbus/org.ipfire.collecty1.conf
144
145dist_dbussystemservice_DATA = \
146 src/dbus/org.ipfire.collecty1.service
147
148systemdsystemunit_DATA = \
149 src/systemd/collecty.service
150
151dist_systemdsystemunit_DATA = \
152 src/systemd/org.ipfire.collecty1.busname
153
154EXTRA_DIST += \
155 src/systemd/collecty.service.in
156
157CLEANFILES += \
158 src/systemd/collecty.service
159
2fc9f9a2
MT
160# ------------------------------------------------------------------------------
161
4bf8d546
MT
162.PHONY: man
163man: $(MANPAGES) $(MANPAGES_HTML)
164
2fc9f9a2
MT
165if ENABLE_MANPAGES
166MANPAGES = \
167 man/collectyd.1
168
169MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
170MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
171
2fc9f9a2
MT
172man_MANS = \
173 $(MANPAGES)
174
175noinst_DATA += \
176 $(MANPAGES_HTML)
177
178CLEANFILES += \
179 $(man_MANS) \
180 $(MANPAGES_HTML)
181
182EXTRA_DIST += \
183 $(MANPAGES_XML) \
184 man/custom-html.xsl
185
186XSLTPROC_FLAGS = \
187 --nonet \
188 --stringparam man.output.quietly 1 \
189 --stringparam funcsynopsis.style ansi \
190 --stringparam man.th.extra1.suppress 1 \
191 --stringparam man.authors.section.enabled 1 \
192 --stringparam man.copyright.section.enabled 1
193
194XSLTPROC_COMMAND_MAN = \
195 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
196 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
197
198XSLTPROC_COMMAND_HTML = \
199 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
200
201man/%.1: man/%.xml
202 $(XSLTPROC_COMMAND_MAN)
203
204man/%.5: man/%.xml
205 $(XSLTPROC_COMMAND_MAN)
206
207man/%.html: man/%.xml man/custom-html.xsl
208 $(XSLTPROC_COMMAND_HTML)
209
210endif
211
212# ------------------------------------------------------------------------------
213
2fc9f9a2
MT
214substitutions = \
215 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
216 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
217 '|configsdir=$(configsdir)|' \
218 '|bindir=$(bindir)|'
219
220SED_PROCESS = \
221 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
222 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
223 < $< > $@
224
225src/systemd/%: src/systemd/%.in Makefile
226 $(SED_PROCESS)