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