forked from JHUISI/charm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
99 lines (80 loc) · 2.25 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
CONFIG=config.mk
include ./${CONFIG}
export CONFIG_FILE=${CURDIR}/${CONFIG}
# user config options
setup1=$(shell mkdir -p /tmp/build-charm)
dest_build=/tmp/build-charm
help:
@echo "make deps - Build dependency libs locally."
@echo "make source - Create source package."
@echo "make install - Install on local system."
@echo "make clean - Get rid of scratch and byte files."
@echo "make test - Run Unit Tests."
@echo "make xmltest - Run Unit Tests and produce xml results in folder test-results."
@echo "make doc - Compile documentation"
.PHONY: setup
setup:
@echo "Setup build/staging directories"
set -x
${setup1}
set +x
.PHONY: all
all: setup
@echo "Building the Charm Framework"
${PYTHON} setup.py build ${PYTHONFLAGS} ${PYTHONBUILDEXT}
@echo "Complete"
.PHONY: deps
deps:
@echo "Building the dependency libs"
make -C deps
.PHONY: source
source:
$(PYTHON) setup.py sdist --formats=gztar,zip # --manifest-only
.PHONY: install
install:
$(PYTHON) setup.py install
.PHONY: uninstall
uninstall:
$(PYTHON) setup.py uninstall
.PHONY: test
test:
$(PYTHON) setup.py test
.PHONY: test-schemes
test-schemes:
$(PYTHON) -m unittest discover -p "*_test.py" schemes/test/
find . -name '*.pyc' -delete
.PHONY: test-charm
test-charm:
$(PYTHON) -m unittest discover -p "*_test.py" charm/test/toolbox/
find . -name '*.pyc' -delete
.PHONY: xmltest
xmltest:
$(PYTHON) tests/all_tests_with_xml_test_result.py
find . -name '*.pyc' -delete
.PHONY: doc
doc:
if test "${BUILD_DOCS}" = "yes" ; then \
${MAKE} -C doc html; \
fi
# .PHONY: buildrpm
# buildrpm:
# $(PYTHON) setup.py bdist_rpm # --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
.PHONY: builddeb
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
$(PYTHON) setup.py sdist --dist-dir=../ --prune
#rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
#dpkg-buildpackage -i -I -rfakeroot
.PHONY: clean
clean:
$(PYTHON) setup.py clean
# cd doc; $(MAKE) clean
# $(MAKE) -f $(CURDIR)/debian/rules clean
rm -rf build/ dist/ ${dest_build} MANIFEST
rm ${CONFIG}
find . -name '*.pyc' -delete
find . -name '*.so' -delete
find . -name '*.o' -delete
find . -name '*.dll' -delete