summaryrefslogtreecommitdiff
path: root/runtime/caml/dune
blob: 5b6c7cb20d67129c14f05f1226baad00f86e3c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;**************************************************************************
;*                                                                        *
;*                                 OCaml                                  *
;*                                                                        *
;*                     Thomas Refis, Jane Street Europe                   *
;*                                                                        *
;*   Copyright 2018 Jane Street Group LLC                                 *
;*                                                                        *
;*   All rights reserved.  This file is distributed under the terms of    *
;*   the GNU Lesser General Public License version 2.1, with the          *
;*   special exception on linking described in the file LICENSE.          *
;*                                                                        *
;**************************************************************************

(rule
 (targets jumptbl.h)
 (mode    fallback)
 (deps (:h instruct.h))
 (action
   (with-stdout-to %{targets}
     (bash "cat %{h} | tr -d '\\r' | \
            sed -n -e '/^  /s/ \\([A-Z]\\)/ \\&\\&lbl_\\1/gp' -e '/^}/q'"))))

(rule
 (targets version.h)
 (mode    fallback)
 (action
   (with-stdout-to %{targets}
     (run %{dep:../../tools/make-version-header.sh} %{dep:../../VERSION}))))