mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-15 19:28:47 +00:00
111 lines
2.1 KiB
Text
111 lines
2.1 KiB
Text
(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_64 SM Options)
|
|
(libraries GT ostap posix-uname)
|
|
(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))
|