Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (49 sloc) 2.126 kB
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
1 # If your jsshell isn't at ./tools/js/src/js, update JS below
2 TOOLSDIR=./tools
3 JS=$(TOOLSDIR)/js/src/js
4
f843bab @corbanbrook #311 make check-one broken fixed. (humphd)
corbanbrook authored
5
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
6 # Rule for making pure JS code from a .pde (runs through parser + beautify)
7 %.js : %.pde
8 $(TOOLSDIR)/pde2js.py $(JS) $?
9
10 all: release
11
12 create-release: clean
13 mkdir ./release
14
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
15 # Version number used in naming release files.
16 VERSION ?= $(error Specify a version for your release (e.g., VERSION=0.5))
17
18 release: release-files zipped
19
20 release-files: pretty packed minified example release-docs
21
22 zipped: release-files
23 find ./release -print | zip -j ./release/processing-$(VERSION).zip -@
24
25 release-docs: create-release
26 cp README ./release
27
28 example: create-release pretty
29 echo "<script src=\"processing-$(VERSION).js\"></script>" > ./release/example.html
30 echo "<canvas datasrc=\"example.pjs\" width=\"200\" height=\"200\"></canvas>" >> ./release/example.html
31 cp example.pjs ./release
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
32
33 pretty: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
34 $(TOOLSDIR)/jsbeautify.py $(JS) processing.js > ./release/processing-$(VERSION).js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
35 # check for any parsing errors in pretty version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
36 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
37
38 packed: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
39 $(TOOLSDIR)/packer.py $(JS) processing.js > ./release/processing-$(VERSION).packed.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
40 # check for any parsing errors in packed version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
41 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).packed.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
42
43 minified: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
44 $(TOOLSDIR)/minifier.py $(JS) processing.js > ./release/processing-$(VERSION).min.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
45 # check for any parsing errors in minified version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
46 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).min.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
47
48 check:
49 $(TOOLSDIR)/runtests.py $(JS)
50
51 check-summary:
adde944 @corbanbrook #255 Fix test reporting for summary case (humphd).
corbanbrook authored
52 $(TOOLSDIR)/runtests.py -s $(JS)
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
53
54 check-lint:
55 $(TOOLSDIR)/jslint.py $(JS) processing.js
56
57 check-parser:
58 $(TOOLSDIR)/runtests.py -p $(JS)
59
60 check-unit:
61 $(TOOLSDIR)/runtests.py -u $(JS)
62
63 # If you want to test just one file or dir, use |make check-one TEST=<file or dir>|
64 TEST ?= $(error Specify a test filename/dir in TEST when using check-test)
65
66 check-one:
67 $(TOOLSDIR)/runtests.py $(JS) -t $(TEST)
68
69 clean:
70 rm -fr ./release
Something went wrong with that request. Please try again.