]> git.ipfire.org Git - collecty.git/blame - Makefile.am
Improve logging by using the native journal module
[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
35CLEANFILES =
36DISTCLEANFILES =
37EXTRA_DIST =
38INSTALL_DIRS =
39noinst_DATA =
40
41@INTLTOOL_POLICY_RULE@
42
43.PHONY: update-po
44update-po:
45 $(MAKE) -C po update-po
46
47DISTCHECK_CONFIGURE_FLAGS = \
48 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
49
50# ------------------------------------------------------------------------------
51
52AM_V_XSLT = $(AM_V_XSLT_$(V))
53AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
54AM_V_XSLT_0 = @echo " XSLT " $@;
55
56# ------------------------------------------------------------------------------
57
58dist_doc_DATA = \
59 COPYING
60
61# ------------------------------------------------------------------------------
62
63dist_bin_SCRIPTS = \
64 src/collectyd \
65 src/collecty-client
66
67collecty_PYTHON = \
68 src/collecty/__init__.py \
69 src/collecty/client.py \
70 src/collecty/constants.py \
71 src/collecty/daemon.py \
72 src/collecty/errors.py \
73 src/collecty/i18n.py \
a76917bf 74 src/collecty/logger.py \
2fc9f9a2
MT
75 src/collecty/ping.py
76
77collectydir = $(pythondir)/collecty
78
79collectyplugins_PYTHON = \
80 src/collecty/plugins/base.py \
81 src/collecty/plugins/cpu.py \
82 src/collecty/plugins/entropy.py \
83 src/collecty/plugins/__init__.py \
84 src/collecty/plugins/interface.py \
85 src/collecty/plugins/latency.py \
86 src/collecty/plugins/loadavg.py \
87 src/collecty/plugins/memory.py
88
89collectypluginsdir = $(collectydir)/plugins
90
91# ------------------------------------------------------------------------------
92
93if ENABLE_MANPAGES
94MANPAGES = \
95 man/collectyd.1
96
97MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
98MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
99
100man: $(MANPAGES) $(MANPAGES_HTML)
101
102man_MANS = \
103 $(MANPAGES)
104
105noinst_DATA += \
106 $(MANPAGES_HTML)
107
108CLEANFILES += \
109 $(man_MANS) \
110 $(MANPAGES_HTML)
111
112EXTRA_DIST += \
113 $(MANPAGES_XML) \
114 man/custom-html.xsl
115
116XSLTPROC_FLAGS = \
117 --nonet \
118 --stringparam man.output.quietly 1 \
119 --stringparam funcsynopsis.style ansi \
120 --stringparam man.th.extra1.suppress 1 \
121 --stringparam man.authors.section.enabled 1 \
122 --stringparam man.copyright.section.enabled 1
123
124XSLTPROC_COMMAND_MAN = \
125 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
126 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
127
128XSLTPROC_COMMAND_HTML = \
129 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
130
131man/%.1: man/%.xml
132 $(XSLTPROC_COMMAND_MAN)
133
134man/%.5: man/%.xml
135 $(XSLTPROC_COMMAND_MAN)
136
137man/%.html: man/%.xml man/custom-html.xsl
138 $(XSLTPROC_COMMAND_HTML)
139
140endif
141
142# ------------------------------------------------------------------------------
143
144if HAVE_SYSTEMD
145systemdsystemunit_DATA = \
146 src/systemd/collecty.service
147
148CLEANFILES += \
149 $(systemdsystemunit_DATA)
150
151INSTALL_DIRS += \
152 $(systemdsystemunitdir)
153endif
154
155EXTRA_DIST += \
156 src/systemd/collecty.service.in
157
158# ------------------------------------------------------------------------------
159
160substitutions = \
161 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
162 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
163 '|configsdir=$(configsdir)|' \
164 '|bindir=$(bindir)|'
165
166SED_PROCESS = \
167 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
168 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
169 < $< > $@
170
171src/systemd/%: src/systemd/%.in Makefile
172 $(SED_PROCESS)