Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (56 sloc) 2.48 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
5 # Rule for making pure JS code from a .pde (runs through parser + beautify)
6 %.js : %.pde
7 $(TOOLSDIR)/pde2js.py $(JS) $?
8
9 all: release
10
11 create-release: clean
12 mkdir ./release
13
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
14 # Version number used in naming release files.
15 VERSION ?= $(error Specify a version for your release (e.g., VERSION=0.5))
16
17 release: release-files zipped
18
76b770c @corbanbrook #229 Google Closure added.
corbanbrook authored
19 release-files: pretty closure example release-docs
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
20
21 zipped: release-files
05fd45e @corbanbrook #334 Rename zip file for make release.
corbanbrook authored
22 find ./release -print | zip -j ./release/processing.js-$(VERSION).zip -@
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
23
24 release-docs: create-release
6cdc099 @corbanbrook #332 Add AUTHORS to Makefile for release target.
corbanbrook authored
25 cp AUTHORS ./release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
26 cp README ./release
7cd4e8c @corbanbrook Updated make release to include LICENSE and CHANGELOG.
corbanbrook authored
27 cp LICENSE ./release
28 cp CHANGELOG ./release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
29
30 example: create-release pretty
31 echo "<script src=\"processing-$(VERSION).js\"></script>" > ./release/example.html
32 echo "<canvas datasrc=\"example.pjs\" width=\"200\" height=\"200\"></canvas>" >> ./release/example.html
33 cp example.pjs ./release
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
34
35 pretty: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
36 $(TOOLSDIR)/jsbeautify.py $(JS) processing.js > ./release/processing-$(VERSION).js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
37 # check for any parsing errors in pretty version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
38 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
39
40 packed: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
41 $(TOOLSDIR)/packer.py $(JS) processing.js > ./release/processing-$(VERSION).packed.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
42 # check for any parsing errors in packed version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
43 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).packed.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
44
45 minified: create-release
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
46 $(TOOLSDIR)/minifier.py $(JS) processing.js > ./release/processing-$(VERSION).min.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
47 # check for any parsing errors in minified version of processing.js
24a7561 @corbanbrook #314 Improve make release. (humphd)
corbanbrook authored
48 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).min.js
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
49
76b770c @corbanbrook #229 Google Closure added.
corbanbrook authored
50 closure: create-release
51 java -jar $(TOOLSDIR)/closure/compiler.jar --js=processing.js --js_output_file=./release/processing-$(VERSION).closure.js
52 # check for any parsing errors in compiled version of processing.js
53 $(JS) -f $(TOOLSDIR)/fake-dom.js -f ./release/processing-$(VERSION).min.js
54
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
55 check:
56 $(TOOLSDIR)/runtests.py $(JS)
57
58 check-summary:
adde944 @corbanbrook #255 Fix test reporting for summary case (humphd).
corbanbrook authored
59 $(TOOLSDIR)/runtests.py -s $(JS)
cb80c0d @corbanbrook #228 Staged the automated test suite.
corbanbrook authored
60
61 check-lint:
62 $(TOOLSDIR)/jslint.py $(JS) processing.js
63
64 check-parser:
65 $(TOOLSDIR)/runtests.py -p $(JS)
66
67 check-unit:
68 $(TOOLSDIR)/runtests.py -u $(JS)
69
70 # If you want to test just one file or dir, use |make check-one TEST=<file or dir>|
71 TEST ?= $(error Specify a test filename/dir in TEST when using check-test)
72
73 check-one:
74 $(TOOLSDIR)/runtests.py $(JS) -t $(TEST)
75
76 clean:
77 rm -fr ./release
Something went wrong with that request. Please try again.