forked from miking-lang/miking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake
executable file
·40 lines (37 loc) · 1.04 KB
/
make
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
#!/bin/bash
###################################################
# Miking is licensed under the MIT license.
# Copyright (C) David Broman. See file LICENSE.txt
#
# To make the build system platform independent,
# building is done using Dune and called from
# this bash script (on UNIX platforms) or
# using make.bat (on Windows).
###################################################
# Forces the script to exit on error
set -e
# General function for building the project
buildboot(){
(cd src/boot; dune build boot.exe && cp -f _build/default/boot.exe ../../build/boot)
}
case $1 in
# Old build system using ocamlbuild and ocaml functions. Should be removed in the future.
old)
ocaml build/build.ml $2 $3 $4
;;
# Run the test suite
test)
buildboot
cd test
../build/boot test mcore && ../build/boot tytest tymcore
;;
# Clean up the project
clean)
rm -rf src/boot/_build
rm -f build/boot
;;
# Just make the project
all | *)
buildboot
;;
esac