-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
More dune
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
version: "1.30" | ||
|
||
synopsis: "Lama programming language" | ||
maintainer: "dboulytchev@gmail.com" | ||
authors: [ | ||
"Dmitry Boulytchev <dboulytchev@gmail.com>" | ||
"Daniil Berezun <danya.berezun@gmail.com>" | ||
"Egor Sheremetov <egor.sheremetov.dev@gmail.com>" | ||
] | ||
homepage: "https://github.com/PLTools/Lama" | ||
synopsis: | ||
"A programming language (initially developed by JetBrains Research) for educational purposes as an exemplary language to introduce the domain of programming languages, compilers, and tools" | ||
maintainer: ["http://github.com/Kakadu"] | ||
authors: ["http://github.com/dboulytchev" "http://github.com/danyaberezun"] | ||
license: "GPL-3.0-only" | ||
homepage: "https://github.com/PLTools/Lama" | ||
bug-reports: "https://github.com/PLTools/Lama/issues" | ||
|
||
depends: [ | ||
"ocaml" { >= "4.13.1" } | ||
"ocamlfind" { build } | ||
"camlp5" { >= "8.00.05" } | ||
"ostap" { >= "0.5"} | ||
"GT" { >= "0.5.1" } | ||
"posix-uname" { = "2.0.2" } | ||
"dune" {>= "3.3"} | ||
"posix-uname" | ||
"GT" | ||
"ostap" {>= "0.6"} | ||
"odoc" {with-doc} | ||
] | ||
|
||
build: [ | ||
[make] | ||
[make "regression"] {with-test} | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
install: [make "install"] | ||
|
||
dev-repo: "git+https://github.com/PLTools/Lama.git" | ||
url { | ||
src: "git+https://github.com/PLTools/Lama.git#1.30" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
EXECUTABLE = src/lamac | ||
.PHONY: all regression | ||
.PHONY: clean test regression regression-expressions regression-all uninstall install build | ||
|
||
INSTALL ?= install -v | ||
MKDIR ?= mkdir | ||
BUILDDIR = build | ||
|
||
.PHONY: all regression | ||
BUILDDIR = _build | ||
|
||
all: | ||
$(MAKE) -C src | ||
$(MAKE) -C runtime | ||
$(MAKE) -C stdlib | ||
.DEFAULT_GOAL := build | ||
|
||
STD_FILES=$(shell ls stdlib/*.[oi] stdlib/*.lama runtime/runtime.a runtime/Std.i) | ||
all: build test | ||
|
||
build: all | ||
mkdir -p $(BUILDDIR) | ||
cp -r runtime/Std.i runtime/runtime.a stdlib/* src/lamac $(BUILDDIR) | ||
build: | ||
dune b src runtime runtime32 stdlib tutorial | ||
|
||
install: all | ||
$(INSTALL) $(EXECUTABLE) `opam var bin` | ||
$(MKDIR) -p `opam var share`/Lama | ||
$(INSTALL) $(STD_FILES) `opam var share`/Lama/ | ||
dune b @install --profile=release | ||
dune install --profile=release | ||
$(MKDIR) -p `opam var share`/Lama/x64 | ||
$(INSTALL) $(shell ls _build/default/stdlib/x64/*.[oi] _build/default/stdlib/x64/stdlib/*.lama \ | ||
runtime/runtime.a runtime/Std.i) \ | ||
`opam var share`/Lama/x64 | ||
$(MKDIR) -p `opam var share`/Lama/x32 | ||
$(INSTALL) $(shell ls _build/default/stdlib/x32/*.[oi] _build/default/stdlib/x32/stdlib/*.lama \ | ||
runtime32/runtime.a runtime32/Std.i) \ | ||
`opam var share`/Lama/x32 | ||
|
||
uninstall: | ||
$(RM) -r `opam var share`/Lama | ||
$(RM) `opam var bin`/$(EXECUTABLE) | ||
dune uninstall | ||
|
||
|
||
regression-all: regression regression-expressions | ||
|
||
test: regression | ||
regression: | ||
$(MAKE) clean check -j8 -C regression | ||
$(MAKE) clean check -j8 -C stdlib/regression | ||
dune test regression | ||
|
||
regression-expressions: | ||
$(MAKE) clean check -j8 -C regression/expressions | ||
$(MAKE) clean check -j8 -C regression/deep-expressions | ||
|
||
negative_scenarios_tests: | ||
$(MAKE) -C runtime negative_tests | ||
dune test regression_long | ||
|
||
clean: | ||
$(MAKE) clean -C src | ||
$(MAKE) clean -C runtime | ||
$(MAKE) clean -C stdlib | ||
$(MAKE) clean -C regression | ||
$(MAKE) clean -C byterun | ||
$(MAKE) clean -C bench | ||
rm -rf $(BUILDDIR) | ||
@dune clean | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/byterun.exe |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(rule | ||
(target byterun.exe) | ||
(deps | ||
(:main byterun.c) | ||
(:runtime ../runtime/runtime.a)) | ||
(mode | ||
(promote (until-clean))) | ||
(action | ||
(run gcc -g %{main} %{runtime} -o %{target}))) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
(lang dune 3.3) | ||
|
||
(cram enable) | ||
|
||
(generate_opam_files true) | ||
|
||
(bug_reports "https://github.com/PLTools/Lama/issues") | ||
|
||
(homepage "https://github.com/PLTools/Lama") | ||
|
||
(maintainers "http://github.com/Kakadu") | ||
|
||
(authors "http://github.com/dboulytchev" "http://github.com/danyaberezun") | ||
|
||
(license GPL-3.0-only) | ||
|
||
(package | ||
(name Lama) | ||
(synopsis | ||
"A programming language (initially developed by JetBrains Research) for educational purposes as an exemplary language to introduce the domain of programming languages, compilers, and tools") | ||
(depends | ||
posix-uname | ||
GT | ||
(ostap | ||
(>= 0.6)))) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*.exe |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(rule | ||
(targets Sort.x64.exe) | ||
(deps | ||
(:lama Sort.lama) | ||
../runtime/runtime.a) | ||
(mode | ||
(promote (until-clean))) | ||
(action | ||
(setenv | ||
LAMA | ||
"../runtime" | ||
(run | ||
%{project_root}/src/Driver.exe | ||
-march=x86_64 | ||
%{lama} | ||
-I | ||
../stdlib/x64 | ||
-I | ||
../runtime | ||
-o | ||
%{targets})))) |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.