-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (54 loc) · 1.22 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
SHELL:=/bin/bash -O globstar # Required for brace expansion to work
LANGS := rust,julia,haskell
# Output language versions
.PHONY: versions
versions:
@(rustc --version && cargo --version) 2>/dev/null
@julia -version 2>/dev/null
@(stack --version) 2>/dev/null
# Compile the code
.PHONY: build/% build/rust/%
build/%: build/rust/%
@echo "Delegatin'"
build/rust/%:
cd rust/ && cargo build
# Run the tests
.PHONY: test test/rust test/haskell test/julia
test: test/haskell test/rust test/julia
test/haskell:
@echo "Haskell"
@cd haskell/ && stack test --no-cabal-verbose
test/rust:
@echo "Rust"
@cd rust/ && cargo test
test/julia:
@echo Julia
@julia "./julia/tests/main.jl"
.PHONY: clean
clean:
find . -name main -delete
# Experimenting with Make's automatic variables
.PHONY: autovar
autovar/static/%:
@echo '$$@=$@'
@echo '$$%=$%'
@echo '$$<=$<'
@echo '$$?=$?'
@echo '$$^=$^'
@echo '$$+=$+'
@echo '$$|=$|'
@echo '$$*=$*'
@echo '$$(@D)=$(@D)'
@echo '$$(@F)=$(@F)'
@echo '$$(*D)=$(*D)'
@echo '$$(*F)=$(*F)'
@echo '$$(%D)=$(%D)'
@echo '$$(%F)=$(%F)'
@echo '$$(<D)=$(<D)'
@echo '$$(<F)=$(<F)'
@echo '$$(^D)=$(^D)'
@echo '$$(^F)=$(^F)'
@echo '$$(+D)=$(+D)'
@echo '$$(+F)=$(+F)'
@echo '$$(?D)=$(?D)'
@echo '$$(?F)=$(?F)'