2019-02-26 01:29:29 +04:00
|
|
|
(ocamllex LexToken)
|
|
|
|
(ocamllex Lexer)
|
|
|
|
|
|
|
|
(menhir
|
|
|
|
(merge_into Parser)
|
|
|
|
(modules ParToken Parser)
|
2019-03-07 15:24:57 +04:00
|
|
|
(flags -la 1 --explain --external-tokens LexToken))
|
2019-02-26 01:29:29 +04:00
|
|
|
|
|
|
|
(executables
|
|
|
|
(names LexerMain ParserMain)
|
|
|
|
(public_names ligo-lexer ligo-parser)
|
|
|
|
(package ligo-parser)
|
2019-03-07 15:24:57 +04:00
|
|
|
(modules_without_implementation Error)
|
|
|
|
(libraries getopt hex str uutf zarith))
|
2019-02-26 01:29:29 +04:00
|
|
|
|
2019-02-26 01:34:32 +04:00
|
|
|
;; Les deux directives (rule) qui suivent sont pour le dev local.
|
|
|
|
;; Il suffit de faire "dune build Parser.exe" pour avoir un Parser.exe dans le dossier.
|
|
|
|
;; Pour le purger, il faut faire "dune clean".
|
2019-02-26 01:29:29 +04:00
|
|
|
(rule
|
|
|
|
(targets Parser.exe)
|
|
|
|
(deps ParserMain.exe)
|
|
|
|
(action (copy ParserMain.exe Parser.exe))
|
2019-03-07 15:24:57 +04:00
|
|
|
(mode promote-until-clean))
|
2019-02-26 01:29:29 +04:00
|
|
|
|
|
|
|
(rule
|
|
|
|
(targets Lexer.exe)
|
|
|
|
(deps LexerMain.exe)
|
|
|
|
(action (copy LexerMain.exe Lexer.exe))
|
2019-03-07 15:24:57 +04:00
|
|
|
(mode promote-until-clean))
|
2019-03-01 20:53:52 +04:00
|
|
|
|
2019-03-05 18:18:22 +04:00
|
|
|
(rule
|
|
|
|
(targets dot_git_is_dir)
|
|
|
|
(deps check_dot_git_is_dir.sh)
|
|
|
|
(action (run "sh" "check_dot_git_is_dir.sh")))
|
|
|
|
|
2019-03-01 21:49:25 +04:00
|
|
|
(rule
|
|
|
|
(targets .git_main_dir)
|
2019-03-05 18:18:22 +04:00
|
|
|
(deps dot_git_is_dir check_dot_git_is_dir.sh)
|
|
|
|
(action
|
|
|
|
(progn (run "sh" "check_dot_git_is_dir.sh")
|
|
|
|
(run "sh" "-c" "if \"$(cat dot_git_is_dir)\" = true; then printf %s '../../.git' > .git_main_dir; else cat ../../.git | sed -e 's/^gitdir: //' | sed -e 's|$|/../..|' > .git_main_dir; fi"))))
|
2019-03-01 21:49:25 +04:00
|
|
|
|
|
|
|
(rule
|
|
|
|
(targets .git_worktree_dir)
|
2019-03-05 18:18:22 +04:00
|
|
|
(deps dot_git_is_dir check_dot_git_is_dir.sh)
|
|
|
|
(action
|
|
|
|
(progn (run "sh" "check_dot_git_is_dir.sh")
|
|
|
|
(run "sh" "-c" "if \"$(cat dot_git_is_dir)\" = true; then printf %s '../../.git' > .git_worktree_dir; else cat ../../.git | sed -e 's/^gitdir: //' > .git_worktree_dir; fi"))))
|
2019-03-01 21:49:25 +04:00
|
|
|
|
|
|
|
(rule
|
|
|
|
(targets .gitHEAD)
|
2019-03-05 18:18:22 +04:00
|
|
|
(deps .git_main_dir .git_worktree_dir check_dot_git_is_dir.sh)
|
|
|
|
(action
|
|
|
|
(progn (run "sh" "check_dot_git_is_dir.sh")
|
|
|
|
(run "sh" "-c" "ln -s \"$(cat .git_worktree_dir)/HEAD\" .gitHEAD"))))
|
2019-03-01 21:49:25 +04:00
|
|
|
|
2019-03-01 20:53:52 +04:00
|
|
|
(rule
|
2019-03-01 20:59:58 +04:00
|
|
|
(targets Version.gitHEAD)
|
2019-03-05 18:18:22 +04:00
|
|
|
(deps .gitHEAD check_dot_git_is_dir.sh)
|
|
|
|
(action
|
|
|
|
(progn (run "sh" "check_dot_git_is_dir.sh")
|
|
|
|
(run "sh" "-c" "if git symbolic-ref HEAD >/dev/null 2>&1; then ln -s \"$(cat .git_main_dir)/$(git symbolic-ref HEAD)\" Version.gitHEAD; else ln -s \"$(cat .git_worktree_dir)/HEAD\" Version.gitHEAD; fi"))))
|
2019-03-01 20:53:52 +04:00
|
|
|
|
|
|
|
(rule
|
2019-03-01 20:59:58 +04:00
|
|
|
(targets Version.ml)
|
2019-03-05 18:18:22 +04:00
|
|
|
(deps Version.gitHEAD check_dot_git_is_dir.sh)
|
|
|
|
(action
|
|
|
|
(progn (run "sh" "check_dot_git_is_dir.sh")
|
|
|
|
(run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(git describe --always --dirty --abbrev=0)\" > Version.ml")))
|
2019-03-07 15:24:57 +04:00
|
|
|
(mode promote-until-clean))
|