summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-12-20 22:58:44 +0000
committerAlasdair Armstrong2018-12-20 23:07:24 +0000
commit367f72900fd24bf51b135f04f6fd301f3e8efb15 (patch)
tree782515d2b9dfda003ccab35b938d0cf3cf4028eb /src/Makefile
parent0a9200153430f5e727b3ebe1fa272d4842069530 (diff)
Make sure sail -v prints useful version info
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index 3e9d6f63..b658d90d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -62,7 +62,7 @@ endif
endif
-.PHONY: all sail sail.native sail.byte test clean doc lib power test_power test_idempotence
+.PHONY: all sail sail.native sail.byte manifest.ml test clean doc lib power test_power test_idempotence
# set to -p on command line to enable gprof profiling
OCAML_OPTS?=
@@ -90,19 +90,22 @@ bytecode.ml: bytecode.lem
lem_interp/interp_ast.lem: ../language/l2.ott
ott -sort false -generate_aux_rules true -o lem_interp/interp_ast.lem -picky_multiple_parses true ../language/l2.ott
-share_directory.ml:
- echo "(* Generated file -- do not edit. *)" > share_directory.ml
- echo let d=\"$(SHARE_DIR)\" >> share_directory.ml
+manifest.ml:
+ echo "(* Generated file -- do not edit. *)" > manifest.ml
+ echo let dir=\"$(SHARE_DIR)\" >> manifest.ml
+ echo let commit=\"$(shell git rev-parse HEAD)\" >> manifest.ml
+ echo let branch=\"$(shell git rev-parse --abbrev-ref HEAD)\" >> manifest.ml
+ echo let version=\"$(shell git describe)\" >> manifest.ml
-sail: ast.ml bytecode.ml share_directory.ml
+sail: ast.ml bytecode.ml manifest.ml
ocamlbuild -use-ocamlfind sail.native sail_lib.cma sail_lib.cmxa
-isail: ast.ml bytecode.ml share_directory.ml
+isail: ast.ml bytecode.ml manifest.ml
ocamlbuild -use-ocamlfind isail.native
sail.native: sail
-sail.byte: ast.ml bytecode.ml share_directory.ml
+sail.byte: ast.ml bytecode.ml manifest.ml
ocamlbuild -use-ocamlfind -cflag -g sail.byte
interpreter: lem_interp/interp_ast.lem
@@ -148,7 +151,7 @@ clean:
-rm -f bytecode.ml
-rm -f bytecode.lem
-rm -f bytecode.ml.bak
- -rm -f share_directory.ml
+ -rm -f manifest.ml
doc:
ocamlbuild -use-ocamlfind sail.docdir/index.html