-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
59 lines (43 loc) · 1.63 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
smoke-test: build
./efe pp samples.conf samples/*.erl
lfe-test: lfe-samples build
./efe pp-lfe samples.conf samples/*.lfe
lfe-samples: samples/ping_pong.lfe samples/simple-erl-exercises.lfe
samples/ping_pong.lfe:
wget https://raw.githubusercontent.com/lfe/lfe/develop/examples/ping_pong.lfe -O samples/ping_pong.lfe
samples/simple-erl-exercises.lfe:
wget https://raw.githubusercontent.com/lfe/lfe/develop/examples/simple-erl-exercises.lfe -O samples/simple-erl-exercises.lfe
build:
rebar3 escriptize
cp _build/default/bin/efe .
translate-otp: build
./efe pp otp.conf otp/lib/*/src/*.erl otp/erts/preloaded/src/*.erl
compile-output: build
./run.bash compile-output
format-output:
./run.bash format-output
filter-result:
@grep -v '^# ' out/result.txt | grep -v '== Compilation error in file' | grep -v '(elixir ' | grep -v '(stdlib 3' | sed 's/** (CompileError) //;s/** (SyntaxError) //'
otp:
git clone https://github.com/erlang/otp.git
cd otp && git checkout OTP-24.0-rc1
clean-inception:
rm -rf efex out-erl out-ex out
inception: clean-inception build otp translate-otp
mv out out-erl
mix new efex
rm efex/lib/efex.ex
./efe pp efe.conf src/*.erl
mv efex/lib/src/*.ex efex/lib/
rmdir efex/lib/src
sed -i 's/deps()/deps(),\n escript: [main_module: :efe, name: "efe"]/g' efex/mix.exs
cd efex && mix escript.build
./efex/efe pp otp.conf otp/lib/*/src/*.erl otp/erts/preloaded/src/*.erl
mv out out-ex
diff -r out-erl out-ex
conf-test: build
./efe conf otp.conf otplib/stdlib/src/lists.erl otplib/stdlib/src/array.erl
cons-test: build
./efe pp samples.conf samples/cons.erl
@cat samples/cons.erl
@cat out/samples/cons.ex