From 15d5f2485dfba88d5713804783dcc47e3c0acfc3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Mar 2019 17:59:58 +0100 Subject: [PATCH] Hack to get propper dune dependencies for Version.ml --- .gitHEAD | 1 + .gitignore | 3 ++- Version.ml | 1 - dune | 13 +++++++------ 4 files changed, 10 insertions(+), 8 deletions(-) create mode 120000 .gitHEAD delete mode 100644 Version.ml diff --git a/.gitHEAD b/.gitHEAD new file mode 120000 index 000000000..85273d468 --- /dev/null +++ b/.gitHEAD @@ -0,0 +1 @@ +.git/HEAD \ No newline at end of file diff --git a/.gitignore b/.gitignore index 46d12ff04..14e1f3c03 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ _build/* *~ .merlin */.merlin -*.install \ No newline at end of file +*.install +/Version.ml diff --git a/Version.ml b/Version.ml deleted file mode 100644 index 6eaa2c0d0..000000000 --- a/Version.ml +++ /dev/null @@ -1 +0,0 @@ -let version = "7445e9c0" diff --git a/dune b/dune index a0aa8eec8..8afa14ac1 100644 --- a/dune +++ b/dune @@ -41,13 +41,14 @@ ) (rule - (targets vera) - (deps hd) - (action (run "sh" "-c" "if git symbolic-ref HEAD; then ln -s ../../.git/\"$(git symbolic-ref HEAD)\" vera; else ln -s hd vera; fi")) + (targets Version.gitHEAD) + (deps .gitHEAD) + (action (run "sh" "-c" "if git symbolic-ref HEAD; then ln -s ../../.git/\"$(git symbolic-ref HEAD)\" Version.gitHEAD; else ln -s hd Version.gitHEAD; fi")) ) (rule - (targets verb) - (deps vera) - (action (run "sh" "-c" "cat vera > verb")) + (targets Version.ml) + (deps Version.gitHEAD) + (action (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(cat Version.gitHEAD)\" > Version.ml")) + (mode promote-until-clean) )