forked from munin-monitoring/munin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (44 loc) · 1.52 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
52
53
54
55
56
57
58
59
60
61
62
63
64
# This Makefile provides convenience targets for common build/test/install cases, as well as rules
# for the release manager.
# In the interest of keeping this Makefile simple, it does not attempt to provide the flexibility
# provided by using Build.PL directly. (See perldoc Module::Build).
# Defaults/paths. Allows $(CONFIG) to be overrided by
# make command line
DEFAULTS = Makefile.config
CONFIG = Makefile.config
include $(DEFAULTS)
include $(CONFIG)
.PHONY: default build install clean test testcover testpod testpodcoverage tar
default: blib
blib: Build
./Build
install: Build
./Build install --destdir=$(DESTDIR) --verbose
clean: Build
./Build realclean
rm -rf _stage
rm -f MANIFEST META.json META.yml
##############################
# perl module
Build: Build.PL
$(PERL) Build.PL --destdir=$(DESTDIR) --installdirs=$(INSTALLDIRS) --verbose
######################################################################
# testing
test: Build
./Build test
testcover: Build
./Build testcover
testpod: Build
./Build testpod
testpodcoverage: Build
./Build testpodcoverage
######################################################################
# Rules for the release manager
RELEASE := $(shell $(CURDIR)/getversion)
tar:
git archive --prefix=munin-$(RELEASE)/ --format=tar --output ../munin-$(RELEASE).tar HEAD
mkdir -p munin-$(RELEASE)/
echo $(RELEASE) > munin-$(RELEASE)/RELEASE
tar rf ../munin-$(RELEASE).tar --owner=root --group=root munin-$(RELEASE)/RELEASE
rm -rf munin-$(RELEASE)
gzip -f -9 ../munin-$(RELEASE).tar