forked from chipsalliance/treadle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (43 loc) · 1.26 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
root_dir ?= $(PWD)
SBT ?= sbt
SBT_FLAGS ?= -Dsbt.log.noformat=true
MKDIR ?= mkdir -p
CURL ?= curl -L
MILL_BIN ?= $(HOME)/bin/mill
MILL ?= $(MILL_BIN) --color false
# Ensure the default target is something reasonable.
default: build
# Fetch mill (if we don't have it.
$(MILL_BIN):
$(MKDIR) $(dir $@)
$(CURL) -o $@ https://github.com/ucbjrl/mill/releases/download/v0.2.3-FDF/mill-0.2.3-FDF && chmod +x $@
mill-tools: $(MILL_BIN)
# Compile and package jar
mill.build: mill-tools
$(MILL) treadle.jar
# Compile and test
mill.test: mill-tools
$(MILL) treadle.test
# Build and publish jar
mill.publishLocal: mill-tools
$(MILL) treadle.publishLocal
# Compile and package all jar
mill.build.all: mill-tools
$(MILL) treadle[_].jar
# Compile and test
mill.test.all: mill-tools
$(MILL) treadle[_].test
# Build and publish jar
mill.publishLocal.all: mill-tools
$(MILL) treadle[_].publishLocal
# Remove all generated code.
# Until "mill clean" makes it into a release.
mill.clean:
$(RM) -rf out
clean: mill.clean
$(SBT) "+clean"
build: mill.build
# Custom recipes for Activity Factor tester
ActivityFactorSpec:
sbt "testOnly treadle.executable.$@"
.PHONY: build clean mill.build mill.test mill.publishLocal mill.build.all mill.test.all mill.publishLocal.all ActivityFactorSpec