forked from dhtech/snmpexporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 770 Bytes
/
Makefile
File metadata and controls
29 lines (23 loc) · 770 Bytes
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
COVERAGE ?= 'python3-coverage'
export PYTHONPATH=$(CURDIR)
all: test
install:
make -C $(CURDIR)/mibresolver $@
mkdir -p $(DESTDIR)/opt/snmpexporter/
find . -name \*.py -not -name \*_test\* -not -name setup.py \
-printf '%P\n' | \
xargs -I{} install -m0644 -D {} $(DESTDIR)/opt/snmpexporter/{}
chmod +x $(DESTDIR)/opt/snmpexporter/snmpexport.py \
$(DESTDIR)/opt/snmpexporter/snmpexporterd.py
install -m600 etc/snmpexporter.yaml $(DESTDIR)/etc/
clean:
rm -f .coverage
make -C $(CURDIR)/mibresolver $@
distclean: clean
test:
$(COVERAGE) erase
echo $(wildcard */*_test.py) | xargs -n 1 $(COVERAGE) run -p
echo $(wildcard *_test.py) | xargs -n 1 $(COVERAGE) run -p
$(COVERAGE) combine
$(COVERAGE) report -m
.PHONY: test clean install all distclean