-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGNUmakefile
44 lines (36 loc) · 1.17 KB
/
GNUmakefile
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
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2019, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
ZP_DIR=$(PWD)/ZenPacks/zenoss/PythonCollector
SRC_DIR=$(PWD)/src
LIB_DIR=$(ZP_DIR)/lib
BUILD_DIR=$(ZP_DIR)/build
MONOTONIC_SRC=$(SRC_DIR)/monotonic-1.5.tar.gz
MONOTONIC_DIR=$(LIB_DIR)/monotonic
.PHONY: default
default: egg
.PHONY: egg
egg:
# setup.py will call 'make build' before creating the egg
python setup.py bdist_egg
$(MONOTONIC_DIR):
mkdir -p $(MONOTONIC_DIR)
.PHONY: py_monotonic
py_monotonic: $(MONOTONIC_SRC) $(MONOTONIC_DIR)
rm -rf $(BUILD_DIR); mkdir -p $(BUILD_DIR)
cd $(BUILD_DIR); tar zxf $(MONOTONIC_SRC) --strip-components=1 -C $(BUILD_DIR)
cd $(BUILD_DIR); python setup.py build --build-lib build/lib
touch $(MONOTONIC_DIR)/__init__.py
cp -r $(BUILD_DIR)/build/lib/* $(MONOTONIC_DIR)
rm -rf $(BUILD_DIR)
.PHONY: build
build: py_monotonic
@echo
.PHONY: clean
clean:
rm -rf build dist $(MONOTONIC_DIR)