-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (50 loc) · 1.3 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
ifeq ($(OS),Windows_NT)
BIN_DIR = Scripts
else
BIN_DIR = bin
endif
APPNAME = hubsyncer
DEPS = mozilla:server-core
VIRTUALENV = virtualenv
NOSE = $(BIN_DIR)/nosetests
NOSETESTS_ARGS = -s
NOSETESTS_ARGS_C = -s --with-xunit --with-coverage --cover-package=hubsyncer --cover-erase
TESTS = hubsyncer/tests
PYTHON = $(BIN_DIR)/python
version = $(shell $(PYTHON) setup.py --version)
tag = $(shell grep tag_build setup.cfg | cut -d= -f2 | xargs echo )
# *sob* - just running easy_install on Windows prompts for UAC...
ifeq ($(OS),Windows_NT)
EZ = $(PYTHON) $(BIN_DIR)/easy_install-script.py
else
EZ = $(BIN_DIR)/easy_install
endif
COVEROPTS = --cover-html --cover-html-dir=html --with-coverage --cover-package=linkdrop
COVERAGE := coverage
PYLINT = $(BIN_DIR)/pylint
PKGS = hubsyncer
GIT_DESCRIBE := `git describe --long`
ifeq ($(TOPSRCDIR),)
export TOPSRCDIR = $(shell pwd)
endif
SLINK = ln -sf
ifneq ($(findstring MINGW,$(shell uname -s)),)
SLINK = cp -r
export NO_SYMLINK = 1
endif
all: build
clean:
build:
$(VIRTUALENV) --no-site-packages --distribute .
$(PYTHON) build.py $(APPNAME) $(DEPS)
$(EZ) nose
$(EZ) WebTest
$(EZ) Funkload==1.14
$(EZ) pylint
$(EZ) coverage
test:
$(NOSE) $(NOSETESTS_ARGS) $(TESTS)
coverage:
$(NOSE) $(NOSETESTS_ARGS_C) $(TESTS)
$(COVERAGE) xml
.PHONY: clean build test coverage