1 # Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com
3 # For running on Mike's local install of node.js
4 MIKE = PATH=$$PATH:/usr/local/lib/node-v0.10.24-linux-x64/bin
6 PHANTOMJS_URL=https://mkws-dev.indexdata.com/jasmine-popup.html
10 JASMINE_NODE= ./node_modules/jasmine-node/bin/jasmine-node
11 PHANTOMJS= ./node_modules/phantomjs/bin/phantomjs
13 SCREENSHOT_WIDTH= 360 480 640 768 1024 1200 1440 2048
19 rm -f mkws-error.png mkws-error.html images/*.png
24 mkws-complete-syntax-check:
25 ${MAKE} -C../tools/htdocs $@
27 check: mkws-complete-syntax-check
28 @if [ ! -e node_modules ]; then echo "please run first: make node-modules"; exit 1; fi
29 ${JASMINE_NODE} --noColor --captureExceptions --forceexit ./spec
34 $(MIKE) jasmine-node --noColor --captureExceptions --forceexit spec
37 ./bomb.pl --timeout="${PHANTOMJS_TIMEOUT}.5" ${PHANTOMJS} phantom/run-jasmine.js ${PHANTOMJS_URL} ${PHANTOMJS_TIMEOUT}
40 ${PHANTOMJS} phantom/screenshot.js ${PHANTOMJS_URL} ${IMAGES}/screenshot.png 1200 1000
43 for i in ${SCREENSHOT_WIDTH}; do \
44 ${PHANTOMJS} phantom/screenshot.js http://mkws.indexdata.com ${IMAGES}/mkws-$$i.png $$i 1000 & \
49 for i in ${SCREENSHOT_WIDTH}; do \
50 ${PHANTOMJS} phantom/screenshot.js http://www.indexdata.com ${IMAGES}/indexdata-$$i.png $$i 1000 & \
54 jsbeautifier jsb indent:
55 for i in package.json ./spec*/*.js ./js/*.js ./phantom/*.js; do \
56 jsbeautifier -j $$i > $@.tmp && mv -f $@.tmp $$i; \
60 @ls ${PERL_SCRIPTS} | xargs -n1 -P16 perl -c 2>/dev/null
61 @ls ${PERL_SCRIPTS} | xargs -n2 -P8 perltidy -b
64 node_modules node-modules:
65 npm install ${NPM_INSTALL_FLAGS}
68 @echo "make [ all | check | clean | distclean ]"
69 @echo " [ phantomjs | screenshot ]"
70 @echo " [ jsbeautifier | perltidy ]"
71 @echo " [ node-modules ]"
73 @echo "DEBUG=1 make phantomjs PHANTOMJS_TIMEOUT=8 PHANTOMJS_URL=https://mkws-dev.indexdata.com/jasmine-popup.html"