-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
48 lines (35 loc) · 1.24 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
TOP = .
# This includes Makefile.private which is written by the make system, before
# defining sensible defaults for all the symbols here.
include $(TOP)/Makefile.config
# Extra configuration dependencies.
DEPENDENCIES = \
$(wildcard cothread/*.py cothread/*/*.py context/*.c context/*.h)
default: dist docs
local: cothread/_coroutine.so
dist: setup.py $(DEPENDENCIES) cothread/libca_path.py
MODULEVER=$(MODULEVER) $(PYTHON) setup.py bdist_egg
touch dist
# Clean the module
clean: clean_docs
$(PYTHON) setup.py clean
-rm -rf build dist *egg-info installed.files cothread/libca_path.py
-find -name '*.pyc' -exec rm {} \;
rm -f cothread/*.so
# Install the built egg
install: dist
$(PYTHON) setup.py easy_install -m \
--record=installed.files \
--install-dir=$(INSTALL_DIR) \
--script-dir=$(SCRIPT_DIR) dist/*.egg
docs: cothread/_coroutine.so
sphinx-build -b html docs docs/html
clean_docs:
rm -rf docs/html
.PHONY: default clean install docs clean_docs local
cothread/libca_path.py:
EVAL="$$($(PYTHON) cothread/load_ca.py)" && \
eval "$$EVAL" && \
echo "libca_path = '$$CATOOLS_LIBCA_PATH'" >$@
cothread/_coroutine.so: $(wildcard context/*.c context/*.h)
$(PYTHON) setup.py build_ext -i