OLD | NEW |
1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 # | 4 # |
5 # Makefile | 5 # Makefile |
6 # | 6 # |
7 # usage: 'make [package]' | 7 # usage: 'make [package]' |
8 # | 8 # |
9 # This makefile can by used to perform common actions such as building | 9 # This makefile can by used to perform common actions such as building |
10 # all ports, building a give port, running a webserver to test the ports. | 10 # all ports, building a give port, running a webserver to test the ports. |
11 # Each port has a dependency on its own sentinel file, which can be found | 11 # Each port has a dependency on its own sentinel file, which can be found |
12 # at out/sentinels/* | 12 # at out/sentinels/* |
13 | 13 |
14 PYLINT = build_tools/python_wrapper -m pylint | 14 PYLINT = build_tools/python_wrapper -m pylint |
| 15 JSHINT = nodejs node_modules/.bin/jshint |
15 COVERAGE = bin/coverage | 16 COVERAGE = bin/coverage |
16 COVERAGE_ARGS = --fail-under=60 | 17 COVERAGE_ARGS = --fail-under=60 |
17 COVERAGE_VER := $(shell $(COVERAGE) --version 2>/dev/null) | 18 COVERAGE_VER := $(shell $(COVERAGE) --version 2>/dev/null) |
18 | 19 |
19 ifeq ($(V),1) | 20 ifeq ($(V),1) |
20 VERBOSE ?= 1 | 21 VERBOSE ?= 1 |
21 endif | 22 endif |
22 | 23 |
23 ifeq ($(F),1) | 24 ifeq ($(F),1) |
24 FORCE ?= 1 | 25 FORCE ?= 1 |
(...skipping 30 matching lines...) Expand all Loading... |
55 ./build_tools/httpd.py | 56 ./build_tools/httpd.py |
56 | 57 |
57 clean: | 58 clean: |
58 bin/naclports --all clean | 59 bin/naclports --all clean |
59 | 60 |
60 reallyclean: clean | 61 reallyclean: clean |
61 rm -rf $(NACL_OUT) | 62 rm -rf $(NACL_OUT) |
62 | 63 |
63 check: test | 64 check: test |
64 | 65 |
65 lint: | 66 JS_FILES := $(shell git ls-files "*.js") |
| 67 |
| 68 lint: pylint jshint |
| 69 |
| 70 pylint: |
66 $(PYLINT) --rcfile=.pylintrc lib/naclports lib/naclports/tests/*.py | 71 $(PYLINT) --rcfile=.pylintrc lib/naclports lib/naclports/tests/*.py |
67 | 72 |
| 73 jshint: |
| 74 $(JSHINT) $(JS_FILES) |
| 75 |
68 test: | 76 test: |
69 $(COVERAGE) run --include=lib/naclports/*,build_tools/* -m nose \ | 77 $(COVERAGE) run --include=lib/naclports/*,build_tools/* -m nose \ |
70 --rednose build_tools lib | 78 --rednose build_tools lib |
71 @rm -rf out/coverage_html | 79 @rm -rf out/coverage_html |
72 $(COVERAGE) html | 80 $(COVERAGE) html |
73 $(COVERAGE) report $(COVERAGE_ARGS) | 81 $(COVERAGE) report $(COVERAGE_ARGS) |
74 | 82 |
75 %: | 83 %: |
76 bin/naclports install $* $(BUILD_FLAGS) | 84 bin/naclports install $* $(BUILD_FLAGS) |
77 | 85 |
78 .PHONY: all run clean sdklibs sdklibs_list reallyclean check test lint | 86 .PHONY: all run clean sdklibs sdklibs_list reallyclean check test |
| 87 .PHONY: lint pylint jshint |
OLD | NEW |