-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
69 lines (47 loc) · 1.83 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
# Makefile for development.
# See INSTALL for details.
SHELL = /bin/bash
ROOT_DIR = $(shell pwd)
BIN_DIR = $(ROOT_DIR)/bin
DATA_DIR = $(ROOT_DIR)/var
WGET = wget
PYTHON = $(shell which python)
PROJECT = $(shell $(PYTHON) -c "import setup; print setup.NAME")
BUILDOUT_CFG = $(ROOT_DIR)/etc/buildout.cfg
BUILDOUT_DIR = $(ROOT_DIR)/lib/buildout
BUILDOUT_VERSION = 1.7.1
BUILDOUT_BOOTSTRAP_URL = https://raw.github.com/buildout/buildout/$(BUILDOUT_VERSION)/bootstrap/bootstrap.py
BUILDOUT_BOOTSTRAP = $(BUILDOUT_DIR)/bootstrap.py
BUILDOUT_BOOTSTRAP_ARGS = -c $(BUILDOUT_CFG) --version=$(BUILDOUT_VERSION) --distribute buildout:directory=$(ROOT_DIR)
BUILDOUT = $(BIN_DIR)/buildout
BUILDOUT_ARGS = -N -c $(BUILDOUT_CFG) buildout:directory=$(ROOT_DIR)
NOSE = $(BIN_DIR)/nosetests
configure:
# Configuration is stored in etc/ folder. Not generated yet.
develop: system-dependencies buildout
system-dependencies:
# Debian-based
sudo apt-get install --no-install-recommends curl bsdtar cpio gzip findutils coreutils genisoimage
buildout:
if [ ! -d $(BUILDOUT_DIR) ]; then mkdir -p $(BUILDOUT_DIR); fi
if [ ! -f $(BUILDOUT_BOOTSTRAP) ]; then wget -O $(BUILDOUT_BOOTSTRAP) $(BUILDOUT_BOOTSTRAP_URL); fi
if [ ! -x $(BUILDOUT) ]; then $(PYTHON) $(BUILDOUT_BOOTSTRAP) $(BUILDOUT_BOOTSTRAP_ARGS); fi
$(BUILDOUT) $(BUILDOUT_ARGS)
clean:
find $(ROOT_DIR)/ -name "*.pyc" -delete
find $(ROOT_DIR)/ -name ".noseids" -delete
distclean: clean
rm -rf $(ROOT_DIR)/*.egg-info
maintainer-clean: distclean
rm -rf $(BIN_DIR)/
rm -rf $(ROOT_DIR)/lib/
test: test-app
test-app:
$(NOSE) --config=etc/nose.cfg $(PROJECT)
mkdir -p $(ROOT_DIR)/var/tests
mv $(ROOT_DIR)/.coverage $(ROOT_DIR)/var/tests/
documentation-readme:
mkdir -p $(ROOT_DIR)/var/docs/_build/html
bin/rst2 html README > $(ROOT_DIR)/var/docs/_build/html/README.html
release:
$(BIN_DIR)/fullrelease