-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
52 lines (39 loc) · 900 Bytes
/
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
MKDIR_P := mkdir -p
FEZ := ./src/fez/fez.fsproj
FEZ_CORE := ./src/fez.core/fez.core.fsproj
TST := ./test/test.fsproj
VERSION := 0.1.0
SUFFIX := alpha.3
.PHONY: restore build all clean test ebin
all: restore build
ebin:
mkdir -p ebin && \
erlc +clint -o ./ebin ./src/*.erl
restore:
dotnet restore $(FEZ_CORE)
dotnet restore $(FEZ)
dotnet restore $(TST)
build: ebin
dotnet build $(FEZ_CORE)
dotnet build $(FEZ)
dotnet build $(TST)
test:
./run-tests.sh
clean:
dotnet clean $(FEZ)
dotnet clean $(FEZ_CORE)
dotnet clean $(TST)
rm -rf ./releases
rm -rf ./ebin
prep-releases:
rm -rf ./releases
mkdir ./releases
rids := win-x64 osx-x64 linux-x64
$(rids): prep-releases ebin
rm -rf tmp && \
dotnet publish $(FEZ) --self-contained -c Release -r $@ -o ../../tmp/$@ && \
cd tmp && \
zip -r ../releases/$@_$(VERSION)-$(SUFFIX).zip $@ && \
cd .. && \
rm -rf tmp
release: $(rids)