mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-27 17:18:48 +00:00
move to dune; fix warnings
This commit is contained in:
parent
41fb7b15f9
commit
9170b9c860
8 changed files with 2655 additions and 1830 deletions
111
src/dune
Normal file
111
src/dune
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
(env
|
||||
(dev
|
||||
(flags
|
||||
(:standard -warn-error -3-7-8-13-15-20-26-27-32-33-39))))
|
||||
|
||||
(rule
|
||||
(targets version.ml)
|
||||
(action
|
||||
(progn
|
||||
(with-stdout-to
|
||||
version2.ml
|
||||
(progn
|
||||
(run echo let version = "\"")
|
||||
(run echo Version)
|
||||
(run git rev-parse --abbrev-ref HEAD)
|
||||
(run echo , " ")
|
||||
(run git rev-parse --short HEAD)
|
||||
(run echo , " ")
|
||||
(pipe-stdout
|
||||
(run git rev-parse --verify HEAD)
|
||||
(run git show --no-patch --no-notes --pretty='%cd'))
|
||||
(run echo "\"")))
|
||||
(with-stdout-to
|
||||
version.ml
|
||||
(pipe-stdout
|
||||
(run cat version2.ml)
|
||||
(run tr -d '\n'))))))
|
||||
|
||||
(rule
|
||||
(targets stdpath.ml)
|
||||
(action
|
||||
(progn
|
||||
(with-stdout-to
|
||||
stdpath2.ml
|
||||
(progn
|
||||
(run echo let path = "\"")
|
||||
(run opam var share)
|
||||
(run echo /Lama)
|
||||
(run echo "\"")))
|
||||
(with-stdout-to
|
||||
stdpath.ml
|
||||
(pipe-stdout
|
||||
(run cat stdpath2.ml)
|
||||
(run tr -d '\n'))))))
|
||||
|
||||
(library
|
||||
(name liba)
|
||||
(modules Language Pprinter stdpath version X86 SM)
|
||||
(libraries GT ostap)
|
||||
(flags
|
||||
(:standard
|
||||
-rectypes
|
||||
;-dsource
|
||||
))
|
||||
; (ocamlopt_flags
|
||||
; (:standard -dsource))
|
||||
(wrapped false)
|
||||
(preprocess
|
||||
(per_module
|
||||
((pps GT.ppx_all)
|
||||
SM
|
||||
X86)
|
||||
((action
|
||||
(run %{project_root}/src/pp5+gt+plugins+ostap+dump.byte %{input-file}))
|
||||
Language
|
||||
Pprinter
|
||||
stdpath
|
||||
version)))
|
||||
(preprocessor_deps
|
||||
(file %{project_root}/src/pp5+gt+plugins+ostap+dump.byte)
|
||||
;(file %{project_root}/src/pp5+gt+plugins+ostap+dump.exe)
|
||||
)
|
||||
;(inline_tests)
|
||||
)
|
||||
|
||||
(executable
|
||||
(name Driver)
|
||||
(flags
|
||||
(:standard
|
||||
-rectypes
|
||||
;-dsource
|
||||
))
|
||||
(modules Driver)
|
||||
(libraries liba unix))
|
||||
|
||||
; (rule
|
||||
; (targets pp5+gt+plugins+ostap+dump.exe)
|
||||
; (deps
|
||||
; (package GT))
|
||||
; (action
|
||||
; (run
|
||||
; mkcamlp5.opt
|
||||
; -package
|
||||
; camlp5,camlp5.pa_o,camlp5.pr_dump,camlp5.extend,camlp5.quotations,ostap.syntax,GT.syntax.all,GT.syntax
|
||||
; -o
|
||||
; %{targets})))
|
||||
|
||||
(rule
|
||||
(targets pp5+gt+plugins+ostap+dump.byte)
|
||||
(deps
|
||||
(package GT))
|
||||
(action
|
||||
(run
|
||||
mkcamlp5
|
||||
-package
|
||||
camlp5,camlp5.pa_o,camlp5.pr_o,ostap.syntax,GT.syntax.all,GT.syntax
|
||||
-o
|
||||
%{targets})))
|
||||
|
||||
(cram
|
||||
(deps ./Driver.exe))
|
||||
Loading…
Add table
Add a link
Reference in a new issue