-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (49 loc) · 1.5 KB
/
Makefile
File metadata and controls
68 lines (49 loc) · 1.5 KB
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
# Define required macros here
SHELL = /bin/bash
# Constants
UBUNTU_UPDATE = sudo apt-get update
BUILD_ESSENTIALS_CHECKINSTALL = sudo apt-get install build-essentials checkinstall
BUILD_ESSENTIALS = sudo apt-get install build-essentials
SQUID = sudo apt-get install squid3
SKIP_ESSENTIALS = "y"
COVERALLS='.coveralls.yml'
# Common Messages
SKIP_MSG = "Skipping ..."
MSG_BUILD_ESG = "build essentials"
MSG_INSTALL_SQUID = "installing squid..."
MSG_CLEANUP = "clean up "
MSG_GET_UPDATE = "running apt-get update"
MSG_INSTALL = "installing.."
install: squid
@echo ${MSG_INSTALL}
ubuntu-update:
@echo ${MSG_GET_UPDATE}
${UBUNTU_UPDATE}
ubuntu-build-essentials: ubuntu-update
@echo ${BUILD_ESSENTIALS}
@if [ ${SKIP_ESSENTIALS} = "y" ]; then\
echo ${SKIP_MSG};\
else\
${BUILD_ESSENTIALS};\
fi
squid: ubuntu-build-essentials
@echo ${MSG_INSTALL_SQUID}
${SQUID}
lint:
./node_modules/jslint/bin/jslint.js ./proxy.js ./index.js
jslint:
./node_modules/jscs/bin/jscs ./proxy.js ./index.js --present=airbnb
test-cov:
$(MAKE) jslint
@NODE_ENV=test ./node_modules/.bin/istanbul cover \
./node_modules/mocha/bin/_mocha -- -R spec
test-coveralls:
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@$(MAKE) jslint
@NODE_ENV=test ./node_modules/.bin/istanbul cover proxy.js \
./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && \
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true
clean:
@echo @MSG_CLEANUP
travis:
@echo "repo_token: $(COVERALLS_REPO_TOKEN)" > ${COVERALLS};