-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
52 lines (38 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
### Configuration
CONFIG_DIR:=/etc/munin
PLUGIN_DIR:=/usr/local/share/munin/plugins
MUNIN_NODE:=/etc/init.d/munin-node
PERL_SITELIB_DIR:=$(shell perl '-V:installsitelib'|cut -d"'" -f2)
# Instance numbers, space separated. Leave empty if you only want to
# monitor one instance.
INSTANCES:=""
GRAPHS:=$(shell find lib -name '*.pm')
# Uncomment the following line if you also want to install all the
# contributed graphs:
# GRAPHS:=$(shell find lib contrib -name '*.pm')
### Don't edit below this line
-include local.mk
.PHONY: all test install test_diff_ok
all:
@echo $(GRAPHS)
install:
mkdir -p $(PLUGIN_DIR)
install mysql $(PLUGIN_DIR)
if [ ! -e $(CONFIG_DIR)/plugin-conf.d/mysql.conf ]; then \
install -m 0644 mysql.conf $(CONFIG_DIR)/plugin-conf.d; \
fi
if [ $(INSTANCES) = "" ]; then \
ln -sf $(PLUGIN_DIR)/mysql $(CONFIG_DIR)/plugins/mysql; \
else \
INSTANCES=$(INSTANCES); \
for I in $$INSTANCES; do \
ln -sf $(PLUGIN_DIR)/mysql $(CONFIG_DIR)/plugins/mysql_$${I}; \
done; \
fi
install -d $(PERL_SITELIB_DIR)/Munin/MySQL/Graph
install $(GRAPHS) $(PERL_SITELIB_DIR)/Munin/MySQL/Graph
$(MUNIN_NODE) restart
test:
prove -It/mock t
test_diff_ok:
TEST_REGRESSION_GEN=1 prove t/regression.t