-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
77 lines (59 loc) · 1.68 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
# This Works is placed under the terms of the Copyright Less License,
# see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY.
#
# My code critically relies on Proxy().
# Hence we cannot transpile to ES5, as ES5 lacks Proxy() support.
#
# My Code also relies on other features,
# but there exists polyfills,
# which allow the code to run:
#
# ES6 Proxy: No workaround possible in ES5
# ES6 WeakMap WeakSet: ES5 workaround leaks memory.
# ES12 WeakRef: Workaround leaks memory.
V=13
TARG=cry/sha256c.js cry/sha1c.js cry/md5c.js cry/sha256.js cry/sha1.js cry/md5.js er6.js es6.js
# What happens if Babel fails?
# This is a babel bug not a bug of this!
# In that case, only md5c.js is created,
# and md5.js is missing.
.PHONY: love
love: all
[ ! -x .test ] || exec ./.test
.PHONY: all
all: $(TARG)
.PHONY: clean
clean:
$(RM) $(TARG) .md5c~
es6.js: es$V.js babel.sh Makefile
./babel.sh '$<' '$@' >'[email protected]'
mv '[email protected]' '$@'
er6.js: er$V.js babel.sh Makefile
./babel.sh '$<' '$@' >'[email protected]'
mv '[email protected]' '$@'
cry:
mkdir '$@'
cry/md5.js: cry/md5c.js babel.sh Makefile
./babel.sh '$<' '$@' >'[email protected]'
mv '[email protected]' '$@'
cry/md5c.js: md5c.js.in unroll.sh Makefile .md5c~ | cry
./unroll.sh '$<' >'[email protected]'
mv '[email protected]' '$@'
.md5c~:
touch '$@'
cry/sha1.js: cry/sha1c.js babel.sh Makefile
./babel.sh '$<' '$@' >'[email protected]'
mv '[email protected]' '$@'
cry/sha1c.js: sha1c.js.in unroll.sh Makefile .sha1~ | cry
./unroll.sh '$<' >'[email protected]'
mv '[email protected]' '$@'
.sha1~:
touch '$@'
cry/sha256.js: cry/sha256c.js babel.sh Makefile
./babel.sh '$<' '$@' >'[email protected]'
mv '[email protected]' '$@'
cry/sha256c.js: sha256c.js.in unroll.sh Makefile .sha256~ | cry
./unroll.sh '$<' >'[email protected]'
mv '[email protected]' '$@'
.sha256~:
touch '$@'