summaryrefslogtreecommitdiff
path: root/utils/dune
blob: a9f762980376bb7ebba1f9db0695ee8b2740cd45 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;**************************************************************************
;*                                                                        *
;*                                 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 config.ml)
 (mode    fallback)
 (deps    (:mk Makefile)
          ../Makefile.config
          ; for now the utils Makefile does not use build_config
          config.mlp
          config.common.ml)
 (action  (system "make -f %{mk} %{targets}")))

(rule
 (targets domainstate.ml)
 (mode    fallback)
 (deps    (:conf ../Makefile.config)
          (:c domainstate.ml.c)
          (:tbl ../runtime/caml/domain_state.tbl))
 (action
   (with-stdout-to %{targets}
     (bash
       "`grep '^CPP=' %{conf} | cut -d'=' -f2` -I ../runtime/caml %{c} %{tbl}"
       ))))

(rule
 (targets domainstate.mli)
 (mode    fallback)
 (deps    (:conf ../Makefile.config)
          (:c domainstate.mli.c)
          (:tbl ../runtime/caml/domain_state.tbl))
 (action
   (with-stdout-to %{targets}
     (bash
       "`grep '^CPP=' %{conf} | cut -d'=' -f2` -I ../runtime/caml %{c} %{tbl}"
       ))))