-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
95 lines (74 loc) · 2.51 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
export PATH := $(PATH):$(HOME)/.pub-cache/bin:.
.PHONY=documentation examples tests presubmit buildall
DART=/bin/dart
PUB=/bin/dart pub
PORT=8000
VERSION := $(shell grep version pubspec.yaml | cut -f 2 -d\ )
#@ Available Targets:
#@
#@ help - Show this messsage
#@
help:
@egrep "^#@" ${MAKEFILE_LIST} | cut -c 3-
#@ get - Download package dependencies and install tools
#@ (needs to be run at lease once after `git clone`
#@ https://dart.dev/tools/webdev
#@
get:
$(PUB) get
$(PUB) add build_runner build_web_compilers --dev
${PUB} global activate webdev
#@ examples - Build (release mode) all the examples into build_example/
#@
examples:
webdev build --verbose --release --output example:build_example
@echo
@echo example can be found in "file://${PWD}/build_example/example/"
@echo
#@ examples_debug - Build (release mode) all the examples into build_example/
#@
examples_debug:
webdev build --verbose --output example:build_example_debug
@echo
@echo example can be found in "file://${PWD}/build_example_debug/example/"
@echo
#@ webserver - Launch a python webserver exporting the entire directory tree
#@ (useful to view the results of target `example`
#@
webserver:
@echo Launching webserver on port $(PORT)
python3 -m http.server $(PORT)
#@ serve - Launch the continous build webdev server
#@
serve_debug:
webdev serve --verbose --debug example
#@ publish - Update package at pub.dartlang.org
#@
publish:
$(PUB) publish
buildall:
webdev build --output web:build
webdev build --output web:build tool/
webdev build --output web:build test/
presubmit: tests buildall
#@ documentation - Extract the class_glossary.md files from the source
#@
documentation:
dart tool/generate_documentation.dart > class_glossary.md
############################################################
# TESTING
############################################################
# TODO(robertm): vm tests are failing on exit:
# Invalid argument(s): Illegal argument in isolate message : (object is a regular Dart Instance)
start_test_server:
$(DART) serve example --web-compiler=dartdevc --port 8111
browser_tests:
$(DART) run test -p chrome --pub-serve=8111 test/geometry.dart
brower_tests_old:
-$(DART) run test -p chrome --pub-serve=8111 test/geometry.dart
$(DART) run test -p dartium test/shader_syntax.dart
$(DART) run test -p dartium test/show_extensions.dart
tests:
$(DART) run test -p vm test/polygon.dart
$(DART) run test -p chrome test/geometry.dart
$(DART) run test -p chrome test/shader_syntax.dart